2024-06-10

Introduction to P-values

P-values are a fundamental concept in statistics, used to determine the significance of results obtained from a statistical hypothesis test.

What is a P-value?

A P-value is the probability of obtaining test results at least as extreme as the results actually observed, under the assumption that the null hypothesis is correct.

Hypothesis Testing

  • Null Hypothesis (\(H_0\)): The status quo
  • Alternative Hypothesis (\(H_1\)): What the test is trying to prove

With a low enough p-value, we can reject the null hypothesis, proving our alternative

Formula for P-value

The calculation of P-values can be expressed with the following formula:

\[ p = P(T > t | H_0) \]

where \(T\) is the test statistic and \(t\) is the observed value.

Example in R

## 
##  One Sample t-test
## 
## data:  data
## t = 0.31224, df = 99, p-value = 0.7555
## alternative hypothesis: true mean is not equal to 50
## 95 percent confidence interval:
##  48.25887 52.39143
## sample estimates:
## mean of x 
##  50.32515

Histogram of Data

Distribution of Data