Beruflich Dokumente
Kultur Dokumente
Questions
What is the main use of the t-test?
How is the distribution of t related to the unit
normal?
When would we use a t-test instead of a ztest? Why might we prefer one to the other?
What are the chief varieties or forms of the ttest?
What is the standard error of the difference
between means? What are the factors that
influence its size?
More Questions
Identify the appropriate to version of t
to use for a given design.
Compute and interpret t-tests
appropriately.
Given that
H 0 : 75; H1 : 75; s y 14; N 49; t(.05, 48) 2.01
Background
The t-test is used to test hypotheses about
means when the population variance is
unknown (the usual case). Closely
related to z, the unit normal.
Developed by Gossett for the quality
control of beer.
Comes in 3 varieties:
Single sample, independent samples, and
dependent samples.
Single-sample z test
For large samples (N>100) can use z to
test hypotheses about means. ( X X ) 2
(X )
zM
est. M
est. M
Suppose
sX
N 1
N
Then
est. M
If
sX
5
5
.35
N
200 14.14
X 11 z
(11 10)
2.83; 2.83 1.96 p .05
.35
The t Distribution
We use t when the population variance is unknown (the
usual case) and sample size is small (N<100, the usual
case). If you use a stat package for testing hypotheses
about means, you will use t.
The t distribution is a short, fat relative of the normal. The shape of t depends on
its df. As N becomes infinitely large, t becomes normal.
Degrees of Freedom
For the t distribution, degrees of freedom are always a
simple function of the sample size, e.g., (N-1).
One way of explaining df is that if we know the total or
mean, and all but one score, the last (N-1) score is not free
to vary. It is fixed by the other scores. 4+3+2+X = 10.
X=1.
Single-sample t-test
With a small sample size, we compute the same numbers
as we did for z, but we compare them to the t distribution
instead of the z distribution.
H 0 : 10; H1 : 10; s X 5; N 25
est. M
sX
5
1
N
25
(11 10)
X 11 t
1
1
1<2.064, n.s.
X t M
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
diff
2
M1
2
M2
2
M1
M2 2
z diff
4
9
13
.36
100 100
100
2
(10 12) 0
5.56; p .05
.36
.36
2 2
1
2 1
N1 N 2
N
N
2
1
est. diff
( N1 1) s12 ( N 2 1) s22
N1 N 2 2
N1 N 2
N
N
1 2
t diff
( N1 1) s12 ( N 2 1) s22
N1 N 2 2
( y1 y 2 ) ( 1 2 )
est diff
N1 N 2
N
N
1 2
H 0 : 1 2 0; H1 : 1 2 0
y1 18; s12 7; N1 5
y2 20; s22 5.83; N 2 7
est. diff
t diff
4(7) 6(5.83) 12
1.47
5 7 2 35
(18 20) 0 2
1.36; n.s.
1.47
1.47
tcrit = t(.05,10)=2.23
Review
What is the standard error of the
difference between means? What are
the factors that influence its size?
Describe a design (what IV? What
DV?) where it makes sense to use the
independent samples t test.
Dependent t (1)
Observations come in pairs. Brother, sister, repeated measure.
2
diff
M2 1 M2 2 2 cov( y1 , y2 )
D
i
s
2
D
D E(D )
t
est. MD
2
(
D
D
)
i
N 1
est. MD
df=N(pairs)-1
sD
Dependent t (2)
Brother
5
7
3
y 5
sD
Sister
7
8
3
y6
2
(
D
D
)
N 1
Diff
2
1
0
(D D )2
1
0
1
D 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.
( 1 2 ) 2
Y
Y|X
2
2
Y
4 Y2
2
Y
2
Y |X
2
Y
( 1 2 ) 2
4 Y2
0.4
0.3
0.2
0.1
0.0
-4
-2
X
)
t
size.
t
(independent
samples)
1
1
N
N
2
1
p2
(single
sample)
2
N
td N
2.8
.
33
8.482 71.91
n
25
.50
.5 12.5 1.77
2
2
n 2
d
2.8
2
.5
62.72
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;
twosamplemeans
meandiff= .5
stddev=1
power=0.8
ntotal=.;
run;
2 sample t Power
proc power;
twosamplemeans
meandiff = 5 [assumed
difference]
stddev =10 [assumed SD]
sides = 1
[1 tail]
ntotal = 50 [25 per group]
power = .; *[tell me!];
run;
Normal
Exact
1
5
10
50
0
0.05
1
1
Computed Power
Power
0.539
Power Curves
Why a whopper of an IV is helpful.
600
500
400
300
200
100
0
0.5
0.6
0.7
0.8
Power
Mean Diff
0.3
0.4
0.5
0.6
0.9
1.0
Review
About how many people total will you
need for power of .8, alpha is .05 (two
tails), and an effect size of .3?
You can only afford 40 people per
group, and based on the literature, you
estimate the group means to be 50 and
60 with a standard deviation within
groups of 20. What is your power
estimate?