Compute the probability associated with the g2 statistic (f = cummulative distribution function of the distribution function being tested):
\[ g2_{Statistic} = \mathop{\max}\limits_{1 \leq i \leq n} \left( \frac{(f_1-0.5)^2}{\sum_{i=1}^{n}{(f_i-0.5)^2}},\frac{(f_n-0.5)^2}{\sum_{i=1}^{n}{(f_i-0.5)^2}} \right) \]
You should use this test to decide if the largest departure from median is an outlier (i.e. here p > 95%). Computation limitations:Sample size, n; 4 ≤ n ≤ 1000, not necessary an integer.Calculated value of the g2 statistic, on the sample of size n, with at least five significant digits, g2; 0.001 ≤ g2 ≤ 0.95.Return value:Probability to be observed a better agreement between the observed sample and the hypothetical distribution being tested.Is obtained with three significant digits. Limitation: 1.0E-7 ≤ min(p,1-p).Ref:A paper describing the procedure will be prepared.Calculation uses 21 coeficients obtained from a high resolution Monte-Carlo experiment.Compute for: | |