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

Online Help

All Products    Maple    MapleSim


Student[Statistics]

  

ChiSquareSuitableModelTest

  

apply the chi-square suitable model test

 

Calling Sequence

Parameters

Description

Options

Examples

References

Compatibility

Calling Sequence

ChiSquareSuitableModelTest(X, F, options)

Parameters

X

-

observed data sample

F

-

function, algebraic; probability distribution or random variable to match data against

options

-

(optional) equation(s) of the form option=value where option is one of bins, level, output, or range; specify options for the ChiSquareSuitableModelTest function

Description

• 

The ChiSquareSuitableModelTest function performs the chi-square suitable model test upon an observed data sample against a known random variable or probability distribution. It works by determining bins for a histogram from the probability distribution, then classifying the entries of X into these bins, and finally testing whether the resulting histogram matches the histogram for the probability distribution.

• 

The first parameter X is a data sample of observed data to use in the analysis.

• 

The second parameter F is a random variable or probability distribution that is compared to the observed data sample.

• 

This test is only appropriate if there is 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.

Options

  

The options argument can contain one or more of the options shown below.

• 

bins='deduce' or posint

  

This option indicates the number of bins to use when categorizing data from X and probabilities from F.  If set to 'deduce' (default), the function attempts to determine a reasonable value for this option. This parameter is ignored if the distribution is discrete.

• 

range='deduce' or range

  

This option indicates the range to use when considering data values - data outside of the range is discarded during processing.  If set to 'deduce' (default), the function attempts to determine a suitable range.

• 

level=float

  

This option is used to specify the level of the analysis (minimum criteria for the observed data to be considered well-fit to the expected data).  By default, this value is 0.05.

• 

output=report or plot or both

  

If the option output is not included or is specified to be output=report, then the function will return a report. If output=plot is specified, then the function will return a plot of the sample test. If output=both is specified, then both the report and the plot will be returned.

Examples

withStudentStatistics:

Initialize an array of data

XSampleNormalRandomVariable0,1,100:

Perform the suitable model test upon this sample.

ChiSquareSuitableModelTestX,UniformRandomVariable0,1,bins=10

Chi-Square Test for Suitable Probability Model
----------------------------------------------
Null Hypothesis:
Sample was drawn from specified probability distribution
Alt. Hypothesis:
Sample was not drawn from specified probability distribution
 
Bins:                    10
Degrees of Freedom:      9
Distribution:            ChiSquare(9)
Computed Statistic:      301.6000000
Computed p-value:        0.
Critical Values:         16.9189774487099
 
Result: [Rejected]
This statistical test provides evidence that the null hypothesis is false.

hypothesis=false,criticalvalue=16.9189774487099,distribution=ChiSquare9,pvalue=0.,statistic=301.6000000

(1)

ChiSquareSuitableModelTestX,NormalRandomVariable0,1,bins=10

Chi-Square Test for Suitable Probability Model
----------------------------------------------
Null Hypothesis:
Sample was drawn from specified probability distribution
Alt. Hypothesis:
Sample was not drawn from specified probability distribution
 
Bins:                    10
Degrees of Freedom:      9
Distribution:            ChiSquare(9)
Computed Statistic:      14.80000000
Computed p-value:        .0965781731648307
Critical Values:         16.9189774487099
 
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false.

hypothesis=true,criticalvalue=16.9189774487099,distribution=ChiSquare9,pvalue=0.0965781731648307,statistic=14.80000000

(2)

If the output=plot option is included, then a report will be returned.

ChiSquareSuitableModelTestX,NormalRandomVariable0,1,bins=10,output=plot

If the output=both option is included, then both a report and a plot will be returned.

report,graphChiSquareSuitableModelTestX,NormalRandomVariable0,1,bins=10,output=both:

Chi-Square Test for Suitable Probability Model
----------------------------------------------
Null Hypothesis:
Sample was drawn from specified probability distribution
Alt. Hypothesis:
Sample was not drawn from specified probability distribution
 
Bins:                    10
Degrees of Freedom:      9
Distribution:            ChiSquare(9)
Computed Statistic:      14.80000000
Computed p-value:        .0965781731648307
Critical Values:         16.9189774487099
 
Result: [Accepted]
This statistical test does not provide enough evidence to conclude that the null hypothesis is false.
Histogram Type:  default
Data Range:      -1.6348567543439 .. 2.21337958939036
Bin Width:       .128274544791142
Number of Bins:  30
Frequency Scale: relative

report

hypothesis=true,criticalvalue=16.9189774487099,distribution=ChiSquare9,pvalue=0.0965781731648307,statistic=14.80000000

(3)

graph

References

  

Kanju, Gopal K. 100 Statistical Tests. London: SAGE Publications Ltd., 1994.

  

Sheskin, David J. Handbook of Parametric and Nonparametric Statistical Procedures. London: CRC Press, 1997.

Compatibility

• 

The Student[Statistics][ChiSquareSuitableModelTest] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

Statistics[ChiSquareGoodnessOfFitTest]

Student

Student/Statistics/ChiSquareSuitableModelTest/overview

Student[Statistics]

Student[Statistics][HypothesisTest]