Topic contents

Lesson 10

Tests comparing two population parameters

Compare two population means, proportions, and variances · Independent samples · Optional extension topic

From testing one population to comparing two populations

Earlier, we tested whether a population parameter equaled a reference value. Now we ask whether two populations differ. Using two mutually independent samples, we compare three types of parameters.

Are the two groups' mean scores equal?

Mean · μ₁ and μ₂

For example, compare population mean scores under two teaching methods.

H₀: μ₁ = μ₂

H₁: μ₁ ≠ μ₂

Compare using an independent two-sample t statistic.

Is the proportion satisfied the same in both groups?

Proportion · p₁ and p₂

For example, compare the population proportions satisfied under two service plans.

H₀: p₁ = p₂

H₁: p₁ ≠ p₂

Calculate the standard error with a pooled proportion to obtain Z.

Do the two devices have the same variability?

Variance · σ₁² and σ₂²

For example, compare the population variances of measurements from two devices.

H₀: σ₁² = σ₂²

H₁: σ₁² ≠ σ₂²

Compare using an F statistic under the normal-population assumption.

Focus on one sequence in this lesson: choose the parameter to compare → obtain the test statistic for the difference between the groups → decide using the p-value and α. We discuss independent samples; formulas for independent samples cannot be applied directly to paired samples measured on the same individuals before and after.

Samples and significance level

Try it

Significance level α

85.0 points

Two population means: do two teaching methods give different mean scores?

The two groups of students are independent. Group 1: n₁=50, x̄₁=82, s₁=10; group 2: n₂=50, s₂=12. Drag the group 2 sample mean to see how the size of the difference affects the test result.

−4−2024tt = −1.358
  • t distribution
  • Sample statistic position
  • Two-sided p-value
The hatched area is the two-sided p-value; the dotted line marks the observed t statistic. We use Welch's t-test, which does not assume equal population variances.
  1. Test hypotheses
    t=xˉ1−xˉ2s12/n1+s22/n2t=\frac{\bar x_1-\bar x_2}{\sqrt{s_1^2/n_1+s_2^2/n_2}}

    H₀: μ₁ = μ₂

    H₁: μ₁ ≠ μ₂

  2. Substitute the data
    t=82−85.0102/50+122/50≈−3.0002.209≈−1.358t=\frac{82-85.0}{\sqrt{10^2/50+12^2/50}}\approx\frac{-3.000}{2.209}\approx −1.358

Welch's approximate degrees of freedom df ≈ 94.9

t statistic
−1.358
Two-sided p-value
0.1777
α
0.05

P = 0.1777 > α = 0.05: fail to reject H₀. The current sample evidence is insufficient to conclude that the two populations differ; this does not mean that their parameters must be equal.

Samples and significance level

Try it

Significance level α

110 people

Two population proportions: do two service plans have the same proportion satisfied?

In each group, 200 users are surveyed. Plan A has 130 satisfied users; adjust plan B's satisfied count with the slider. We use a z-test for the difference between population proportions with independent samples.

−4−2024ZZ = 2.041
  • Standard normal distribution
  • Sample statistic position
  • Two-sided p-value
Changing the satisfied counts in the two groups updates the sample proportions, pooled proportion, Z statistic, and p-value together.
  1. Test hypotheses
    Z=p^1−p^2p^(1−p^)(1/n1+1/n2)Z=\frac{\hat p_1-\hat p_2}{\sqrt{\hat p(1-\hat p)(1/n_1+1/n_2)}}

    H₀: p₁ = p₂

    H₁: p₁ ≠ p₂

    Pooled proportion under H₀: p̂ = (x₁+x₂)/(n₁+n₂)

  2. Substitute the data
    Z=0.650−0.5500.6000×(1−0.6000)×(1/200+1/200)≈2.041Z=\frac{0.650-0.550}{\sqrt{0.6000\times(1-0.6000)\times(1/200+1/200)}}\approx 2.041

Group A proportion 65.0%; group B proportion 55.0%; pooled proportion 0.6000; standard error 0.04899.

Z statistic
2.041
Two-sided p-value
0.04123
α
0.05

P = 0.04123 ≤ α = 0.05: reject H₀. At the current significance level, there is evidence that the corresponding parameters of the two populations differ.

Samples and significance level

Try it

Significance level α

8.0

Two population variances: do two devices have the same measurement variability?

Device A provides 30 measurements with sample variance s₁²=16; device B provides 25 measurements with a sample variance you can adjust using the slider. Here, we assume the two samples are independent and come from normal populations.

01234FF = 2.000
  • F distribution
  • Sample statistic position
  • Two-sided p-value
The F distribution is asymmetric. The hatched areas use equal tail probabilities for the two-sided test; the corresponding F values are asymmetric.
  1. Test hypotheses
    F=s12s22,df1=n1−1,df2=n2−1F=\frac{s_1^2}{s_2^2},\quad df_1=n_1-1,\quad df_2=n_2-1

    H₀: σ₁² = σ₂²

    H₁: σ₁² ≠ σ₂²

  2. Substitute the data
    F=168.0≈2.000F=\frac{16}{8.0}\approx 2.000

Degrees of freedom df₁=29, df₂=24; we keep the order of the variances in the numerator and denominator fixed.

F statistic
2.000
Two-sided p-value
0.08690
α
0.05

P = 0.08690 > α = 0.05: fail to reject H₀. The current sample evidence is insufficient to conclude that the two populations differ; this does not mean that their parameters must be equal.