Mathswell MATHSWELL
MathPal - Your AI Study Buddy
Learns alongside you • Can make mistakes • May be occasionally unavailable

Understanding P-Values

See how p-values emerge from the relationship between your data and the null hypothesis. Move sliders to watch the shaded area change in real-time.

1.0
n = 30
p-value: 0.0350 | Move the sliders to see how p-value changes!

🎯 Hypotheses

H_0: The null hypothesis (no effect)

H_1: The alternative (there is an effect)

📊 Test Statistic

Measures how far your data is from H_0

Common: z or t statistics

🌊 P-Value

Probability of getting data as extreme or more extreme

Assuming H_0 is true

Three Ways to Think About P-Values

  • Frequency Perspective: If we repeated the experiment many times under H_0, the p-value is the fraction of results at least as extreme as ours.
  • Geometric View: The p-value is the shaded tail area under the null distribution curve.
  • Simulation Approach: Generate many samples assuming H_0 is true and count how many are as extreme as your observed data.

Parameters

0.0
1.0
1.5
30

Simulation runs 5,000 samples under H_0 to estimate the p-value empirically.

z = 2.108, t = 2.108
p = 0.0350
df = 29
The shaded area represents the p-value - the probability of observing a test statistic as extreme or more extreme than what we observed, assuming the null hypothesis is true.

Challenge with MathPal

Let's solve specific problems together!

📝 Current Problem

Scenario: Testing a new teaching method
Data: Control group: μ = 75, σ = 12
Treatment group: n = 36 students, x̄ = 79.5
Question: Is the new method significantly better? (α = 0.05)
A) Test statistic = 2.25, p-value = 0.024, Reject H₀
B) Test statistic = 2.25, p-value = 0.012, Reject H₀
C) Test statistic = 1.5, p-value = 0.134, Fail to reject H₀
D) Test statistic = 2.25, p-value = 0.048, Reject H₀

MathPal's Thinking

Hey! I'm working through this too. The new method looks better since x̄ = 79.5 > 75, but let's calculate if it's statistically significant!

Progressive Hints

Since we're testing if the new method is "better", this is a right-tailed test!
H_0: \mu = 75 (no improvement)
H_1: \mu > 75 (improvement)
Use the z-test formula: z = \frac{\bar{x} - \mu_0}{\sigma/\sqrt{n}}
Plug in: z = \frac{79.5 - 75}{12/\sqrt{36}} = \frac{4.5}{2} = 2.25
For a right-tailed test with z = 2.25:
P(Z > 2.25) ≈ 0.012
Since this is one-tailed (not two-tailed), we don't double it!
p-value (0.012) < α (0.05)
So we reject H₀ and conclude the new method is significantly better!
The answer is B: z = 2.25, p = 0.012, Reject H₀