Statistics for the Social Sciences - the Department of Psychology at
Download
Report
Transcript Statistics for the Social Sciences - the Department of Psychology at
Statistics for the Social Sciences
Psychology 340
Spring 2010
Using t-tests (independent samples)
PSY 340
Statistics for the
Social Sciences
Statistical analysis
follows design
• The one-sample t-test
can be used when:
– 1 sample
– One score per subject
– Population mean (μ)
is known
– but Population
standard deviation (σ)
is NOT known
X X
t
sX
PSY 340
Statistics for the
Social Sciences
Independent samples
• What are we doing when we test the hypotheses?
– Consider a new variation of our memory experiment example
Memory
placebo
Memory
patients
Memory
treatment
Memory
Test
XB
Memory
Test
Compare these
two means
XA
H0: • the memory treatment sample are the same as those in the population
of memory patients.
HA: • they aren’t the same as those in the population of memory patients
PSY 340
Statistics for the
Social Sciences
Statistical analysis
follows design
• The independent
samples t-test can be
used when:
– 2 samples
– Samples are
independent
(X A X B ) (A B )
t
sX A X B
PSY 340
Statistics for the
Social Sciences
Performing your statistical test
test statistic
observed difference
difference expected by chance
Independent-samples t
Test statistic
One-sample t
(X A X B ) (A B )
t
sX A X B
X X
t
sX
Observed (sample) means
PSY 340
Statistics for the
Social Sciences
Performing your statistical test
test statistic
observed difference
difference expected by chance
Independent-samples t
Test statistic
One-sample t
(X A X B ) (A B )
t
sX A X B
X X
t
sX
Hypothesized population means
• from the Null hypothesis
PSY 340
Performing your statistical test
Statistics for the
Social Sciences
test statistic
observed difference
difference expected by chance
Independent-samples t
Test statistic
One-sample t
(X A X B ) (A B )
t
sX A X B
X X
t
sX
Hypothesized population means
• from the Null hypothesis
H0: Memory performance by the treatment group is equal to memory
performance by the no treatment group.
So:
( A B ) 0
PSY 340
Statistics for the
Social Sciences
Performing your statistical test
test statistic
observed difference
difference expected by chance
One-sample t
Test statistic
(X A X B ) (A B )
t
sX A X B
X X
t
sX
We have two samples,
so the estimate is based
on two samples
Estimated standard
error
(difference expected by chance)
The Estimate of the Standard Error
is based on the variability of both
samples
estimate is based
on one sample
PSY 340
Statistics for the
Social Sciences
Performing your statistical test
“pooled variance”
sX A X B
s
2
p
nA
Number of
subjects in
group A
s
We combine the
variance from the
two samples
2
p
nB
Number of
subjects in
group B
PSY 340
Statistics for the
Social Sciences
Performing your statistical test
“pooled variance”
We combine the
variance from the
two samples
Recall “weighted means,”
need to use
“weighted variances” here
Variance (s2) * degrees of freedom (df)
sX A X B
s
2
p
nA
s
2
p
nB
s 2p
s df s df
2
A
A
dfA dfB
SSA SSB
s
df A df B
2
p
2
B
B
dfA (nA 1)
dfB (nB 1)
variance
s 2 df SS
s2
SS
n 1
s 2 (n 1) SS
PSY 340
Statistics for the
Social Sciences
Performing your statistical test
Independent-samples t
• Compute your estimated standard error
sX A X B
s
2
p
nA
s
2
p
nB
• Compute your t-statistic
s 2p
s df s df
2
A
A
dfA dfB
SSA SSB
s
df A df B
2
p
(X A X B ) (A B )
sX A X B
• Compute your degrees of freedom
t
This is the one you use
to look up your tcrit
2
B
dfA (nA 1)
dfB (nB 1)
df nA nB 2 (nA 1) (nB 1)
B
PSY 340
Performing your statistical test
Statistics for the
Social Sciences
Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain
what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples.
He then gives one sample the new treatment but not the other. Following the treatment period he
gives both groups a memory test. The data are presented below. Use α = 0.05.
Control
group
Exp.
group
45
55
40
60
43
49
35
51
Need to compute the mean and variability for each sample
PSY 340
Performing your statistical test
Statistics for the
Social Sciences
Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain
what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples.
He then gives one sample the new treatment but not the other. Following the treatment period he
gives both groups a memory test. The data are presented below. Use α = 0.05.
Control
group
Exp.
group
45
55
40
60
43
49
35
51
XA 50
SSA 250
Need to compute the mean and variability for each sample
Control group
45 55 40 60
XA
= 50
4
SSA= (45-50)2 + (55-50)2 + (40-50)2 + (60-50)2
= 250
PSY 340
Performing your statistical test
Statistics for the
Social Sciences
Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain
what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples.
He then gives one sample the new treatment but not the other. Following the treatment period he
gives both groups a memory test. The data are presented below. Use α = 0.05.
Control
group
Exp.
group
45
55
40
60
43
49
35
51
XA 50 XB 44.5
SSA 250 SSB 155
Need to compute the mean and variability for each sample
Exp. group
43 49 35 51
XB
= 44.5
4
SSB= (43-44.5)2 + (49- 44.5)2 + (35- 44.5)2 + (51- 44.5)2
= 155
PSY 340
Performing your statistical test
Statistics for the
Social Sciences
Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain
what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples.
He then gives one sample the new treatment but not the other. Following the treatment period he
gives both groups a memory test. The data are presented below. Use α = 0.05.
Control
group
45
55
40
60
Exp.
group
43
49
35
51
XA 50 XB 44.5
SSA 250 SSB 155
df A (nA 1) df B (n
B 1)
t
(X A X B ) (A B ) (50 44.5) (0)
= 0.95
5.81
sX A X B
sX A X B
s2p
nA
s2p
nB
67.5 67.5
5.81
4
4
SSA SSB 250 155
s
67.5
df A df B
3 3
2
p
PSY 340
Performing your statistical test
Statistics for the
Social Sciences
Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain
what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples.
He then gives one sample the new treatment but not the other. Following the treatment period he
gives both groups a memory test. The data are presented below. Use α = 0.05.
Control
group
45
55
40
60
Exp.
group
t
(X A X B ) (A B ) (50 44.5) (0)
= 0.95
5.81
sX A X B
43
s2p 67.5
49
sX A X B 5.81
35
51
X 44.5
XA 50
B
SSA 250 SSB 155
df A (nA 1) df B (nB 1)
df nA nB 2 6
α = 0.05 Two-tailed
0.10
df
:
5
6
:
0.20
:
1,476
1.440
:
Tobs= 0.95
Tcrit= ±2.447
Proportion in one tail
0.05
0.025
Proportion in two tails
0.10
0.05
:
:
2.015
2.571
1.943
2.447
:
:
0.01
0.005
0.02
:
3.365
3.143
:
0.01
:
4.032
3.707
:
PSY 340
Performing your statistical test
Statistics for the
Social Sciences
Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain
what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples.
He then gives one sample the new treatment but not the other. Following the treatment period he
gives both groups a memory test. The data are presented below. Use α = 0.05.
Control
group
45
55
40
60
Exp.
group
t
(X A X B ) (A B ) (50 44.5) (0)
= 0.95
5.81
sX A X B
43
s2p 67.5
49
sX A X B 5.81
35
51
X 44.5
XA 50
B
SSA 250 SSB 155
df A (nA 1) df B (nB 1)
df nA nB 2 6
α = 0.05 Two-tailed
- Fail to
Reject H0
Tobs= 0.95
Tcrit= ±2.447
tobs=0.95
+2.45 = tcrit
PSY 340
Statistics for the
Social Sciences
Assumptions: Independent samples t
• Each of the population distributions follows a
normal curve (this is an assumption of all t-tests)
– T-tests are fairly ‘robust’ against this assumption
• This means that the results generally still hold even if this
assumption is violated
• Homogeneity of variance: The two populations
have the same variance
– SPSS tests this using Levene’s Test
• Two rows in the SPSS output
– Us the top row if the p-value for the Levene’s test is greater than 0.05
– Use the bottom row if the p-value for the Levene’s test is less than 0.05
• Tests the Null hypothesis that the two groups have equal
variances
PSY 340
Statistics for the
Social Sciences
Effect Size for the t Test for Independent Means
• Estimated effect size after a completed study
X1 X2
Estimated d
sPooled
“pooled standard deviation”
not “pooled variance,” so take the square root of sP2
PSY 340
Statistics for the
Social Sciences
Power for the t Test for Independent
Means (.05 significance level)
8-5
8-4
PSY 340
Statistics for the
Social Sciences
Approximate Sample Size Needed for
80% Power (.05 significance level)
8-5
PSY 340
Statistics for the
Social Sciences
Statistical Tests Summary
Design
(Estimated) Standard error
Statistical test
X X
X
One sample, σ
known
zX
One sample, σ
unknown
X X
t
sX
Two related
samples, σ
unknown
D D
t
sD
Two independent
samples, σ
unknown
(X A X B ) ( A B )
s XA XB
t
X
n
s
sX
n
Next time
sD
sD
nD
sXA XB
sP2 sP2
nA nB
PSY 340
Statistics for the
Social Sciences
Using SPSS: Independent samples t
• Entering the data
Person Cntrl-grp Exp-grp
1
45
43
2
55
49
3
40
35
• e.g., Exp grp and control grp in a single
column
4
60
51
– Separate column defines the group membership for each observation
– Different groups of observations go into
SAME column
– e.g., exp grp = 0, control grp = 1
• Performing the analysis
– Analyze -> Compare means -> independent samples t-test
– Identify which columns have the observations (test variable) and
which column has the group membership defined (grouping variable)
– Define groups: what numbers correspond to the two groups?
• Reading the output
– Means of the different groups, the mean difference, the computed-t,
degrees of freedom, p-value (Sig.), Levene’s test