{"id":474,"date":"2015-07-16T08:16:59","date_gmt":"2015-07-16T12:16:59","guid":{"rendered":"http:\/\/sites.berry.edu\/vbissonnette\/?page_id=474"},"modified":"2016-06-22T11:42:12","modified_gmt":"2016-06-22T15:42:12","slug":"t-test-for-independent-samples-solution","status":"publish","type":"page","link":"https:\/\/sites.berry.edu\/vbissonnette\/t-test-for-independent-samples-solution\/","title":{"rendered":"T Test for Independent Samples Solution"},"content":{"rendered":"<h3>Example homework problem:<\/h3>\n<p>Twenty participants were given a list of 20 words to process. The 20 participants were randomly assigned to one of two treatment conditions. Half were instructed to count the number of vowels in each word (shallow processing). Half were instructed to judge whether the object\u00a0 described by each word would be useful if one were stranded on a desert island (deep processing). After a brief distractor task, all subjects were given a surprise free recall task. The number of words correctly recalled was recorded for each subject. Here are the data:<\/p>\n<table style=\"width: 500px\">\n<tbody>\n<tr>\n<td>Shallow Processing:<\/td>\n<td>13<\/td>\n<td>12<\/td>\n<td>11<\/td>\n<td>9<\/td>\n<td>11<\/td>\n<td>13<\/td>\n<td>14<\/td>\n<td>14<\/td>\n<td>14<\/td>\n<td>15<\/td>\n<\/tr>\n<tr>\n<td>Deep Processing:<\/td>\n<td>12<\/td>\n<td>15<\/td>\n<td>14<\/td>\n<td>14<\/td>\n<td>13<\/td>\n<td>12<\/td>\n<td>15<\/td>\n<td>14<\/td>\n<td>16<\/td>\n<td>17<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Did the instructions given to the participants significantly affect their level of recall (alpha = .05)?<\/p>\n<hr \/>\n<p>The above problem involves an experiment with two treatment conditions. The goal of your test is to see if there is significant mean difference between the two treatment groups.<\/p>\n<p>We will test for a significant mean difference between the treatment groups with a <u>t-test for independent samples<\/u>:<\/p>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest1.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-132 aligncenter\" src=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest1.png\" alt=\"ittest1\" width=\"380\" height=\"90\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest1.png 380w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest1-300x71.png 300w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/a><\/p>\n<p>The numerator of this formula represents the <u>mean difference <\/u>between the two treatment groups. The denominator represents the <u>standard error<\/u> of the mean difference. Within the denominator, you will see that we will compute the <u>pooled variance<\/u> of our two treatment groups:<\/p>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest2.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-133 aligncenter\" src=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest2.png\" alt=\"ittest2\" width=\"277\" height=\"47\" \/><\/a><\/p>\n<p>Pooled variance is a weighted average of the variance estimates from our two groups. If you need any help computing the mean and variance for each of your groups, look at the documentation for the <a href=\"explore.html\">explore procedure<\/a>. n refers to the sample size for each of our groups.<\/p>\n<p><b>Compute test statistic<\/b>. Compute the mean and variance for each group. You will find that:<\/p>\n<table style=\"width: 500px\">\n<tbody>\n<tr>\n<td class=\"lful\">Treatment Group:<\/td>\n<td class=\"ul\">Shallow<\/td>\n<td class=\"ul\">Deep<\/td>\n<\/tr>\n<tr>\n<td class=\"lf\">Mean:<\/td>\n<td class=\"rt\">12.600<\/td>\n<td class=\"rt\">14.200<\/td>\n<\/tr>\n<tr>\n<td class=\"lf\">Variance:<\/td>\n<td class=\"rt\">3.378<\/td>\n<td class=\"rt\">2.622<\/td>\n<\/tr>\n<tr>\n<td class=\"lf\">n:<\/td>\n<td class=\"rt\">10<\/td>\n<td class=\"rt\">10<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Next, compute the pooled variance:<\/p>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest3.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-134 aligncenter\" src=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest3.png\" alt=\"ittest3\" width=\"329\" height=\"44\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest3.png 329w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest3-300x40.png 300w\" sizes=\"auto, (max-width: 329px) 100vw, 329px\" \/><\/a><\/p>\n<p>Finally, compute the value of the <i>t<\/i> statistic:<\/p>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest4.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-135 aligncenter\" src=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest4.png\" alt=\"ittest4\" width=\"308\" height=\"87\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest4.png 308w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest4-300x85.png 300w\" sizes=\"auto, (max-width: 308px) 100vw, 308px\" \/><\/a><\/p>\n<p><b>Conduct hypothesis test<\/b>. Our <i>t<\/i> test will have <i>df<\/i> equal to the total of our sample sizes minus 2. In our case, we have 10 participants in each group, so we would have <i>df<\/i> = n1 + n2 &#8211; 2 = 10 + 10 &#8211; 2 = 18.<\/p>\n<p>Alpha was set at .05 and we will conduct a two- tailed test. When you consult your <a href=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/t.pdf\">table of critical values<\/a> for t, you will find that if our obtained value of <i>t<\/i> is greater than 2.101, then we would conclude that the mean difference in recall between our two treatment conditions is significant.<\/p>\n<p>Since the obtained <i>t<\/i> (-2.07) is not greater in absolute value than the critical <i>t<\/i> (2.101), we would conclude that there is <u>not<\/u> a significant difference in recall between the two treatment groups.<\/p>\n<p><b>Effect size<\/b>. To describe the effect size for this study, we will first compute <i>r<\/i>\u00b2:<\/p>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-136 aligncenter\" src=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5.png\" alt=\"ittest5\" width=\"324\" height=\"45\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5.png 324w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5-300x42.png 300w\" sizes=\"auto, (max-width: 324px) 100vw, 324px\" \/><\/a><\/p>\n<p><i>r<\/i>\u00b2 is an estimate of the proportion of variance in our dependent variable that can be accounted for by our manipulation of the independent variable. So, we could conclude that 19% of the variance in recall was due to our manipulation of the encoding instructions.<\/p>\n<p>However, many researchers prefer to use an <u>unbiased<\/u> effect size estimate &#8212; one that takes into account the fact that we are doing small sample research. So, we will also compute <u>Omega Squared<\/u>:<\/p>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5a.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-137 aligncenter\" src=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5a.png\" alt=\"ittest5a\" width=\"468\" height=\"47\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5a.png 468w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5a-300x30.png 300w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/a><\/p>\n<p>We would conclude that our manipulation of encoding instructions accounted for 14% of the variance in memory performance.<\/p>\n<p>Finally, we will compute Cohen&#8217;s D:<\/p>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5b.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-138 aligncenter\" src=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5b.png\" alt=\"ittest5b\" width=\"450\" height=\"66\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5b.png 450w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest5b-300x44.png 300w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<p>Cohen&#8217;s D standardizes the mean difference in terms of standard deviation units. It is equal to the mean difference divided by the square root of the pooled variance. In our case, we would conclude that there is a .92 standard deviation difference between our treatment group means.<\/p>\n<p><b>Confidence intervals<\/b>. We will find the 95% confidence interval for the mean difference. You compute the limits of your CI with this formula:<\/p>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest6.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-139 aligncenter\" src=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest6.png\" alt=\"ittest6\" width=\"440\" height=\"60\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest6.png 440w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest6-300x41.png 300w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/a><\/p>\n<p>Compute the standard error for the <i>t<\/i> test (0.7746), multiply this by the critical value for your <i>t<\/i> test (2.101), and then add this to and subtract this from the mean difference between your groups (-1.60):<\/p>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest7.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-140 aligncenter\" src=\"http:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest7.png\" alt=\"ittest7\" width=\"506\" height=\"20\" srcset=\"https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest7.png 506w, https:\/\/sites.berry.edu\/vbissonnette\/wp-content\/uploads\/sites\/21\/2015\/07\/ittest7-300x12.png 300w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><\/a><\/p>\n<p>We can say with 95% certainty that the population mean difference between our treatment groups is between -3.23 and +0.03. Note that the<br \/>\nvalue 0.00 is within our 95% confidence interval for the mean difference. We would conclude from this that the mean difference between our\u00a0 groups in our experiment was <u>not<\/u> statistically significant.<\/p>\n<p>If you would like a 99% confidence interval, just change the critical value of <i>t<\/i> in the formula.<\/p>\n<hr \/>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/t-test-for-independent-groups\/\">Back to Independent <i>t<\/i> Test<\/a><\/p>\n<p><a href=\"http:\/\/sites.berry.edu\/vbissonnette\/index\/stats-homework\/documentation\/\">Return to Table of Contents<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Example homework problem: Twenty participants were given a list of 20 words to process. The 20 participants were randomly assigned to one of two treatment conditions. Half were instructed to [&hellip;]<\/p>\n","protected":false},"author":34,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"class_list":["post-474","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/comments?post=474"}],"version-history":[{"count":6,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/474\/revisions"}],"predecessor-version":[{"id":872,"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/pages\/474\/revisions\/872"}],"wp:attachment":[{"href":"https:\/\/sites.berry.edu\/vbissonnette\/wp-json\/wp\/v2\/media?parent=474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}