![[p-value.png|300]] Assuming that the [[Null Hypothesis|null hypothesis]] is true in a [[Hypothesis Test|hypothesis test]], the $p$-value of a test result is the probability that a sample [[Statistic|statistic]] is as [[Z-Score|extreme]] as an observed value from a [[Sample|sample]]. The $p$-value serves as the smallest significance level at which the null hypothesis can be rejected. Using the [[Z-Score|z-score]] $z = \frac{\hat\theta - \theta_0}{\sigma_\theta \sqrt{n}}$ as the "extremeness" of the observed value. For a one-tailed test, $p = P(Z > z)$ or $p = P(Z < z)$. For a two-tailed test, $p = 2P(Z > z)$ or $p = 2P(Z < z)$. If the $p$-value is less than or equal to the level of significance $\alpha$ of the test, then the difference between the observed value and the null hypothesis can be fully attributed to a [[Type I Error|type I error]], making the rejection of the null hypothesis statistically significant. If the $p$-value is greater than the level of significance, the difference cannot be fully attributed to a type I error, and the null hypothesis cannot be rejected. Note that even if a test result is statistically significant, the difference that it represents may not be significant.