Statistics for the Social Sciences Psychology 340 Spring 2005 Prediction.
Using t-tests (related samples) Statistics for the Social Sciences Psychology 340 Spring 2010.
-
Upload
lamar-major -
Category
Documents
-
view
222 -
download
0
Transcript of Using t-tests (related samples) Statistics for the Social Sciences Psychology 340 Spring 2010.
Using t-tests (related samples)
Statistics for the Social SciencesPsychology 340
Spring 2010
PSY 340Statistics for the
Social Sciences t Test for Dependent Means
• Unknown population mean and variance– More realistic, these designs are commonly found in
research,
– Based on having two related groups of observations• Two situations
– One sample, two scores for each person
» Repeated measures design
– Two samples, but individuals in the samples are related
» Related samples, Dependent samples, matched samples
PSY 340Statistics for the
Social Sciences
Statistical analysis follows design
• The related-samples t-test can be used when:– 1 sample
– Two scores per subject
t =D−μD
sD
PSY 340Statistics for the
Social Sciences
participants Pre-test Post-test TestTest
2-levels, All of the participants are in both levels of the IV
levelslevels
Sometimes called “repeated measures” design
Within-Groups Factor
Memory patients before getting the treatment
Memory patients after getting the treatment
PSY 340Statistics for the
Social Sciences
Statistical analysis follows design
• The related-samples t-test can be used when:– 1 sample
– Two scores per subject
– 2 samples
– Scores are related
- OR -
t =D−μD
sD
PSY 340Statistics for the
Social Sciences Matching groups
Group A Group B• Matched groups
– Trying to create equivalent groups
– Also trying to reduce some of the overall variability
• Eliminating variability from the variables that you matched people on
RedShort21yrs
Bluetall
23yrs
Greenaverage22yrs
Browntall
22yrs
ColorHeight
Age
matchedRedShort21yrs
matched Bluetall
23yrs
matchedGreenaverage22yrs
matchedBrown
tall22yrs
PSY 340Statistics for the
Social Sciences Testing Hypotheses
– Step 1: State your hypotheses
– Step 2: Set your decision criteria
– Step 3: Collect your data
– Step 4: Compute your test statistics • Compute your estimated standard error
• Compute your t-statistic
• Compute your degrees of freedom
– Step 5: Make a decision about your null hypothesis
• Hypothesis testing: a five step program
Very similar to one sample t-test from earlier
t =D−μD
sD
PSY 340Statistics for the
Social Sciences Performing your statistical test
• What are we doing when we test the hypotheses?– Computing a test statistic: Generic test
€
test statistic =observed difference
difference expected by chance
Could be difference between a sample and a population, or between different samples
Based on standard error or an estimate of the standard error
Compares the differences between groups of related observations to the difference expected by the null hypothesis
Because the groups of observations come from same individuals or matched individuals, the variability is typically reduced
t =D−μD
sD
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
€
sD
=sD
nD
Diff. Expected by chance
Estimated standard error of the differences
€
df = nD −1
Test statistic
€
t =D − μ
D
sD
What are all of these “D’s” referring to?
Mean of the differences
Number of difference scores
• Difference scores
– For each person, subtract one score from the other
– Carry out hypothesis testing with the difference scores
• H0 Population of difference scores has a mean = 0
PSY 340Statistics for the
Social Sciences Comparing t-tests
€
test statistic =observed difference
difference expected by chance
€
t =(X A − X B ) − (μA − μB )
sX A −X B
€
t =X − μ
X
sX
One-sample tIndependent-samples t
Observed (sample) means
Related samples t
€
t =D − μ
D
sD
Difference between Observed (sample) means
PSY 340Statistics for the
Social Sciences Comparing t-tests
€
test statistic =observed difference
difference expected by chance
€
t =(X A − X B ) − (μA − μB )
sX A −X B
€
t =X − μ
X
sX
One-sample tIndependent-samples t Related samples t
€
t =D − μ
D
sD
Hypothesized population means• from the Null hypothesis
Hypothesized difference betweenPopulation means
• from the Null hypothesis
PSY 340Statistics for the
Social Sciences Comparing t-tests
€
test statistic =observed difference
difference expected by chance
€
t =(X A − X B ) − (μA − μB )
sX A −X B
€
t =X − μ
X
sX
One-sample tIndependent-samples t Related samples t
€
t =D − μ
D
sD
Hypothesized difference betweenPopulation means
• from the Null hypothesisH0: Memory performance by the treatment group is equal to memory
performance by the no treatment group.
So: (μA −μB) =0
PSY 340Statistics for the
Social Sciences Comparing t-tests
€
test statistic =observed difference
difference expected by chance
€
t =(X A − X B ) − (μA − μB )
sX A −X B
€
t =X − μ
X
sX
One-sample tIndependent-samples t Related samples t
€
t =D − μ
D
sD
Hypothesized difference betweenPopulation means
• from the Null hypothesisH0: Memory performance by the treatment group is equal to memory
performance by the no treatment group.
So: (μA −μB) =0
Hypothesized population means• from the Null hypothesis
€
t =(X A − X B ) − (μA − μB )
sX A −X B
t =D−μD
sD
The numerator’s of both the independent samples and related samples t-tests are numerically identical. I’ve used notational differences to illustrate that one is based on two sets of observations (from the two samples), while the other is based on difference scores.
= 0= 0
Is equal to
The major difference between the two tests comes from how the estimated standard errors are computed.
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
Differencescores
2
65
9
22 €
t =D − μ
D
sD
Person Pre-test Post-test
1
23
4
45
5540
60
43
4935
51
(Pre-test) - (Post-test)
H0: There is no difference between pre-test and post-test
HA: There is a difference between pre-test and post-test
μD = 0
μD ≠ 0
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
Differencescores
2
65
9
22= 5.5
€
t =D − μ
D
sD
Person Pre-test Post-test
1
23
4
45
5540
60
43
4935
51
€
nD = 4
(Pre-test) - (Post-test)
D∑nD
=D
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
Person Pre-test Post-testDifferencescores
1
23
4
45
5540
60
43
4935
51
2
65
9
22D = 5.5
€
t =D − μ
D
sD D
D
s
μ−=
5.5
€
nD = 4
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
PersonDifference
scores
1
23
4
Pre-test Post-test
45
5540
60
43
4935
51
2
65
9
22D = 5.5
€
sD
=sD
nD
€
t =D − μ
D
sD
-3.5- 5.5 =
0.5- 5.5 =-0.5- 5.5 =
3.5- 5.5 =
12.25
0.250.25
12.25
25 = SSD
D - D (D - D)2
€
sD =SSD
nD −19.2
14
25=
−=
D
D
s
μ−=
5.5
€
nD = 4
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
Person
1
23
4
Pre-test Post-test
45
5540
60
43
4935
51
2
65
9
22D = 5.5
€
sD
=sD
nD
€
t =D − μ
D
sD
25 = SSD
(D - D)2
€
sD =SSD
nD −19.2
14
25=
−=
D
D
s
μ−=
5.5 -3.5
0.5-0.5
3.5
D - DDifference
scores
12.25
0.250.25
12.25
€
nD = 4
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
Person
1
23
4
Pre-test Post-test
45
5540
60
43
4935
51
2
65
9
22D = 5.5
€
t =D − μ
D
sD
25 = SSD
(D - D)2
€
sD
=sD
nD
45.14
9.2==
2.9 = sD
D
D
s
μ−=
5.5 -3.5
0.5-0.5
3.5
D - DDifference
scores
12.25
0.250.25
12.25
€
nD = 4
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
Person
1
23
4
Pre-test Post-test
45
5540
60
43
4935
51
2
65
9
22D = 5.5
€
t =D − μ
D
sD
25 = SSD
(D - D)2
2.9 = sD
45.1
5.5 Dμ−=
1.45 = sD
?Think back to the null hypotheses
-3.5
0.5-0.5
3.5
D - DDifference
scores
12.25
0.250.25
12.25
€
nD = 4
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
Person
1
23
4
Pre-test Post-test
45
5540
60
43
4935
51
2
65
9
22D = 5.5
€
t =D − μ
D
sD
25 = SSD
(D - D)2
2.9 = sD
45.1
5.5 Dμ−=
1.45 = sD
H0: Memory performance at the post-test are equal to memory performance at the pre-test.
€
μD
= 0
-3.5
0.5-0.5
3.5
D - DDifference
scores
12.25
0.250.25
12.25
€
nD = 4
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
Person
1
23
4
Pre-test Post-test
45
5540
60
43
4935
51
2
65
9
22D = 5.5
€
t =D − μ
D
sD
25 = SSD
(D - D)2
2.9 = sD
45.1
05.5 −=
1.45 = sD
8.3=This is our tobs
-3.5
0.5-0.5
3.5
D - DDifference
scores
12.25
0.250.25
12.25
€
nD = 4
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
Person
1
23
4
Pre-test Post-test
45
5540
60
43
4935
51
2
65
9
22D = 5.5
€
t =D − μ
D
sD
25 = SSD
(D - D)2
2.9 = sD
45.1
05.5 −=
1.45 = sD
8.3=tobs
Proportion in one tail0.10 0.05 0.025 0.01 0.005
Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.604
α= 0.05 Two-tailed tcrit
€
df = nD −1
=±3.18
-3.5
0.5-0.5
3.5
D - DDifference
scores
12.25
0.250.25
12.25
€
nD = 4
PSY 340Statistics for the
Social Sciences
+3.18 = tcrit
- Reject H0
Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
Person
1
23
4
Pre-test Post-test
45
5540
60
43
4935
51
2
65
9
22D = 5.5
€
t =D − μ
D
sD
25 = SSD
(D - D)2
2.9 = sD
45.1
05.5 −=
1.45 = sD
8.3=tobsα= 0.05 Two-tailed tcrit
€
df = nD −1
=±3.18
-3.5
0.5-0.5
3.5
D - DDifference
scores
12.25
0.250.25
12.25
€
nD = 4 tobs=3.8
PSY 340Statistics for the
Social Sciences Performing your statistical test
€
test statistic =observed difference
difference expected by chance
What are all of these “D’s” referring to?
Person
1
23
4
Pre-test Post-test
45
5540
60
43
4935
51
2
65
9
22D = 5.5
€
t =D − μ
D
sD
25 = SSD
(D - D)2
2.9 = sD
45.1
05.5 −=
1.45 = sD
8.3=tobsα= 0.05 Two-tailed tcrit
€
df = nD −1
=±3.18
Tobs > tcrit so we reject the H0
-3.5
0.5-0.5
3.5
D - DDifference
scores
12.25
0.250.25
12.25
€
nD = 4
PSY 340Statistics for the
Social Sciences Statistical Tests Summary
Design Statistical test (Estimated) Standard error
t =(XA −XB)−(μA −μB)
sXA −XB
sXA −XB=
sP2
nA
+sP2
nB€
sD
=sD
nD
t =D−μD
sD
sX =sn
t =X−μX
sX
zX =X−μX
σ X
σ X =σ
nOne sample, σ known
One sample, σ unknown
Two related samples, σ unknown
Two independent samples, σ unknown
PSY 340Statistics for the
Social Sciences
Effect Sizes & Power for t Test for Dependent Means
d =μ1 −μ2
σD
estimated d =D−0sD
Remember we don’t know these
7-11
PSY 340Statistics for the
Social Sciences
Approximate Sample Size Needed for 80% Power (.05 significance level)
• Using Power and effect sizes to determine how many participants you need
7-12
PSY 340Statistics for the
Social Sciences Using SPSS: Related samples t
• Entering the data– Different groups of observations go
into separate columns• e.g., pre-test in one column, post-test in a
separate column
Person Pre-test Post-test
1
23
4
45
5540
60
43
4935
51
• Performing the analysis– Analyze -> Compare means -> paired samples t-test
– Identify which columns are the related samples of obs
• Reading the output– Means of the different groups, the mean difference, the
computed-t, degrees of freedom, p-value (Sig.)