What if. . . .
• The two samples have different sample sizes (n)
Results
Psychology
110
150
140
135
Sociology
90
95
80
98
Results
Psychology
110
150
140
135
Sociology
90
95
80
If samples have unequal n
• All the steps are the same!
• Only difference is in calculating the Standard Error of a Difference
Standard Error of a Difference
When the N of both samples is equal
If N1 = N2:
Sx1 - x2 =
Standard Error of a Difference
When the N of both samples is not equal
If N1 = N2:
N1 + N2 - 2
Results
Psychology
110
150
140
135
Sociology
90
95
80
X1= 535
X12=
72425
N1 = 4
X2= 265
X22=
23525
N2 = 3
N1 + N2 - 2
X1= 535
X12=
72425
N1 = 4
X2= 265
X22=
23525
N2 = 3
N1 + N2 - 2
X1= 535
X12=
72425
N1 = 4
X2= 265
X22=
23525
N2 = 3
535 265
N1 + N2 - 2
X1= 535
X12=
72425
N1 = 4
X2= 265
X22=
23525
N2 = 3
535 26572425 23525
4 + 3 - 2
X1= 535
X12=
72425
N1 = 4
X2= 265
X22=
23525
N2 = 3
535 26572425 23525
4 34 3
5
X1= 535
X12=
72425
N1 = 4
X2= 265
X22=
23525
N2 = 3
535 26572425 23525
4 34 3
71556.25 23408.33
.25+.33
5
X1= 535
X12=
72425
N1 = 4
X2= 265
X22=
23525
N2 = 3
535 26572425 23525
4 34 3
71556.25 23408.33
.25+.33197.08 (.58)
5
X1= 535
X12=
72425
N1 = 4
X2= 265
X22=
23525
N2 = 3
535 26572425 23525
4 34 3
71556.25 23408.33
.25+.33114.31
= 10.69
Practice• I think it is colder in Philadelphia than in
Anaheim ( = .10).
• To test this, I got temperatures from these two places on the Internet.
Results
Philadelphia
52
53
54
61
55
Anaheim
77
75
67
Hypotheses
• Alternative hypothesis– H1: Philadelphia < Anaheim
• Null hypothesis– H0: Philadelphia = or > Anaheim
Step 2: Calculate the Critical t
• df = N1 + N2 - 2
• df = 5 + 3 - 2 = 6 = .10
• One-tailed
• t critical = - 1.44
Step 3: Draw Critical Region
tcrit = -1.44
NowStep 4: Calculate t observed
tobs = (X1 - X2) / Sx1 - x2
6
X1= 275
X12=
15175
N1 = 5
X1 = 55
X2= 219
X22=
16043
N2 = 3
X2 = 73
275 21915175 16043
5 35 3
15125 15987.2 + .33
= 3.05
Step 4: Calculate t observed
-5.90 = (55 - 73) / 3.05
Sx1 - x2 = 3.05X1 = 55
X2 = 73
Step 5: See if tobs falls in the critical region
tcrit = -1.44
tobs = -5.90
Step 6: Decision
• If tobs falls in the critical region:
– Reject H0, and accept H1
• If tobs does not fall in the critical region:
– Fail to reject H0
Step 7: Put answer into words
• We Reject H0, and accept H1
• Philadelphia is significantly ( = .10) colder than Anaheim.
SPSS
5 55.0000 3.5355 1.5811
3 73.0000 5.2915 3.0551
PHILLY1.00
.00
TEMPN Mean
Std.Deviation
Std. ErrorMean
Group Statistics
.986 .359 -5.864 6 .001 -18.0000 3.0696 -25.5110 -10.4890
-5.233 3.104 .012 -18.0000 3.4400 -28.7437 -7.2563
Equalvariancesassumed
Equalvariancesnotassumed
TEMPF Sig.
Levene's Test forEquality of Variances
t dfSig.
(2-tailed)Mean
DifferenceStd. ErrorDifference Lower Upper
95% ConfidenceInterval of the Mean
t-test for Equality of Means
Independent Samples Test
So far. . . .
• We have been doing independent samples designs
• The observations in one group were not linked to the observations in the other group
Example
Philadelphia
52
53
54
61
55
Anaheim
77
75
67
Matched Samples Design
• This can happen with:– Natural pairs– Matched pairs– Repeated measures
Natural Pairs
The pairing of two subjects occurs naturally (e.g., twins)
Psychology (X) Sociology (Y)
Joe Smith 100 Bob Smith 90
Al Wells 110 Bill Wells 89
Jay Jones 105 Mike Jones 86
Matched Pairs
When people are matched on some variable (e.g., age)
Psychology (X) Sociology (Y)
Joe (20) 100 Bob (20) 90
Al (25) 110 Bill (25) 89
Jay (30) 105 Mike (30) 86
Repeated Measures
The same participant is in both conditions
Psychology (X) Sociology (Y)
Joe 100 Joe 90
Al 110 Al 89
Jay 105 Jay 86
Matched Samples Design
• In this type of design you label one level of the variable X and the other Y
• There is a logical reason for paring the X value and the Y value
Matched Samples Design
• The logic and testing of this type of design is VERY similar to what you have already done!
Example• You just invented a “magic math pill” that
will increase test scores.
• On the day of the first test you give the pill to 4 subjects. When these same subjects take the second test they do not get a pill
• Did the pill increase their test scores?
HypothesisOne-tailed
• Alternative hypothesis– H1: pill > nopill
– In other words, when the subjects got the pill they had higher math scores than when they did not get the pill
• Null hypothesis– H0: pill < or = nopill
– In other words, when the subjects got the pill their math scores were lower or equal to the scores they got when they did not take the pill
Results
Test 1 w/ Pill (X)
Mel 3
Alice 5
Vera 4
Flo 3
Test 2 w/o Pill (Y)
1
3
2
2
Step 2: Calculate the Critical t
• N = Number of pairs
• df = N - 1
• 4 - 1 = 3 = .05
• t critical = 2.353
Step 3: Draw Critical Region
tcrit = 2.353
Step 4: Calculate t observed
tobs = (X - Y) / SD
Step 4: Calculate t observed
tobs = (X - Y) / SD
Step 4: Calculate t observed
tobs = (X - Y) / SD
X = 3.75
Y = 2.00
Step 4: Calculate t observed
tobs = (X - Y) / SD
Standard error of a difference
Step 4: Calculate t observed
tobs = (X - Y) / SD
SD = SD / N
N = number of pairs
S =
S =
Test 1 w/ Pill (X)
Mel 3
Alice 5
Vera 4
Flo 3
Test 2 w/o Pill (Y)
1
3
2
2
S =
Test 1 w/ Pill (X)
Mel 3
Alice 5
Vera 4
Flo 3
Test 2 w/o Pill (Y)
1
3
2
2
Difference (D)
2
2
2
1
S =
Test 1 w/ Pill (X)
Mel 3
Alice 5
Vera 4
Flo 3
Test 2 w/o Pill (Y)
1
3
2
2
Difference (D)
2
2
2
1
D = 7
D2 =13
N = 4
S =
Test 1 w/ Pill (X)
Mel 3
Alice 5
Vera 4
Flo 3
Test 2 w/o Pill (Y)
1
3
2
2
Difference (D)
2
2
2
1
D = 7
D2 =13
N = 4
7
S =
Test 1 w/ Pill (X)
Mel 3
Alice 5
Vera 4
Flo 3
Test 2 w/o Pill (Y)
1
3
2
2
Difference (D)
2
2
2
1
D = 7
D2 =13
N = 4
713
S =
Test 1 w/ Pill (X)
Mel 3
Alice 5
Vera 4
Flo 3
Test 2 w/o Pill (Y)
1
3
2
2
Difference (D)
2
2
2
1
D = 7
D2 =13
N = 4
713
4
4 - 1
S =
Test 1 w/ Pill (X)
Mel 3
Alice 5
Vera 4
Flo 3
Test 2 w/o Pill (Y)
1
3
2
2
Difference (D)
2
2
2
1
D = 7
D2 =13
N = 4
713
4
3
12.25
.5 =
Test 1 w/ Pill (X)
Mel 3
Alice 5
Vera 4
Flo 3
Test 2 w/o Pill (Y)
1
3
2
2
Difference (D)
2
2
2
1
D = 7
D2 =13
N = 4
7
4
3
.75
Step 4: Calculate t observed
tobs = (X - Y) / SD
SD = SD / N
N = number of pairs
Step 4: Calculate t observed
tobs = (X - Y) / SD
.25=.5 / 4
N = number of pairs
Step 4: Calculate t observed
7.0 = (3.75 - 2.00) / .25
Step 5: See if tobs falls in the critical region
tcrit = 2.353
Step 5: See if tobs falls in the critical region
tcrit = 2.353tobs = 7.0
Step 6: Decision
• If tobs falls in the critical region:
– Reject H0, and accept H1
• If tobs does not fall in the critical region:
– Fail to reject H0
Step 7: Put answer into words
• Reject H0, and accept H1
• When the subjects took the “magic pill” they received statistically ( = .05) higher math scores than when they did not get the pill
SPSS
3.7500 4 .9574 .4787
2.0000 4 .8165 .4082
TIME1
TIME2
Pair 1Mean N
Std.Deviation
Std. ErrorMean
Paired Samples Statistics
4 .853 .147TIME1 &TIME2
Pair 1N Correlation Sig.
Paired Samples Correlations
1.7500 .5000 .2500 .9544 2.5456 7.000 3 .006TIME1 -TIME2
Pair 1Mean
Std.Deviation
Std. ErrorMean Lower Upper
95% ConfidenceInterval of the Difference
Paired Differences
t dfSig.
(2-tailed)
Paired Samples Test
Practice• You just created a new program that is suppose
to lower the number of aggressive behaviors a child performs.
• You watched 6 children on a playground and recorded their aggressive behaviors. You gave your program to them. You then watched the same children and recorded this aggressive behaviors again.
Practice
• Did your program significantly lower ( = .05) the number of aggressive behaviors a child performed?
Results
Time 1 (X)
Child1 18
Child2 11
Child3 19
Child4 6
Child5 10
Child6 14
Time 2 (Y)
16
10
17
4
11
12
HypothesisOne-tailed
• Alternative hypothesis– H1: time1 > time2
• Null hypothesis– H0: time1 < or = time2
Step 2: Calculate the Critical t
• N = Number of pairs
• df = N - 1
• 6 - 1 = 5 = .05
• t critical = 2.015
Step 4: Calculate t observed
tobs = (X - Y) / SD
1.21 =
(D)
2
1
2
2
-1
2
D = 8
D2 =18
N = 6
818
6
6 - 1
Time 1 (X)
Child1 18
Child2 11
Child3 19
Child4 6
Child5 10
Child6 14
Test 2 (Y)
16
10
17
4
11
12
Step 4: Calculate t observed
tobs = (X - Y) / SD
.49=1.21 / 6
N = number of pairs
Step 4: Calculate t observed
2.73 = (13 - 11.66) / .49
X = 13
Y = 11.66
SD = .49
Step 5: See if tobs falls in the critical region
tcrit = 2.015tobs = 2.73
Step 6: Decision
• If tobs falls in the critical region:
– Reject H0, and accept H1
• If tobs does not fall in the critical region:
– Fail to reject H0
Step 7: Put answer into words
• Reject H0, and accept H1
• The program significantly ( = .05) lowered the number of aggressive behaviors a child performed.
SPSS
13.0000 6 4.9800 2.0331
11.6667 6 4.6762 1.9090
CTIME1
CTIME2
Pair 1Mean N
Std.Deviation
Std. ErrorMean
Paired Samples Statistics
6 .970 .001CTIME1& CTIME2
Pair 1N Correlation Sig.
Paired Samples Correlations
1.3333 1.2111 .4944 6.240E-02 2.6043 2.697 5 .043CTIME1 -CTIME2
Pair 1Mean
Std.Deviation
Std. ErrorMean Lower Upper
95% ConfidenceInterval of the Difference
Paired Differences
t dfSig.
(2-tailed)
Paired Samples Test
New Step
• Should add a new page
• Determine if – One-sample t-test– Two-sample t-test
• If it is a matched samples design
• If it is a independent samples with equal N
• If it is a independent samples with unequal N
Thus, there are 4 different kinds of designs
• Each design uses slightly different formulas
• You should probably make up ONE cook book page (with all 7 steps) for each type of design– Will help keep you from getting confused on a
test
Practice
• A research study was conducted to examine whether or not there were differences between older and younger adults on perceived life satisfaction. A pilot study was conducted to examine this hypothesis. Ten older adults (over the age of 70) and ten younger adults (between 20 and 30) were give a life satisfaction test (known to have high reliability and validity). Scores on the measure range from 0 to 60 with high scores indicative of high life satisfaction; low scores indicative of low life satisfaction.
• Older Adults= 44.5; S = 8.68; n = 10
• Younger Adults = 28.1; S = 8.54; n = 10
Practice
• Dr. Willard is studying the effects of a new drug (Drug-Y) on learning improvement following traumatic brain injury. To study this, Dr. Willard takes six rats and lesions a part of the brain responsible for learning. He puts each rat in a maze and counts the number of times it takes each rat to navigate through the maze without making a mistake. Dr. Willard then puts each rat on a regimen of Drug-Y for one week. After one week, he places each rat in a similar maze and counts the number of times it takes each rat to navigate through the maze without a mistake. Examine if Drug-Y had a positive impact on rats performance.
t Time 1 Time 2
Ben 28 24
Splinter 29 26
George 30 22
Jerry 33 30
Fievel 34 29
Patches 32 28
Practice
• A sample of ten 9th grades at James Woods High School can do an average of 11.5 pull-ups (chin-ups) in 30 seconds, with a sample standard deviation of s = 3 The US Department of Health and Human Services suggests that 9th grades be able to do a minimum of 9 pull-ups in 30 seconds, if not, they're watching too much Family Guy. Is this sample of 9th grades able to do significantly (alpha = .01) more pull-ups than the number recommended by the US Department of Health and Human Services?
• tobs = 4.257
• tcrit = 2.101
• There age is related to life satisfaction.
• t = (31 - 26.5)/0.764 = 4.500/0.764 = 5.890
• Because the obtained t-Value is larger that the critical t-Value, the mean difference between the number of maze navigation's at Time 1 and Time 2 is statistically significant. Thus, we can conclude that Drug-Y lead to a statistically significant decrease in the number of times it took rats to navigate through a maze without making a mistake.
• The obtained t-Value is (11.5 - 9)/1 = 2.5/1 = 2.500
•
• 6) Because the obtained t-Value (2.500) is less than the critical t-Value (2.689), the difference between the mean number of pull-ups that 9th grades from James Woods High School can do is not significantly greater than the number of pull-ups recommended by the US Department of Health and Human Services.
Cookbook