the t-test for two independent samples
DESCRIPTION
The T-Test for Two Independent Samples. Introduction to Statistics Chapter 10 Oct 20-22, 2009 Classes #18-19. A limitation of the t-test from chapter 9. Referred to as the one-sample t-test because can only test hypotheses concerning one sample - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/1.jpg)
The T-Test for Two Independent Samples
Introduction to StatisticsChapter 10
Oct 20-22, 2009Classes #18-19
![Page 2: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/2.jpg)
A limitation of the t-test from chapter 9
Referred to as the one-sample t-test because can only test hypotheses concerning one sampleNeed to have a meaningful comparison
value for hypothesis testing
![Page 3: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/3.jpg)
Another type of hypothesis
Have two groups of people, and want to compare them to see if they’re different or similarNull hypothesis = nothing’s going on, the
two groups are similar (i.e., the means of the two populations are the same)
![Page 4: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/4.jpg)
Keys to keep in mind
Not interested in what the means of the two groups are; only interested in whether the means are different from each other
The two groups are separate, independent groups of peopleBetween subjects design
![Page 5: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/5.jpg)
Research Designs
Independent Measures Between-subjectsMaking a comparison between two groups
Repeated MeasuresWithin-subjectsThe two sets of data are obtained from the
same sample
![Page 6: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/6.jpg)
The t Test for Two Independent Samples
Compare means of two groups Experimental—treatment versus control Existing groups—males versus females
Notation—subscripts indicate group M1, s1, n1 M2, s2, n2
Null and alternative hypotheses translates into translates into
210 : H 0 : 210 H
211 : H 0 : 211 H
![Page 7: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/7.jpg)
Same setup and logic
Compare what’s going on in data to what would be going if null hypothesis was true, taking into account variability from sample to sample
Larger the test statistic, less likely would get that by chance if the null hypothesis were true
![Page 8: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/8.jpg)
Plugging in values
What’s going on in data = difference between means of each sample
What would be going on if null hypothesis were true = 0 (no difference between means)
Variability from sample to sample = standard error of the meanBut now we have two of them, since have
two different samples
![Page 9: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/9.jpg)
Computing two standard errors of the mean n1 = n2
Normally: sM = s2/n
Now with two samples:
S(M1-M2) = s12/n + s22/n
![Page 10: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/10.jpg)
Computing two standard errors of the mean n1 ≠ n2
First, need to deal with two sources of variance – variance in sample 1 and variance in sample 2Pool them together
Sp2 = SS total/df total
Referred to as pooled variance
![Page 11: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/11.jpg)
Pooled Variance
Have two sources of df:Sample 1Sample 2
total df = dfsample 1 + dfsample 2
df = df1 + df2 = (n1-1) + (n2-1) = n1 + n2 - 2
![Page 12: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/12.jpg)
Pooled Variance
S2 pooled = SS1 + SS2
df1 + df2
![Page 13: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/13.jpg)
Computing two standard errors of the mean n1 ≠ n2
Second, compute standard error of the mean Normally: sM = √s2/n With two samples to
deal with:
2
2
1
2
21 ns
ns
s pooledpooledMM
![Page 14: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/14.jpg)
t-test
t =
sample mean diff – population mean diff estimated standard error
2121
212121
MMMM sMM
sMMt
![Page 15: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/15.jpg)
Hypothesis testing
Two-tailed H0: µ1 = µ2, µ1 - µ2 = 0 H1: µ1 ≠ µ2, µ1 - µ2 ≠ 0
One-tailed H0: µ1 ≥ µ2, µ1 - µ2 ≥ 0 H1: µ1 < µ2, µ1 - µ2 < 0
![Page 16: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/16.jpg)
Everything else is the same
As long as the calculated test statistic is more extreme than the critical t value, reject the null
![Page 17: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/17.jpg)
Hypothesis testing
Determine αCritical value of t
df = n1 + n2 - 2
![Page 18: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/18.jpg)
Hypothesis Testing with t Hypothesis Testing with t statisticstatistic
Step 1Step 1: : State the hypotheses. State the hypotheses. Step 2Step 2: : Set Set and locate the critical region. and locate the critical region.
– You will need to calculate the df to do this, and You will need to calculate the df to do this, and use the t distribution table. use the t distribution table.
Step 3Step 3: : Graph rejection regionsGraph rejection regions Step 4Step 4: : Collect sample data and compute t.Collect sample data and compute t.
– This will involve 3 calculations, given SS, n, This will involve 3 calculations, given SS, n, , , and and MM::
a) the sample variance (sa) the sample variance (s22)) b) the estimated standard error (sb) the estimated standard error (sMM)) c) the t statisticc) the t statistic
![Page 19: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/19.jpg)
Hypothesis Testing with t Hypothesis Testing with t statisticstatistic
Step 5Step 5: : Make a decision Make a decision – Need to compare Need to compare ttcalculatedcalculated in Step 3 with in Step 3 with ttcriticalcritical found found
in the t tablein the t table– If its two-tailed:If its two-tailed:
If tIf tcalccalc > t > tCRITCRIT (ignoring signs) (ignoring signs) Reject HReject HOO If tIf tcalccalc < t < tCRITCRIT (ignoring signs) (ignoring signs) Fail to reject HFail to reject HOO
– If its one-tailed: You need to take the sign into If its one-tailed: You need to take the sign into consideration remembering to check back to the graphconsideration remembering to check back to the graph
Step 6Step 6: : Interpret decisionInterpret decision Step 7Step 7: : Find effect sizeFind effect size
![Page 20: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/20.jpg)
Example 11X 2
1X 2X 22X
7 49 14 196 10 100 15 225 9 81 6 36 1 1 9 81 8 64 10 100
11 121 11 12 7 49 11 121 9 81 7 49 7 49
1X 76 21X 644 2X 76 2
2X 880
M1 = 7.6 1n 10 M2 = 10.857 2n 7
4.666.577644
10776,5644
1076644
2
1
212
11 nX
XSS
8571.541429.825880
7776,5880
776880
2
2
222
22 nX
XSS
![Page 21: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/21.jpg)
Example 1
H0: µ1 = µ2, µ1 - µ2 = 0 H1: µ1 ≠ µ2, µ1 - µ2 ≠ 0 df = n1 + n2 - 2 =10 + 7 – 2 = 15 =.05 t(15) = 2.131
![Page 22: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/22.jpg)
Example 1: t-test
t(15) = –2.325, p < .05 (precise p = 0.0345) Reject H0
8.0838 15
121.25714 6985714.544.66
21
212
dfdfSSSSsp
1.4011 1.9632 1.1548 0.8084 7
8.083810
8.0838
2
2
1
2
21 n
sns
s ppMM
325.24011.1257143.3
4011.18571.106.7
21
2121
MMs
MMt
![Page 23: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/23.jpg)
Example 2Example 2 Mr. Fields owns construction companies in both Mr. Fields owns construction companies in both
Newport, Rhode Island and Miami, FloridaNewport, Rhode Island and Miami, Florida He feels that because of the warmer weather He feels that because of the warmer weather
more of his employees in Miami take days off more of his employees in Miami take days off from work (presumably to party on South Beach).from work (presumably to party on South Beach).
In an interesting attempt to find out if this were In an interesting attempt to find out if this were true, he simply surveyed his employees as to true, he simply surveyed his employees as to how many days they frequented the beach in the how many days they frequented the beach in the last year. He believes that the data will reveal last year. He believes that the data will reveal that the Miami workers spend more time at the that the Miami workers spend more time at the beach than do the Newport workers.beach than do the Newport workers.– On the next slide are the results of his surveyOn the next slide are the results of his survey– Sample 1 is Newport; Sample 2 is Miami Sample 1 is Newport; Sample 2 is Miami
![Page 24: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/24.jpg)
Example 2
X1 X12 X2 X2
2 79 6241 71 5041 85 7225 82 6724 76 5776 96 9216 68 4624 58 3364 68 4624 98 9604 61 3721 72 5184 56 3136 108 11664 40 1600 73 5329 78 6084 79 6241 87 7569 75 5625 93 8649 67 4489 56 3136 73 5329 91 8281 61 3721 77 5929 83 6889 78 6084 71 5041
1X 1093 21X 82679 2X 1167 2
2X 93461 M1 = 72.867 1n 15 M2 = 77.8 2n 15
![Page 25: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/25.jpg)
Example 2Example 2 Step 1: State hypothesesStep 1: State hypotheses Sep2: Find tSep2: Find tcriticalcritical
![Page 26: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/26.jpg)
Step 3: Graph Critical Step 3: Graph Critical RegionRegion
![Page 27: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/27.jpg)
Example 2Example 2
Step 4: FindStep 4: Find t tcalculatedcalculated
Step 5: Make decisionStep 5: Make decision
Step 6: Interpret decisionStep 6: Interpret decision
Step 7: Determine effect sizeStep 7: Determine effect size
![Page 28: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/28.jpg)
Effect sizeCohen’s d =
Example 1 Cohen’s d
Example 2 Cohen’s d
221
deviation standarddifferencemean
psMM
-1.1462.843204
257142.30838.8
257142.3deviation standard
difference mean2
21
psMM
-0.34614.27302
4.93333-203.7194.93333-
deviation standarddifference mean
221
psMM
![Page 29: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/29.jpg)
Effect size
r2: amount of information you have about someone’s value on the dependent variable by knowing whether that person is from group 1 or group 2
t2/t2+df
![Page 30: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/30.jpg)
Effect size
Example 1:r2 = t2/t2+dfr2 = ???
Example 2:r2 = t2/t2+dfr2 = ???
![Page 31: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/31.jpg)
Assumptions
Random and independent samplesNormalityHomogeneity of variance
SPSS—test for equality of variances, unequal variances t test
t-test is robust
![Page 32: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/32.jpg)
SPSS Analyze
Compare Means Independent-Samples T Test
Dependent variable(s)—Test Variable(s) Independent variable—Grouping Variable
Define Groups Cut point value
Output Levene’s Test for Equality of Variances t Tests
Equal variances assumed Equal variances not assumed
![Page 33: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/33.jpg)
Output Example 1
T-Test Group Statistics
10 7.6000 2.71621 .858947 10.8571 3.02372 1.14286
ClassClass 1Class 2
Test ScoreN Mean Std. Deviation
Std. ErrorMean
Independent Samples Test
.145 .708 -2.325 15 .035 -3.25714 1.40115 -6.24362 -.27067
-2.278 12.116 .042 -3.25714 1.42965 -6.36879 -.14550
Equal variancesassumedEqual variancesnot assumed
Test ScoreF Sig.
Levene's Test forEquality of Variances
t df Sig. (2-tailed)Mean
DifferenceStd. ErrorDifference Lower Upper
95% ConfidenceInterval of the
Difference
t-test for Equality of Means
![Page 34: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/34.jpg)
Homogeneity of Variance
Calculating the pooled variance across the two samples assumes that it’s ok to combine themAssumes that there is homogeneity of
variance
![Page 35: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/35.jpg)
Testing the Homogeneity of Variance
This, itself, is a hypothesisNull hypothesis = no difference between
variance of sample 1 and variance of sample 2
When use SPSS to compute an independent samples t-test, this hypothesis is tested
![Page 36: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/36.jpg)
Two t values to look at
SPSS then computes two t values, one in which the homogeneity of variance assumption is met, and the other in which it is not metFor the t in which the assumption is not met,
the df will not be a whole number Instead, df is lowered somewhat larger
critical t more stringent test of differences between two groups
![Page 37: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/37.jpg)
Telling the world
Same APA style as for one-sample t-tests: t (df) = calculated t value, p informationDon’t forget to give the direction of
significant differences! Give the mean and standard deviation of each group
![Page 38: The T-Test for Two Independent Samples](https://reader036.vdocuments.net/reader036/viewer/2022062411/5681682c550346895dddc2ea/html5/thumbnails/38.jpg)
Credits http://myweb.liu.edu/~nfrye/psy801/ch10.ppt http://faculty.plattsburgh.edu/alan.marks/Stat%20206/The%20t%20Test
%20for%20Two%20Independent%20Samples.ppt