2025-09-18

Overview

  • Topic: “p-values”.
  • Covering the definition and use cases for p-values

Goals

  1. Understanding the definition of a p-value.
  2. Learn how the p-values are calculated.
  3. Applying p-values using R simulation and plots.

Math Definition - For right-tailed test:

\[ p=P(T(X) \geq T(x_{obs}) \mid H_0). \]

Math Definition - For a two-sided test:

\[ p=P(|T(X)| \geq |T(x_{obs})| \mid H_0). \]

———- Flipping a coin

———- Class Height

R code example

heights=rnorm(20,mean=70,sd=3)
t.test(heights,mu=65)$p.value
## [1] 6.939606e-06

Plotly Example: P-value