Chi-Square Calculator for Goodness of Fit

Target: Check if the statistical model fits the observations.
The test uses Chi-square distribution.

Example: checking a fair dice.
Model: the probability of each side is equal - 1/6.
H0: fair dice.
H1: unfair dice.

The groups are the dice's numbers (1,2,3,4,5,6).
In this example, you throw the dice n times.
Expected frequencies - for each group is n/6.
Observed frequencies - the actual times each number appears.

Hypotheses

 H0: Model Fits H1: Model Doesn't Fit

Test statistic χ² distribution Degree Of Freedom (DF) = n - m - 1

Test calculation

Statistic Data

 name: the population's name. α: significant level (0-1), maximum chance allowed rejecting H0 while H0 is correct (Type1 Error). m: number of estimated parameters. For example when the model is the normal distribution, and you need to estimate the mean and the standard deviation, then m = 2. effect size(w) for example, 0.1 small, 0.3 medium, 0.5 large.

Enter raw data directly
Enter raw data from excel

Enter sample data

Expected Value - choose Expected Frequencies or Expected Probabilities.

GroupObserved
Frequency
Expected
Value

The sum of the expected frequencies/probabilities must be equal to the sum of the observed frequencies or to one.

Enter sample data

You may copy data from Excel, Google sheets or any tool that separate data with Tab and Line Feed.
Copy the data, one block of 3 consecutive columns includes the top header row and left header column, and paste below.

It is okay to leave empty cells, empty cells or non numeric cells won't be counted

 k: number of groups n: sample size χ² Chi square test statistic

validation message