You are here: Symbol Reference > Statistics Namespace > Functions > Statistics.GOFChi2Test Function
Stats Master VCL
ContentsIndex
PreviousUpNext
Statistics.GOFChi2Test Function

The Chi-Squared goodness of fit test.

Pascal
procedure GOFChi2Test(const Data: TVec; Distribution: TDistribution; NumBins: Integer; out hRes: THypothesisResult; out Signif: double; hType: THypothesisType = htTwoTailed; Alpha: double = 0.05); overload;
Parameters 
Description 
Data 
Samples to be tested. 
Distribution 
Distribution name (string). At the moment the following string values are supported : 'beta', 'exponential', 'gamma', 'normal', 'rayleigh' and 'weibull'. 
NumBins 
Number of frequency histogram bins. 
hRes 
Returns the result of the null hypothesis (default assumption is that data comes from specific distribution). 
Signif 
(Significance level) returns the probability of observing the given result by chance given that the null hypothesis is true. 
hType 
Defines the type of the null hypothesis (left, right and two - tailed). 
Alpha 
Defines the desired significance level. If the significance probability (Signif) is bellow the desired significance (Alpha), the null hypothesis is rejected. 

Performs the Chi-squared goodness of fit test to test if data is coming from specific distribution. This overload version does not require expected and actual frequencies, but only data vector.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!