WOLFRAM|DEMONSTRATIONS PROJECT

Goodness of Fit for Random Subsets

​
trial
population size
5
sample size
2
samples
1000
2-subsets of {1, …, 5}
This Demonstration performs a
2
χ
goodness-of-fit test on a set of random samples of a given sample size from a finite population. The count for each subset is indicated by a point; the expected value is indicated by the horizontal line. Tooltips on each show the values. The "trial" slider controls a seed for the random number generator, and gives a new set of samples for each value. The
P
-value (
P
) is the probability that another set of truly random samples would be as far or farther away from the expected value (as measured by
2
χ
).