Comparing Two Groups Statistics 2126
So far.. We have been able to compare a sample mean to a population mean z test t test Often times though we have two groups to compare Is Group 1 different from Group 2
Matched pairs or correlated t test AKA dependent sample t test When subjects are matched on a variable or are used as their own controls, a sort of before and after thing if you will Be very careful with this But it is way powerful and easy to do
Back to our mythical IQ course.. Before After Difference 103 98 -5 100 107 7 111 119 8 97 3 133 134 1 106 5 87 85 -2
A couple of summary statistics
Now it is a simple t test
And now for the decision tobt = 2.95 Reject H0 Our IQ course works!!
Two sample problems While is is useful to know how to compare a sample mean to a population mean and check for significance it is not all that common We rarely know μ Sometimes we do IQ Differences Theoretical values
The much more common question is… Does one group differ from another? Let’s say we had two classes with different teaching methods Is there an effect of teaching method?
Some (made up) data Statistic Class 1 Class 2 Mean 77 71 Standard deviation 6.2 6.7 Number of students 49 52
Our hypotheses Are the two classes different? H0 μ1 = μ2 HA μ1 ≠ μ2 Or we could restate them like this: H0 μ1 - μ2 = 0 HA μ1 ≠ μ2 ≠ 0
Let’s go back to the original t formula Statistic ↓ H0 ↓ ← Error
Figure it out
Now about that error… We cannot just add the values of s for each group They must be weighted
So the formula is
Degrees of freedom With a one sample t test we lose one degree of freedom Because we calculated one standard deviation Here was have calculated 2 So we lose 2 df In our case we have 99 df
Sub in the values
conclusions All t tests are based on the same formula Keep the assumptions in mind SRS Homogeneity of variance Independence of observations