Goodness of fit test: overview
This page offers structured overviews of one or more selected methods. Add additional methods for comparisons by clicking on the dropdown button in the righthand column. To practice with a specific method click the button at the bottom row of the table
Goodness of fit test 


Independent variable  
None  
Dependent variable  
One categorical with $J$ independent groups ($J \geqslant 2$)  
Null hypothesis  
 
Alternative hypothesis  
 
Assumptions  
 
Test statistic  
$X^2 = \sum{\frac{(\mbox{observed cell count}  \mbox{expected cell count})^2}{\mbox{expected cell count}}}$
where the expected cell count for one cell = $N \times \pi_j$, the observed cell count is the observed sample count in that same cell, and the sum is over all $J$ cells  
Sampling distribution of $X^2$ if H0 were true  
Approximately a chisquared distribution with $J  1$ degrees of freedom  
Significant?  
 
Example context  
Is the proportion of people with a low, moderate, and high social economic status in the population different from $\pi_{low}$ = .2, $\pi_{moderate}$ = .6, and $\pi_{high}$ = .2?  
Pratice questions  