Steply

Test mean1 != mean2: mean 81, sd 12, n 36 and mean 76, sd 9, 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 81, SD 12 and size 36; group 2 has mean 76, SD 9 and size 36: at the 5% level, is the first mean different from the second?

μ1 ≠ μ2? x̄1 = 81, σ1 = 12, n1 = 36; x̄2 = 76, σ2 = 9, 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

12 squared over 36 is 4.

9 squared over 36 is 2.25.

Together 6.25, and the square root is 2.5.

SE = √12236 + 9236 = √4 + 2.25 = √6.25 = 2.5

Careful!

Add the variances, then take the square root.

Do not add the two SDs.

Careful: not SE = 2 + 1.5 = 3.5 ✗

3 The test number

z is the difference of the means over the SE.

81 minus 76 is 5.

Divided by 2.5: about 2.

z = x̄1 − x̄2SE = 81 − 762.5 ≈ 2

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 = 2.

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 2.0, column .00.

For z = 2: the row 2.0 and the column .00 meet at 0.9772.

One end is 1 minus 0.9772: 0.0228.

Two ends: 2 times that is 0.0456.

p-value = 2 × (1 − 0.9772) = 2 × 0.0228 = 0.0456

5 Decide

The p-value, 0.0456, is less than alpha, 0.05.

Our sample would be rare if H zero were true.

So we reject H zero.

= p-value 0.0456 < α = 0.05 → reject H0

6 Say it in words

At the 5% level, there is enough evidence that

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

the first mean is different from the second.

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 2: past the cut-off.

The same decision.

So it is right!

z = |2| > 1.96: past the cut-off, 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.0456 < α = 0.05 → reject H0

Your turn

Try this one yourself, then check:

Test μ1 ≠ μ2? x̄1 = 64, σ1 = 7, n1 = 49; x̄2 = 60, σ2 = 7, n2 = 49
Show the answer
reject H0

More from Comparing two groups

The whole lesson: Comparing two groups →