Professional Documents
Culture Documents
The T-Test: Inferences About Population Means
The T-Test: Inferences About Population Means
X tˆ M
Interval =
11 2.064(1) [8.936, 13.064]
Interval is about 9 to 13 and contains 10, so n.s.
Review
How are the distributions of z and t related?
Given that
H 0 : 75; H1 : 75; s y 14; N 49; t(.05, 48) 2.01
construct a rejection region. Draw a picture
to illustrate.
Difference Between Means (1)
• Most studies have at least 2 groups
(e.g., M vs. F, Exp vs. Control)
• If we want to know diff in population
means, best guess is diff in sample
means.
• Unbiased: E( y1 y2 ) E( y1 ) E( y2 ) 1 2
• Variance of the Difference: var( y y )
1 2
2
M1 M2 2
• df=N1-1+N2-1=N1+N2-2
• If SDs are equal, estimate is:
2 2 1 1
diff 2
N1 N 2 1
N N 2
( N1 1) s12 ( N 2 1) s22 N1 N 2
est. diff
N1 N 2 2 1 2
N N
Independent Samples t (2)
( N1 1) s12 ( N 2 1) s22 N1 N 2
est. diff
N1 N 2 2 1 2
N N
H 0 : 1 2 0; H1 : 1 2 0
( y1 y2 ) ( 1 2 )
tdiff est diff y1 18; s12 7; N1 5
y2 20; s22 5.83; N 2 7
D
(D ) i
i
( D D ) 2
est. MD
sD
N s
2
N 1
D
N
D E(D )
t df=N(pairs)-1
est. MD
Dependent t (2)
Brother Sister Diff (D D )2
5 7 2 1
7 8 1 0
3 3 0 1
y 5 y6 D 1
sD
( D D ) 2
1
N 1 est . MD 1 / 3 .58
D E(D ) 1
t 1.72
est. MD .58
Assumptions
• The t-test is based on assumptions of
normality and homogeneity of variance.
• You can test for both these (make sure
you learn the SAS methods).
• As long as the samples in each group
are large and nearly equal, the t-test is
robust, that is, still good, even tho
assumptions are not met.
Review
• Describe a design where it makes sense
to use a single-sample t.
• Describe a design where it makes sense
to use a dependent samples t.
Strength of Association (1)
• Scientific purpose is to predict or
explain variation.
• Our variable Y has some variance that
we would like to account for. There are
statistical indexes of how well our IV
accounts for variance in the DV. These
are measures of how strongly or closely
associated our Ivs and DVs are.
• Variance accounted for:
2
2
( ) 2
2 Y 2 Y|X 1 2 2
Y 4 Y
Strength of Association (2)
• How much of variance in Y is
2 2
( 1 2 ) 2
associated with the IV? 2 Y
2
Y|X
4 Y2
Y
membership? More
in the second 0.1
comparison. As
mean diff gets big, so 0.0
-4 -2 0 2 4 6
1 2
1 (single N
(independent p2
1
N N 2 sample)
samples)
td N
Increasing sample size does not increase effect size
(strength of association). It decreases the standard
error so power is greater, |t| is larger.
Estimating Power (1)
• If the null is false, the statistic is no
longer distributed as t, but rather as
noncentral t. This makes power
computation difficult.
• Howell introduces the noncentrality
parameter delta to use for estimating
power. For the one-sample t,
d n Recall the relations between t
and d on the previous slide
Estimating Power (2)
• Suppose (Howell, p. 231) that we have
25 people, a sample mean of 105, and a
hypothesized mean and SD of 100 and
15, respectively. Then
105 100
d 1 / 3 .33
Howell presents an appendix
15
where delta is related to
d n .33 25 1.65 power. For power = .8, alpha
power .38 = .05, delta must be 2.80. To
solve for N, we compute:
2.8
2 2
d n; n 8.48 71.91
2
d .33
Estimating Power (3)
• Dependent t can be cast as a single
sample t using difference scores.
• Independent t. To use Howell’s
method, the result is n per group, so
double it. Suppose d = .5 (medium
effect) and n =25 per group.
d
n
.50
25
.5 12.5 1.77 From Howell’s appendix, the
2 2
value of delta of 1.77 with
2 2
2.8 alpha = .05 results in power of
n 2 2 62.72
d .5 .43. For a power of .8, we
Need 63 per group. need delta = 2.80
SAS Proc Power – single
sample example
proc power;
onesamplemeans test=t
nullmean = 100
The POWER Procedure
mean = 105 One-sample t Test for Mean
stddev = 15 Fixed Scenario Elements
power = .8 Distribution Normal
ntotal = . ; Method Exact
run; Null Mean 100
Mean 105
Standard Deviation 15
Nominal Power 0.8
Number of Sides 2
Alpha 0.05
Computed N Total
Actual N
Power Total
0.802 73
;
2 sample t Power
Calculate sample size
proc power; Two-sample t Test for Mean Difference
twosamplemeans Fixed Scenario Elements
meandiff= .5 Distribution Normal
stddev=1 Method Exact
power=0.8 Mean Difference 0.5
ntotal=.;
Standard Deviation 1
run;
Nominal Power 0.8
Number of Sides 2
Null Difference 0
Alpha 0.05
Group 1 Weight 1
Group 2 Weight 1
Computed N Total
Actual N
Power Total
0.801 128
2 sample t Power The POWER Procedure
Two-Sample t Test for Mean Difference
• proc power; Fixed Scenario Elements
• twosamplemeans
• meandiff = 5 [assumed Distribution Normal
difference] Method Exact
Number of Sides 1
• stddev =10 [assumed SD] Mean Difference 5
• sides = 1 [1 tail] Standard Deviation 10
Total Sample Size 50
• ntotal = 50 [25 per
Null Difference 0
group] Alpha 0.05
• power = .; *[tell me!]; Group 1 Weight 1
• run; Group 2 Weight 1
Computed Power
Power
0.539
Typical Power in Psych
• Average effect size is about d=.40.
• Consider power for effect sizes between
.3 and .6. What kind of sample size do
we need for power of .8?
proc power; Two-sample t Test for 1
twosamplemeans Computed N Total
meandiff= .3 to .6 by .1 Mean Actual N
stddev=1 Index Diff Power Total
power=.8 1 0.3 0.801 352
ntotal=.; 2 0.4 0.804 200
plot x= power min = .5 max=.95; 3 0.5 0.801 128
run; 4 0.6 0.804 90
500
400
Total Sample Size
300
200
100
Power