Student/Statistics/ChiSquareGoodnessOfFitTest/overview - Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Student/Statistics/ChiSquareGoodnessOfFitTest/overview

Student[Statistics][ChiSquareGoodnessOfFitTest] Overview

overview of the Chi Square Goodness Of Fit Test

 

Description

Example

Description

• 

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:

1. 

The goal is to test if the observed sample follows the same the distribution as of the expected sample.

2. 

The observed sample and the expected sample are given as histograms with the same set of bins.

• 

The formula is:

X2=i=1Nobservediexpectedi2expectedi

  

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 N1 degrees of freedom.

Example

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.

1. 

Determine the null hypothesis:

  

Null Hypothesis: The three dice are fair. (Observed sample dose not differ from expected sample.)

2. 

Substitute the information into the formula:

  

x=5805702570+3543602360+6364264+3626=1.791063596

3. 

Compute the p-value:

  

pvalue=ProbabilityXˆ2>1.791063596=0.616881663760937,      Xˆ2˜ChiSquare3

4. 

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