Steply

Test mean1 != mean2: mean 102, sd 15, n 25 and mean 95, sd 12, n 36…

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

Step by step

The question

Question: group 1 has mean 102, SD 15 and size 25; group 2 has mean 95, SD 12 and size 36: at the 5% level, is the first mean different from the second?

μ1 ≠ μ2? x̄1 = 102, σ1 = 15, n1 = 25; x̄2 = 95, σ2 = 12, n2 = 36

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

15 squared over 25 is 9.

12 squared over 36 is 4.

Together 13, and the square root is about 3.6056.

SE = √15225 + 12236 = √9 + 4 = √13 ≈ 3.6056

Careful!

Add the variances, then take the square root.

Do not add the two SDs.

Careful: not SE = 3 + 2 = 5 ✗

3 The test number

z is the difference of the means over the SE.

102 minus 95 is 7.

Divided by 3.6056: about 1.94.

z = x̄1 − x̄2SE = 102 − 953.6056 ≈ 1.94

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.94.

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.9, column .04.

For z = 1.94: the row 1.9 and the column .04 meet at 0.9738.

One end is 1 minus 0.9738: 0.0262.

Two ends: 2 times that is 0.0524.

p-value = 2 × (1 − 0.9738) = 2 × 0.0262 = 0.0524

5 Decide

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

Our sample is not rare enough.

So we do not reject H zero.

= p-value 0.0524 > α = 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.94: not past the cut-off.

The same decision.

So it is right!

z = |1.94| < 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.0524 > α = 0.05 → do not reject H0

Your turn

Try this one yourself, then check:

Test μ1 ≠ μ2? x̄1 = 83, σ1 = 12, n1 = 36; x̄2 = 80, σ2 = 8, n2 = 64
Show the answer
do not reject H0

More from Comparing two groups

The whole lesson: Comparing two groups →