p-Values Are Random Variables

Requires a Wolfram Notebook System
Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.
We consider -values for
or
simulations using a random sample of size
from a normal distribution with mean
and unit variance to compute the two-sided
-values for the test of the null hypothesis,
versus
using the
-distribution method as implemented in the Mathematica function MeanTest. When
, the
-values are uniformly distributed on
. With
simulations, the result is obtained very quickly but there is more random variability in the histogram. Increasing to
simulations takes less than three seconds on most modern computers and provides a more accurate result.
Contributed by: Ian McLeod (University of Western Ontario) (March 2011)
Open content licensed under CC BY-NC-SA
Snapshots
Details
-values are defined as the probability of observing a value as extreme or more extreme than the observed if the null hypothesis is true. Beginning students often do not realize that
-values, just like confidence intervals, are random in repeated sampling and this point is often not discussed in elementary textbooks, as noted in [1].
For more on the Q-Q plot see [2].
[1] D. J. Murdoch, Y.-L. Tsai, and J. Adcock, "P‐Values Are Random Variables," The American Statistician, 62(3), 2008 pp. 242–245.
[2] W. S. Cleveland, Visualizing Data, Summit, NJ: Hobart Press, 1993.
Permanent Citation