Student/Statistics/ChiSquareSuitableModelTest/overview - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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

Student[Statistics][ChiSquareSuitableModelTest] Overview

overview of the chi-square suitable model test

 

Description

Example

Description

• 

Chi-Squared Suitable Model Test is used to determine if the sample gathered might have been drawn from the distribution specified. For example, it can be used to test if the time gap between cars driving by a road follows Poisson distribution. This test is a special case of the Chi-Squared Goodness of Fit Test. The observations in the sample are tallied into bins; then the number of observations in the ith bin is compared with the expected number. The bins option determines the number of bins that the sample is tallied into; it is explained in greater detail in the help page of Statistics[ChiSquareSuitableModelTest].

• 

This test is only appropriate if there is a prior knowledge of any parameters in the distribution. If any of the parameters in the distribution have been fitted to the data sample in question, then an adjustment of the degrees-of-freedom parameter is necessary. This adjustment is not available in the current implementation.

• 

Requirements for using Chi-Squared Suitable Model Test:

1. 

The goal is to test if the sample gathered fits the expected distribution.

• 

The formula is:

X2=i=1Nobservediexpectedi2expectedi

  

where observed and expected are the data in the observed sample and the expected sample respectively, N: The number of bins that the sample is tallied into, and X2 follows a Chi-Squared distribution with N1 degrees of freedom.

Example

Suppose a sample of data is given by −3.5,1.7,−0.3,5.5,3.8,16.1,−7.4,15.0,5.2,11.0. We want to test if this data fits Normal4,7.

1. 

Determine the null hypothesis:

  

Null Hypothesis: The observed sample fits Normal4,7.

2. 

Determine the bins we will use for this test:

  

Maple will automatically determine the reasonable bins used. For this case, there are 4 bins and they are ..−0.721,−0.721..4,4..8.721,8.721...

3. 

Count the number of data points in the observed sample and the expected number of data points that fall in the ith bin:

  

N˜Normal4,7

Bin

Observed

Expected

..−0.721

2

10Probability-infinity < N < -0.721=2.500

−0.721..4

3

10Probability-0.721 < N < 4=2.500

4..8.721

2

10Probability4 < N < 8.721=2.500

8.721..

3

10Probability8.721 < N < infinity=2.500

• 

Substitute the information into the formula:

  

t = 22.50022.500+32.50022.500+22.50022.500+32.50022.500 =0.400

4. 

Compute the p-value:

  

p-value = ProbabilityX2<0.400 = 0.940, where X2˜ChiSquare3.

5. 

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]