Goodness of Fit for Random Subsets

This Demonstration performs a 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 -value () is the probability that another set of truly random samples would be as far or farther away from the expected value (as measured by ).

SNAPSHOTS

  • [Snapshot]
  • [Snapshot]
  • [Snapshot]

DETAILS

This Demonstration shows that the random sample function in Mathematica seems to choose each possible sample with (at least approximately) equal likelihood. The -value ranges over the interval [0,1]. This Demonstration does not show that the -values have a uniform distribution, but a user could keep track of the -values and plot his or her own distribution.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.