t-Tests

Compare means: independent vs paired designs

Back

When to use

Independent t-test

Two separate groups (e.g., Treatment A vs B).

Assumptions: independence, roughly normal residuals, similar variance (or use Welch).

Paired t-test

Same subjects before/after (e.g., plaque index baseline vs 6 weeks).

Uses within-person differences; often more power.

Interactive: independent t-statistic (teaching demo)

Enter group summaries and visualize the mean difference with uncertainty.

Group 1

Group 2

Mean difference (1-2): -
SE: -
t: -
This page focuses on intuition. Compute exact p-values in statistical software.

Visual summary

Error bars approximate +/-1 SE around the mean.

Dental Scenario: Comparing Bond Strength of Two Adhesive Systems

Independent two-sample t-test with step-by-step walkthrough

Study Design

A materials researcher tests the shear bond strength (MPa) of two dental adhesive systems. Adhesive A (total-etch) is tested on 12 specimens and Adhesive B (self-etch) on 12 specimens. Each specimen is an independently prepared extracted tooth. Is there a significant difference in mean bond strength?

1

Raw Data: Two Groups of Specimens

Adhesive A (Total-etch) - MPa
Adhesive B (Self-etch) - MPa
2

Compute Group Means & Standard Deviations

Adhesive A:
x̄₁ = - MPa
s₁ = - MPa
n₁ = 12
Adhesive B:
x̄₂ = - MPa
s₂ = - MPa
n₂ = 12
3

Calculate the t-Statistic (Welch's t-test)

SE = √(s₁²/n₁ + s₂²/n₂) = -
t = (x̄₁ − x̄₂) / SE = -
df (Welch) ≈ -
4

Interpret the Result

-
Mean Difference (MPa)
-
t-statistic
-
Decision

Real Dental Scenario: Electric Toothbrush Effectiveness

Paired t-test with animated walkthrough

Study Design

A dentist measures the plaque index of 8 patients before and after 4 weeks of using an electric toothbrush. Since each patient serves as their own control, a paired t-test is appropriate.

1

Patient Data: Before vs After

Patient Before After Visual Comparison
2

Paired Differences (d = Before - After)

Differences:
3

Mean Difference & Standard Deviation

d-bar = (0.7 + 0.7 + 0.6 + 0.8 + 0.7 + 0.8 + 0.7 + 0.7) / 8 = 0.7125
SD_d = sqrt( sum(d_i - d-bar)^2 / (n-1) ) = 0.0641
4

Standard Error & t-Statistic

SE = SD_d / sqrt(n) = 0.0641 / sqrt(8) = 0.0227
t = d-bar / SE = 0.7125 / 0.0227 = 31.40
df = n - 1 = 7

Interpretation: With t = 31.40 and df = 7, this is highly statistically significant (p < 0.001). The electric toothbrush produced a consistent and meaningful reduction in plaque index.

5

Visual Summary: Before vs After

0.713
Mean Reduction
31.40
t-statistic
p < .001
Significant

Dental example

Comparing mean probing depth reduction between two treatments is an independent t-test case. Comparing baseline vs follow-up within the same patients is a paired t-test case.