2024-02-05

The P-Value in Statistics

  • By: Cole Liu

What is a P-Value?

  • The P-Value for a dataset is the probability of obtaining an outcome that is at least or at most as extreme as the result actually observed.

P-Value Calculation

  • z = \(\frac{{x - \mu}}{{\sigma}}\)
  • z= z score
  • x = chosen value
  • \(\mu\) = sample mean
  • \(\sigma\) = std deviation
  • You can plug the z-score in the following chart to retrieve your P-Value (prob the sample would be at least that value).

Significance Level

-The significance level (α) is the probability of rejecting the null hypothesis when it is true.

-This means that if the p-value is less than the significance level, we can decide that an experimental effect is statistically significant.

P-Value Interpretation

-If \(p\)-value < \(\alpha\): Reject the null hypothesis.

-If \(p\)-value \(\geq\) \(\alpha\): Fail to reject the null hypothesis.

Normal Distribution plot

ggplot Example 1

ggplot Example 2