# Understanding why p value is uniformly distributed [duplicate]

I know that the mathematically, p values should be uniformly distributed under the null hypothesis. However, what is this null hypothesis (in this context)?

Can someone give me an example please ?

• Take a look at this paper by Murdoch et al (2008) p values are random variables in The American Statistician. (Link is to a self-archived version of paper.) – Reinstate Monica - G. Simpson Sep 10 '13 at 4:07
• The typical p-value (e.g., from a t-test) is the probability of the observed data (or something more extreme) if the null hypothesis is true. The null hypothesis is typically (e.g., in case of a t-test) the hypothesis that in the population, the parameter is some fixed value. Very often, the null hypothesis is that the parameter is zero. So the typical p-value you'll find is the probability of the observed data if the parameter in the population was 0. – jona Sep 10 '13 at 4:07
• It's simply (in the continuous case) that the p-value is the Probability Integral Transform (or its complement) applied to the relevant test statistic (e.g. |t| for a two-tailed t-test) under the null; it's uniform for exactly the same reason that $U=F_X(X)$ is. – Glen_b -Reinstate Monica Sep 10 '13 at 4:19