RosettaCodeData/Task/Verify-distribution-uniformity-Chi-squared-test/00-TASK.txt
2023-07-01 13:44:08 -04:00

12 lines
724 B
Text

;Task:
Write a function to determine whether a given set of frequency counts could plausibly have come from a uniform distribution by using the [[wp:Pearson's chi-square test|<math>\chi^2</math> test]] with a significance level of 5%.
The function should return a boolean that is true if and only if the distribution is one that a uniform distribution (with appropriate number of degrees of freedom) may be expected to produce.
Note: normally a two-tailed test would be used for this kind of problem.
;Reference:
:* &nbsp; an entry at the MathWorld website: &nbsp; [http://mathworld.wolfram.com/Chi-SquaredDistribution.html chi-squared distribution].
; Related task:
:* [[Statistics/Chi-squared_distribution]]
<br><br>