If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: AP®︎/College Statistics>Unit 11

Lesson 5: Testing for the difference of two population means

# Two-sample t test for difference of means

Given data from two samples, we can do a signficance test to compare the sample means with a test statistic and p-value, and determine if there is enough evidence to suggest a difference between the two population means.

## Want to join the conversation?

• wont we use the pooled estimate of the common standard deviation.
sp = sqrt((n1-1)s1^2 + (n2-1)s2^2)/n1+n2-2)
and then use this sp in the test statistic formula??.

Pls revert
• A pooled standard deviation is used when we assumed we don't know the population variances, and they are EQUAL. In the video, the population variances are assumed to be unknown and UNEQUAL. I hope this helps.
• Why don't we use the standard deviation of combined samples as an estimate of the standard deviation (as we are assuming null hypothesis as true for calculating p-value - as mentioned in hypothesis testing for difference in proportions)?
• isn't the P (T is greater than or equal to 2,44) = 0,024 wrong? It should just be 0,012 right? The sentence Sal described in the P-value only contains one side. If he wanted it to contain both, it would have to be P (T is greater than or equal to 2,44 + T is less than or equal to -2,44), or am I wrong?
• The way Sal wrote it was a little misleading. He wrote
`P(|T| ≥ 2.44)`, notice the || lines. These lines mean absolute value. Since |T| will always be positive, the statement will be true if T is greater than 2.44 or less than -2.44.

So, `P(|T| ≥ 2.44) = P(T ≥ 2.44 + T ≤ -2.44) = 0.24` and `P(T ≥ 2.44) = 0.12`.

Hope this helps! (:
• At , sal took the probability of absolute(t)>than 2.44. Why did he do that, and in which cases would you take less than?
• To answer your second question, in addition to what Muhammed El-Yamani said, you would take less than when you need the one-tailed probability; i.e. when your alternative hypothesis states not `μ1 ≠ μ2` but `μ2 - μ1 > 0`.
• When should we assume equal standard deviations in a test (due to us assuming the null hypothesis)?

I saw it done in a Hypothesis Test but now I'm slightly confused. :\

Any help?
• I don't have a calculator that can calculate the p-value, what can I do instead?
• You'll need a table for a t-statistic though, not the z-statistic.
• At , why is the degrees of freedom the smaller sample size - 1 and not the sum of both sample sizes - 2?
• Here you find the p-value of field A on B, but if you find the p-value of field B on A would it be different and why?
(1 vote)
• If you switched A and B in the subtraction, you would just get a negative result (similar to how 5 - 3 = 2, but 3 - 5 = -2). Then when you used a t-table or the tcdf() function, you would just have to find the area of the high end of the distribution instead of the area of the low end (or vise versa). You should end up with the same result though.

Hope this helped! (: