2026-02-03

What is a P-Value?

A p-value measures the strength of evidence against the null hypothesis.

Definition:

\[p = P(\text{observing data this extreme} \mid H_0 \text{ is true})\]

Interpretation:

  • Small p-value (< 0.05): Strong evidence against \(H_0\)
  • Large p-value (≥ 0.05): Insufficient evidence against \(H_0\)

Key point: P-value is NOT the probability that \(H_0\) is true!

The ToothGrowth Dataset

Research Question: Does vitamin C dose affect tooth growth in guinea pigs?

Experimental Design:

  • 60 guinea pigs measured for tooth length (odontoblasts)
  • Three dose levels: 0.5, 1.0, and 2.0 mg/day
  • Two delivery methods: Orange Juice (OJ) vs Ascorbic Acid (VC)

Variables:

  • len: Tooth length (numeric)
  • dose: Vitamin C dose in mg/day (0.5, 1.0, 2.0)
  • supp: Supplement type (OJ or VC)

Hypothesis Testing

We use ANOVA (Analysis of Variance) to test if dose affects tooth length.

Hypotheses:

\[H_0: \mu_{0.5} = \mu_{1.0} = \mu_{2.0}\]

\[H_1: \text{At least one mean differs}\]

Where \(\mu_{0.5}\), \(\mu_{1.0}\), and \(\mu_{2.0}\) are the mean tooth lengths for each dose group.

Significance level: \(\alpha = 0.05\)

Exploratory Data Analysis

Dose (mg/day) Mean Length Std Dev Sample Size
0.5 10.6 4.50 20
1 19.7 4.42 20
2 26.1 3.77 20

Observation: Mean tooth length increases dramatically with dose!

  • 0.5 mg: 10.6 units
  • 1.0 mg: 19.7 units
  • 2.0 mg: 26.1 units

Tooth Length by Dose

The boxplots clearly show increasing tooth length with higher doses.

Dose Effect by Supplement Type

Both supplement types show the same dose-response pattern.

Interactive 3D Visualization

Rotate the plot to explore the 3D relationship

Statistical Test: ANOVA

anova_result <- aov(len ~ dose, data = ToothGrowth)
summary(anova_result)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## dose         2   2426    1213   67.42 9.53e-16 ***
## Residuals   57   1026      18                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Result: F-statistic = 67.42, p-value = 9.53e-16

With such a small p-value, we reject the null hypothesis

Conclusion

P-value = 0.000000000000000953 (essentially zero!)

Interpretation:

If dose truly had NO effect on tooth length, the probability of observing differences this large by random chance is less than 0.0000000000001%.

Conclusion: Vitamin C dose has a highly significant effect on tooth growth in guinea pigs. Higher doses produce substantially longer teeth.

This demonstrates the power of p-values in hypothesis testing