Transcript June 3
Overview
• Two paired samples: Within-Subject Designs
-Hypothesis test
-Confidence Interval
-Effect Size
• Two independent samples: Between-Subject Designs
-Hypothesis test
-Confidence interval
-Effect Size
Comparing Two Populations
Until this point, all the inferential statistics we have considered
involve using one sample as the basis for drawing conclusion
about one population.
Although these single sample techniques are used occasionally in
real research, most research studies aim to compare of two (or
more) sets of data in order to make inferences about the
differences between two (or more) populations.
What do we do when our research question concerns a mean
difference between two sets of data?
Two kinds of studies
There are two general research strategies that can be used to
obtain the two sets of data to be compared:
1. The two sets of data could come from two independent
populations (e.g. women and men, or students from
<- between-subjects design
section A and from section B)
2. The two sets of data could come from related
populations (e.g. “before treatment” and “after
treatment”) <- within-subjects design
Part I
• Two paired samples: Within-Subject Designs
-Hypothesis test
-Confidence Interval
-Effect Size
Paired T-Test for Within-Subjects Designs
Our hypotheses:
Ho: D = 0
HA: D 0
To test the null hypothesis, we’ll again compute a t
statistic and look it up in the t table.
Paired Samples t
t = D - D
sD
s
sD =
n
Steps for Calculating a Test Statistic
Paired Samples T
1. Calculate difference scores
2. Calculate D
3. Calculate sd
4. Calculate T and d.f.
5. Use Table E.6
Confidence Intervals for Paired Samples
General formula
X t (SE)
Paired Samples t
D t (sD)
Effect Size for Dependent Samples
One Sample d
X H0
ˆ
d
s
Paired Samples d
D
ˆ
d
sD
Exercise
In Everitt’s study (1994), 17 girls being treated for
anorexia were weighed before and after treatment.
Difference scores were calculated for each participant.
Change in Weight
n = 17
D = 7.26
sD = 7.16
Test the null hypothesis that there was no change in weight.
Compute a 95% confidence interval for the mean difference.
Calculate the effect size
Change in Weight
n = 17
D = 7.26
sD = 7.16
T-test
Exercise
SE
7.16
1.74
17
7.26 0
t (16)
4.17
1.74
p .01
Change in Weight
n = 17
D = 7.26
sD = 7.16
Confidence
Interval
Exercise
tcrit 2.12
CI 7.26 2.12(1.74)
(3.57,10.95)
Change in Weight
n = 17
D = 7.26
sD = 7.16
Exercise
Effect Size
7.26
d
7.16
d 1.01
Part II
• Two independent samples: Between-Subject Designs
-Hypothesis test
-Confidence Interval
-Effect Size
T-Test for Independent Samples
The goal of a between-subjects research study is to evaluate
the mean difference between two populations (or between
two treatment conditions).
We can’t compute difference scores, so …
Ho: 1 = 2
HA: 1 2
T-Test for Independent Samples
We can re-write these hypotheses as follows:
Ho: 1 - 2 = 0
HA: 1 - 2 0
To test the null hypothesis, we’ll again compute a t
statistic and look it up in the t table.
T-Test for Independent Samples
General t formula
t = sample statistic - hypothesized population parameter
estimated standard error
One Sample t
ttest
X H0
sX
Independent samples t
t
( X 1 X 2 ) ( 1 2 )
s X1 X 2
s X1 X 2 ?
T-Test for Independent Samples
Standard Error for a Difference in Means
s X1 X 2
The single-sample standard error ( sx ) measures how
much error expected between X and .
The independent-samples standard error (sx1-x2)
measures how much error is expected when you are
using a sample mean difference (X1 – X2) to represent a
population mean difference.
T-Test for Independent Samples
Standard Error for a Difference in Means
s X1 X 2
s12 s22
n1 n2
Each of the two sample means represents its own population mean, but
in each case there is some error.
The amount of error associated with each sample mean can be measured
by computing the standard errors.
To calculate the total amount of error involved in using two sample
means to approximate two population means, we will find the error from
each sample separately and then add the two errors together.
T-Test for Independent Samples
Standard Error for a Difference in Means
s X1 X 2
s12 s22
n1 n2
But…
This formula only works when n1 = n2. When the two
samples are different sizes, this formula is biased.
This comes from the fact that the formula above treats the
two sample variances equally. But we know that the
statistics obtained from large samples are better estimates,
so we need to give larger sample more weight in our
estimated standard error.
T-Test for Independent Samples
Standard Error for a Difference in Means
s X1 X 2
s
2
p
n1
s
2
p
n2
We are going to change the formula slightly so that we use
the pooled sample variance instead of the individual sample
variances.
This pooled variance is going to be a weighted estimate of
the variance derived from the two samples.
SS1 SS2
s
df1 df 2
2
p
Steps for Calculating a Test Statistic
One-Sample T
1. Calculate sample mean
2. Calculate standard error
3. Calculate T and d.f.
4. Use Table D
Steps for Calculating a Test Statistic
Independent Samples T
1. Calculate X1-X2
2
p
2
p
s
s
n1 n2
2. Calculate pooled variance
s2p
SS1 SS2
df1 df 2
3. Calculate standard error
4. Calculate T and d.f.
5. Use Table E.6
t
(X1 X 2 ) (1 2 )
sx1 x2
d.f. = (n1 - 1) + (n2 - 1)
Illustration
A developmental psychologist would like to examine the
difference in verbal skills for 8-year-old boys versus 8year-old girls. A sample of 10 boys and 10 girls is
obtained, and each child is given a standardized verbal
abilities test. The data for this experiment are as follows:
Girls
n1 = 10
X1 = 37
SS1 = 150
Boys
n2 = 10
X 2 = 31
SS2 = 210
Girls
n1 = 10
X1 = 37
SS1 = 150
Boys
Illustration
n2 = 10
X 2 = 31
SS2 = 210
STEP 1: get mean difference
X1 X 2 6
Boys
Girls
n1 = 10
X1 = 37
SS1 = 150
Illustration
n2 = 10
X 2 = 31
SS2 = 210
STEP 2: Compute Pooled Variance
SS1 SS2
150 210
360
s
20
df1 df 2 (10 1) (10 1) 18
2
p
Boys
Girls
n1 = 10
X1 = 37
SS1 = 150
Illustration
n2 = 10
X 2 = 31
SS2 = 210
STEP 3: Compute Standard Error
s2p s2p
20 20
SE
4 2
n1 n2
10 10
Boys
Girls
n1 = 10
X1 = 37
SS1 = 150
Illustration
n2 = 10
X 2 = 31
SS2 = 210
STEP 4: Compute T statistic and df
(X1 X 2 ) (1 2 ) (37 31) 0
t
3
sx1 x2
2
d.f. = (n1 - 1) + (n2 - 1) = (10-1) + (10-1) = 18
Girls
n1 = 10
X1 = 37
SS1 = 150
Boys
Illustration
n2 = 10
X 2 = 31
SS2 = 210
STEP 5: Use table E.6
T = 3 with 18 degrees of freedom
For alpha = .01, critical value of t is 2.878
Our T is more extreme, so we reject the null
There is a significant difference between boys and girls
T-Test for Independent Samples
Sample Hypothesized
Population
Data
Parameter
Single
sample
t-statistic
X
Independent
X1 X 2
samples
t-statistic
1 2
Sample
Variance
SS
s
df
2
SS SS2
s 1
df1 df 2
2
p
Estimated
Standard
Error
t-statistic
X
t
sx
s2
n
s2p s2p
n1 n2
t
(X1 X 2 ) (1 2 )
sx1 x2
Confidence Intervals for Independent Samples
General formula
X t (SE)
One Sample t
X t (sx)
Independent Sample t
(X1-X2) t (sx1-x2)
Effect Size for Independent Samples
One Sample d
X H0
ˆ
d
s
Independent Samples d
X1 X 2
ˆ
d
sp
Exercise
Subjects are asked to memorize 40 noun pairs. Ten subjects
are given a heuristic to help them memorize the list, the
remaining ten subjects serve as the control and are given no
help. The ten experimental subjects have a X-bar = 21 and a
SS = 100. The ten control subjects have a X-bar = 19 and a SS
= 120.
Test the hypothesis that the experimental group differs from
the control group.
Give a 95% confidence interval for the difference between
groups
Give the effect size
Experimental
Control
n1 = 10
X1 = 21
SS1 = 100
Exercise
n2 = 10
X 2 = 19
SS2 = 120
T-test
X1 X 2 2
SS1 SS 2
100 120
220
s
12.2
df1 df 2 (10 1) (10 1) 18
2
p
SE
s 2p
n1
s 2p
n2
12.2 12.2
2.44 1.56
10
10
Experimental
n1 = 10
X1 = 21
SS1 = 100
T-test
Control
Exercise
n2 = 10
X 2 = 19
SS2 = 120
( X 1 X 2 ) ( 1 2 ) 2 0
t
1.28
s x1 x2
1.56
d.f. = (n1 - 1) + (n2 - 1) = (10-1) + (10-1) = 18
p .20
Experimental
n1 = 10
X1 = 21
SS1 = 100
Confidence
Interval
Control
Exercise
n2 = 10
X 2 = 19
SS2 = 120
tcrit 2.101
CI 2 2.101(1.56)
(1.28,5.28)
Experimental
n1 = 10
X1 = 21
SS1 = 100
Effect Size
Control
Exercise
n2 = 10
X 2 = 19
SS2 = 120
X1 X 2
d
sp
2
d
12.2
d .57
Summary
Hypothesis Tests
1 Sample
Confidence Intervals
2 Paired Samples
Effect Sizes
2 Independent Samples
Review
Sample Hypothesized
Population
Data
Sample
Variance
Parameter
One sample
t-statistic
Paired
samples tstatistic
X
D
Independent
samples
X1 X 2
t-statistic
Estimated
Standard
Error
SS
s
df
s2
n
D
SS
s D
df
s2
n
1 2
2
2
SS SS2
s 1
df1 df 2
2
p
t-statistic
t
X
sx
D D
t
sD
s2p s2p
n1 n2
t
(X1 X 2 ) (1 2 )
sx1 x2
Confidence Intervals
One Sample t
X t (SE)
Paired Samples t
D t (sD)
Independent Sample t
(X1-X2) t (sx1-x2)
Effect Sizes
One Sample d
X H0
ˆ
d
s
Paired Samples d
D
ˆ
d
sD
Independent Samples d
X1 X 2
ˆ
d
sp