Steply

Test mean1 != mean2: mean 16.2, sd 3, n 50 and mean 15, sd 4, n 40…

Step by step, with the reason for every step · Comparing two groups · University Statistics

Step by step

The question

Question: group 1 has mean 16.2, SD 3 and size 50; group 2 has mean 15, SD 4 and size 40: at the 5% level, is the first mean different from the second?

μ1 ≠ μ2? x̄1 = 16.2, σ1 = 3, n1 = 50; x̄2 = 15, σ2 = 4, n2 = 40

The SDs of all the numbers in each group are known.

σ1, σ2: the SDs of all the numbers, known

1 Write the hypotheses

H₀ is the "nothing new" idea: it has the equal sign.

Here: the two means are the same, so the difference is 0.

H0 : μ1 = μ2

Hₐ is what we want to show.

Here: the first mean is different from the second.

Ha : μ1 ≠ μ2

Different from: two tails.

two tails

2 Standard error

The standard error of the difference: add the two variances, sigma squared over n, then the square root.

SE = √σ12n1 + σ22n2

3 squared over 50 is 0.18.

4 squared over 40 is 0.4.

Together 0.58, and the square root is about 0.7616.

SE = √3250 + 4240 = √0.18 + 0.4 = √0.58 ≈ 0.7616

Careful!

Add the variances, then take the square root.

Do not add the two SDs.

Careful: not SE = 0.4243 + 0.6325 = 1.0567 ✗

3 The test number

z is the difference of the means over the SE.

16.2 minus 15 is 1.2.

Divided by 0.7616: about 1.58.

z = x̄1 − x̄2SE = 16.2 − 150.7616 ≈ 1.58

4 The p-value

The p-value is the chance of getting a sample this far out, if H zero is true.

p-value: the chance of a sample this far out, if H0 is true

On the bell of H zero: 0 in the middle, our sample at z = 1.58.

Two tails: we shade both ends, as far out as our sample or more.

The z-table gives the area to the left of z.

Row 1.5, column .08.

For z = 1.58: the row 1.5 and the column .08 meet at 0.9429.

One end is 1 minus 0.9429: 0.0571.

Two ends: 2 times that is 0.1142.

p-value = 2 × (1 − 0.9429) = 2 × 0.0571 = 0.1142

5 Decide

The p-value, 0.1142, is more than alpha, 0.05.

Our sample is not rare enough.

So we do not reject H zero.

= p-value 0.1142 > α = 0.05 → do not reject H0

6 Say it in words

At the 5% level, there is not enough evidence that

In words: at the 5% level, there is not enough evidence that the first mean is different from the second.

the first mean is different from the second.

This does not prove H zero is true.

We just cannot rule it out.

not rejecting H0 does not prove H0

7 Check

Let's check the other way, with the cut-off.

0.05 split into two ends gives the cut-offs plus and minus 1.96.

0.05 in two ends: cut-offs ±1.96

z is 1.58: not past the cut-off.

The same decision.

So it is right!

z = |1.58| < 1.96: not past it, do not reject

Let's look back.

First: write the hypotheses.

Then: standard error.

Then: the test number.

Then: the p-value.

Then: decide.

Then: say it in words.

Last: check.

Answer
= p-value 0.1142 > α = 0.05 → do not reject H0

Your turn

Try this one yourself, then check:

Test μ1 ≠ μ2? x̄1 = 44, σ1 = 16, n1 = 64; x̄2 = 40, σ2 = 10, n2 = 25
Show the answer
do not reject H0

More from Comparing two groups

The whole lesson: Comparing two groups →