Student[Statistics][ChiSquareGoodnessOfFitTest] Overview
overview of the Chi Square Goodness Of Fit Test
Description
Example
Chi-Squared Goodness of Fit Test is used to test how well the data in the observed sample reflects the data in the expected sample. The observed sample and the expected sample are given as histograms with the same set of bins. That is, each entry of observed and expected is a count of observations with particular characteristics (typically, the observations within a particular range). These characteristics are the same for corresponding entries of observed and expected.
Requirements for using Chi-Squared Goodness of Fit Test:
The goal is to test if the observed sample follows the same the distribution as of the expected sample.
The observed sample and the expected sample are given as histograms with the same set of bins.
The formula is:
X2=∑i=1N⁡observedi−expectedi2expectedi
where observed and expected are the data in the observed sample and the expected sample respectively, N is the sample size of the observed and the expected samples, and X2 follows a Chi-Squared distribution with N−1 degrees of freedom.
Sam was playing a dice game. The rules of the game were: for each turn, the player rolls three dice and wins only if three sixes are rolled. After ten failures, Sam suspected that the dice may have been tampered with. Sam stole the dice and brought them home, where he rolled them 1000 times - the observed sample.
He also had three dice he knew to be fair, and rolled those 1000 times - this is the expected sample. For each roll he recorded the number of sixes. The results were as follows:
observed
expected
0 sixes
580
570
1 six
354
360
2 sixes
63
64
3 sixes
3
6
Now he wants to test if the dice are fair or not.
Determine the null hypothesis:
Null Hypothesis: The three dice are fair. (Observed sample dose not differ from expected sample.)
Substitute the information into the formula:
x=580−5702570⁢+⁢354−3602360+63−64264⁢+⁢3−626=1.791063596
Compute the p-value:
⁢p−value⁢=⁢ProbabilityXˆ2⁢>⁢1.791063596=⁢0.616881663760937, Xˆ2⁢˜⁢ChiSquare3
Draw the conclusion:
This statistical test does not provide enough evidence to conclude that the null hypothesis is false, so we fail to reject the null hypothesis.
See Also
Student[Statistics][ChiSquareGoodnessOfFitTest
Download Help Document