Chi-Square Calculator for Goodness of Fit

tails: for Goodness of Fit Test you can use only right tail
one varaince test tutorial

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 frequency for each group is n/6
Observed frequency, the actual times each number appears

Hypotheses

H0: Model Fits
H1: Model Doesn't Fit

Test statistic

Chi2 statistic

χ² distribution

Normal distribution right tailed

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 parametes For example when model is Normal distribution, and you need to estimate the Mean and the Standard Deviation. then m = 2
effect size(w) 0.1 small, 0.3 medium, 0.5 large

Enter raw data directly
Enter raw data from excel

Enter sample data

Group Observed
Frequency
Expected
Frequency

The total of the Expected Frequency must be equal to the total of the Observed Frequency

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.
hover for example example from excel


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

validation message

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