Lensa ML
Lensa ML

Hypothesis Testing

Step 1 of 6

Null vs Alternative

Two competing explanations for the data

True effect size (μ₁)1.50
H₀: μ=0H₁: μ=1.5
EFFECT SIZE
1.50
H₀ MEAN
0.00
H₁ MEAN
1.50
SEPARATION
Medium

The distributions are separating. H₀ says the data comes from μ=0; H₁ says μ=1.5. The shaded overlap shows where we can't easily tell which hypothesis generated the data.

Step 1 of 6: Null vs Alternative

Two competing explanations for the data

True effect size (μ₁)1.50
H₀: μ=0H₁: μ=1.5
EFFECT SIZE
1.50
H₀ MEAN
0.00
H₁ MEAN
1.50
SEPARATION
Medium

The distributions are separating. H₀ says the data comes from μ=0; H₁ says μ=1.5. The shaded overlap shows where we can't easily tell which hypothesis generated the data.

Step 2 of 6: Test Statistics

Measuring how extreme the observed data is under H₀

Observed sample mean1.20
z = 1.20Null distribution (H₀)
z-STATISTIC
1.20
p-VALUE
0.2301
TAIL AREA
23.01%

z = 1.20 — the shaded tails (pink) show the probability of seeing a value this extreme or more under H₀. The p-value is 0.230 — the two-tailed probability.

Step 3 of 6: P-Values

The probability of seeing data this extreme if H₀ is true

Observed value1.80
p = 0.0719
OBSERVED
1.80
p-VALUE
0.0719
-log₁₀(p)
1.14

p = 0.072 — getting smaller. The tails are narrowing, but p > 0.05 means we'd see data this extreme 7.2% of the time under H₀. Suggestive but not conclusive.

Step 4 of 6: Significance Level α

The threshold for rejecting H₀ — you choose it before looking at data

Significance level α0.05
z=2.1z*=1.96REJECT H₀
α
0.050
z-CRITICAL
±1.96
p-VALUE
0.0357
DECISION
Reject

At α = 0.050, the critical value is ±1.96. Our z = 2.1 falls in the pink rejection region (p = 0.0357 < α). We reject H₀.

Step 5 of 6: Type I & Type II Errors

False positives vs false negatives — you can't minimize both

Significance level α0.05
True effect size1.50
Type I (α)Type II (β)H₀H₁
TYPE I (α)
0.050
TYPE II (β)
0.677
POWER (1-β)
0.323

Low power (32%). The alternative (purple) overlaps heavily with the acceptance region. β = 0.68 — we'd miss the effect most of the time. Increase the effect size or lower α less to improve power.

Step 6 of 6: Power & Sample Size

How many samples you need to reliably detect an effect

Sample size n20
Power vs Sample Size (effect=0.5, α=0.05)0%20%40%60%80%100%05010015020080%n=32Sample size n
POWER
60.9%
SAMPLE n
20
n FOR 80%
32
SE
0.224

Power = 61% — getting better but below the conventional 80% threshold. The standard error shrinks as √n, so each additional sample helps. Need n ≈ 32 for 80%.