Transcript Lecture 12

The two-sample t-test
Expanding t to two groups
t-tests used for population mean diffs


With 1-sample t, we have a single sample and a
population value in mind
With 2-sample t, we have two groups.

Experimental vs. Control




Brand Preference



Pepsi, Coke
Coors, Red Stripe
Male, Female


Drug vs. placebo
Psychotherapy, wait list
New training, status quo
Husband, wife; Brother, sister; Sorority, fraternity
Use samples to decide about populations – treatment
effectiveness, differences between brands, groups
Varieties of t


1-Sample (only one kind)
2-Sample (two kinds)

Independent samples – groups are unrelated



Experimental vs. control groups (at random)
Male vs. female participants (unrelated)
Dependent samples – groups are related

Same person in both groups



Left hand vs. right hand
Pain-free vs. placebo
Groups are related somehow


Wife, husband
Cancer patient, friend
Common Structure of t test
Many statistical tests have this form:
Statistic/(Standard error of Statistic).
All t-tests have this form. Example, 1-sample t:
X 
t
SX
It may not look like it, but it is
basically the difference in means
divided by the standard error of the
difference in means.
The t-test and many other stats can be thought of as a fancy z score.
Independent Samples t
The formula for the two-sample t-test for
independent samples looks like this:
t X1  X 2
X1  X 2

S X1  X 2
This says we find the value of t by taking the difference
in the two sample means and dividing by the standard
error of the difference in means.
The top part is just the means for the two groups. The bottom part
is a function of the group standard deviations. Let us take a look.
Example of the Standard Error of the
Difference in Means
Suppose that at USF the mean height is 68 inches and the
standard deviation of height is 6 inches. Suppose we
sampled people 100 at a time into two groups. We
would expect that the average mean difference would be
zero. What would the standard deviation of the
distribution of differences be?
2
SD
SD
2
36
 6 / 10  .6
X 
 100  X 
N
N
 X X    
1
2
2
X1
2
X2
36 36
72



 .85
100 100
100
The standard error for each group mean is .6, for the
difference in means, it is .85.
Estimating the Standard Error of
Mean Differences
The USF scenario we just worked was based on
population information. That is:
2
 X X   X  
1
2
1
2
X2
We generally don’t have population values. We
usually estimate population values with sample data,
thus:
2
2
S X1  X 2  S X1  S X 2
2
SD
where S X2 
N
All this says is that we replace the population variance
of error with the appropriate sample estimators.
Pooled Standard Error
S X1  X 2  S
2
X1
S
2
X2
We can use this formula when
the sample sizes for the two
groups are equal.
When the sample sizes are not equal across groups, we
find the pooled standard error. The pooled standard
error is a weighted average, where the weights are the
groups’ degrees of freedom.
S X1  X 2
(n1  1) s12  (n2  1) s22  1 1 
  

(n1  1)  (n2  1)  n1 n2 
Example of the two-sample t,
Empathy by College Major
Suppose we have a professionally developed test of
empathy. The test has people view film clips and guess
what people in the clips are feeling. Scores come from
comparing what people guess to what the people in the
films said they felt at the time. We want to know
whether Psychology majors have higher scores on
average to this test than do Physics majors. No
direction, we just want to know if there is a difference.
So we find some (N=15) of each major and give each
the test. Results look like this:
Empathy Scores
Person
Psychology
Physics
1
10
8
2
12
14
3
13
12
4
10
8
5
8
12
6
15
9
7
13
10
8
14
11
9
10
12
10
12
13
11
10
8
12
12
14
13
13
12
14
10
8
15
8
12
Empathy
t X1  X 2 
X1  X 2
S X1  X 2
S X 1  X 2  S X2 1  S X2 2
From data
Psychology
Physics
N
15
15
Mean
11.33
10.87
SD
2.09
2.20
SD2
4.38
4.84
4.38/15=.292
.323
Calculation
Result
11.33-10.87
.46
Sqrt(.292+.323)
.78
t
.46/.78
.59
df
15+15-2
28
t(.05, 28 df) 2 tail
2.05
2.05>.59, n.s.
S X2
Term
X1  X 2
S X1  X 2
Six Steps
1. Set alpha. Set at .05.
2. State hypotheses:
Null hypothesis H 0 : 1   2
Alternative (substantive) hypothesis H a : 1  2
3. Calculate the statistic. t X  X  X 1  X 2  .59
1
2
S X1  X 2
4. Determine the critical value. We are looking for a
value of t in the table. N = 30, df = 30-2 = 28, alpha =
.05, 2 tails. The critical value is 2.05.
Six Steps
5. State the decision rule. If the absolute value of the
sample t is greater than or equal to critical t, then reject
H0. If not, then fail to reject H0. In this case |.62| < 2.05,
so we cannot reject H0.
6. State the conclusion. In our sample, t is not
significant. Based on the results of this study, there is
no evidence that Psychology majors and Physics majors
differ on a test of empathy.