### P-value

#### Definition

Assuming that the null hypothesis is true, the *$p$ value* is the probability of obtaining a result equal to or more extreme than that observed, i.e. the chance that a type I error was made). If the $p$-value is less than the significance level $\alpha$ then the alternative hypothesis is accepted.

If we reject the null hypothesis at an $\alpha_1$ significance level but accept the null hypothesis at an $\alpha_2$ significance level with $\alpha_1 > \alpha_2$ then we know that the $p$-value is between $\alpha_1$ and $\alpha_2$.

To compute a $p$-value from the test statistic, sum or integrate over (depending on whether we have a discrete or continuous random variable) the probabilities of less likely events occurring.

#### Illustrative Example

The $p$-value for a binomially distributed random variable $X$ is the cumulative probability. For example, we purchase a pack of three dice in order to check if they are weighted so that a six appears more frequently than any number. We have thrown the $3$ dice and obtained $2$ sixes, we say $X$ is the random variable representing the number of sixes thrown. Then the $p$-value is So $\dfrac{2}{27}\approx 0.0741$ is our $p$-value.

#### External Resources

- $p$-values at Statistics centre University of Alberta