Dependent T Test
Dependent T Test
Two-Sample Tests
Paired t Test (Correlated Groups t Test) Paired t Test Calculation Independent t Test Power and Two-Sample Tests: Paired Versus Independent Designs
f you have any interest in knowing how to statistically demonstrate that there is a significant difference between your control group and your experimental group, or in the before and after effects of your educational program, then this chapter should help. In fact, the statistical tests you are about to learn are (arguably) the most common tests reported in professional journals! In the last chapter, you learned how to evaluate hypotheses for tests when you had one sample and known population parameters. While those tests are powerful, population parameters can be difficult to obtain. Here we introduce the two-sample tests, where you will compare two samples that came from the same population, rather than comparing a single sample to a population. The samples may be completely independent from one another (between-groups design) or related in some way (within-groups design). Independent or between-groups designs are those in which subjects are randomly selected from a population and are randomly assigned to either the control or experimental conditions. Subjects only serve in one condition.
145
146
147
subjects on age and sex, so that you have a 36-year-old woman in your control group and a 36-year-old woman in your experimental group, a 28-year-old man in your control group and a 28-year-old man in your experimental group, and so on. This can also be done by placing one identical twin in the control group and the other twin in the experimental group or by any matching of individuals that is an attempt (see Table 9.2). Note that the matching must be pairwise, so that you can literally compare the scores of the twins side by side. Youll see why this is important when you see the formula for the paired t test.
Table 9.1
Subject 1 2 3 4 5 Score Before Treatment 50 52 44 42 49 Score after Treatment 55 58 48 41 56
Example of Before and After Pairing Using the Same Subjects in Each Paired Sample Table 9.2
Twin Pair A B C D Twin 1 = Control Group 10 12 21 18 Twin 2 = experimental Group 8 10 19 15
Example of a Paired Design in Which the Actual Subjects in Each Sample Are Different but Are Matched for Characteristics That They Have in Common (Genetics in This Example)
148
Table 9.3
Twin Pair Twin 1 = Control Twin 2 = experimental A B C D 10 12 21 18 8 10 19 15 difference Score 2 2 2 3 D = 9 5 9=4 5 2:25 D
149
test if you consider the difference scores to be your single sample. Thats the secret of the paired t test. Also, remember that n in the paired t test formula refers to the number of difference scores or the number of pairs of data points, not the total number of data points. Formula for a Single-Sample t Test (review)
tobtained 5 X2m X2m. 5 sX s n
Step 1: Compute the probability of the mean differences of this sample given that the sample comes from the null hypothesis population of difference scores where mD = 0.
150
d2 0 1 1 1 0 0 0 1 0 D = 4
Step 2: Evaluate the probability of obtaining this score due to chance. Evaluate the t-obtained value based on alpha (a) = 0.05 and a one-tailed hypothesis. To evaluate your t-obtained value, you must use the t distribution (Table B in the Appendix) as you did in the last chapter. To determine your t-critical value, you need to know your alpha level (0.05), the number
151
of tails you are evaluating (one in this case), and your degrees of freedom (n - 1 = 9 - 1 = 8). Compare the t-critical value with your t-obtained value. When a = 0.05, your degrees of freedom are equal to 8, and your hypothesis is one-tailed, you should use 1.86 as your t-critical value. To reject the null hypothesis for a t test, the t-obtained must be equal to, or more extreme than, the t-critical value. Be sure to also check that the effect is in the correct direction (correct based on the hypothesis).
jtobtained j $ jtcritical j j20:99j \ j21:86j, so we fail to reject the null hypothesis.
How should we interpret these data in light of the effect of the raise on productivity?
These results suggest that more than 5% of the time, you would obtain this number of units regardless of whether it was after a raise. Thus, it is likely that the difference in these production values (before and after the raise) comes from the normal null hypothesis population of difference scores. However, remember that there is a chance that there is a real effect of raises on productivity that we have not detected in this analysis.
Complete Example
A sociologist is interested in the decay of long-term memory compared to the number of errors in memory that an individual made after 1 week and after 1 year for a specific crime event. Participants viewed a videotape of a bank robbery and were asked a number of specific questions about the video 1 week after viewing it. They were asked the same questions 1 year after seeing the video. The number of memory errors was recorded for each participant at each time period. The researchers asked whether or not there was a significant difference in the number of errors in the two time periods. Assume that the difference scores are normally distributed and let a = 0.05. Null hypothesis: There is no difference in the number of errors made at 1 week and at 1 year. Alternative hypothesis: There is a difference in the number of errors made at 1 week and at 1 year.
Step 1: Compute the probability of the mean differences of this sample given that the sample comes from the null hypothesis population of difference scores where mD = 0.
152
d2 4 1 9 1 0 1 1 1 0 D = 18
2
Calculate the standard deviation of the sample: 2 +D 282 2 5 18 2 SSD 5 +D 2 5 18 2 7:1111 5 10:8888 . n 9 r r p SSD SD 5 5 10:8888 5 1:36110 5 1:16666 . 921 n 1 Apply the formula to our example:
t5 D 2 mD . sD n
Step 2: Evaluate the probability of obtaining this score due to chance. Evaluate the t-obtained value based on alpha (a) = 0.05 and a two-tailed hypothesis. To evaluate your t-obtained value, you must use the t distribution (Table B) as you did in Chapter 8. To determine your t-critical value, you need to know your alpha level (0.05), the number of tails you are evaluating
153
(two in this case), and your degrees of freedom (n - 1 = 9 - 1 = 8). Compare the t-critical value with your t-obtained value. When a = 0.05, your degrees of freedom are equal to 8, and your hypothesis is two-tailed, you should use 2.306 as your t-critical value. To reject the null hypothesis for a two-tailed test, the absolute value of t obtained must be equal to, or more extreme than, the t-critical value.
jtobtained j $ jtcritical j j22:2855j # j2:306j , so we fail to reject the null hypothesis.
How should we interpret these data in light of the effect of time on the number of memory errors?
These results suggest that more than 5% of the time, you would obtain this number of memory errors regardless of whether it was after 1 week or 1 year. Thus, it is likely that these memory error differences come from the normal null hypothesis population of difference scores. However, remember that there is a chance that there is a real effect of time on memory errors that we have not detected in this analysis. results if you use Microsoft excel to calculate the t test:
one Week Mean Variance Observations Pearson Correlation Hypothesized Mean Difference df t Stat P(T<=t) one-tail t Critical one-tail P(T<=t) two-tail t Critical two-tail 5.555556 1.777778 9 0.742315 0 8 -2.28571 0.025804 1.859548 0.051609 2.306006 one Year 6.444444 3.027778 9
154
1.1667
155
We have placed the numbers that are comparable to our manual calculations in bold. Once again, you see that calculated probability (SPSS calls Sig. 2-tailed) is greater than our alpha level of 0.05, and thus we must assume that these results could occur by chance and not necessarily as a result of time since the event.
Step 1: Compute the probability of the mean differences of this sample given that the sample comes from the null hypothesis population of difference scores where mD = 0.
156
Matched Pair undisturbed 1 2 3 4 5 6 7 5.4 4.1 9.7 8.4 6.0 6.0 7.9
+D n
5 17:02 2
Step 2: Evaluate the probability of obtaining this score due to chance. Evaluate the t-obtained value based on alpha (a) = 0.05 and a two-tailed hypothesis. To evaluate your t-obtained value, you must use the t distribution (Table B) as you did in Chapter 8. To determine your t-critical value, you need to know your alpha level (0.05), the number of tails you are evaluating
157
(two in this case), and your degrees of freedom (n - 1 = 7 - 1 = 6). Compare the t-critical value with your t-obtained value. When a = 0.05, your degrees of freedom are equal to 6, and your hypothesis is two-tailed, you should use 2.447 as your t-critical value. To reject the null hypothesis for a two-tailed test, the absolute value of t obtained must be equal to, or more extreme than, the t-critical value.
jtobtained j $ jtcritical j j2:952j $ j2:447j, so we reject the null hypothesis.
How should we interpret these data in light of the effect of construction on the rate of nest visits?
These results suggest that less than 5% of the time, you would obtain this rate of nest visits regardless of whether it was near or not near to the construction site. Thus, it is likely that the rate of nest visits near the construction site does not come from the same underlying population of scores as the nest site visits away from the construction site, and therefore, the difference scores in this example do not represent a null hypothesis population of difference scores. However, remember that there is a chance (however small) that there is, in reality, no real effect of the construction on nest site visits, and our conclusion is in error. results if you use Microsoft excel to calculate the t test:
undisturbed Mean Variance Observations Pearson Correlation Hypothesized Mean Difference Df t Stat P(T<=t) one-tail t Critical one-tail P(T<=t) two-tail t Critical two-tail 6.785714 3.784762 7 0.838487 0 6 2.952067 0.012772 1.943181 0.025544 2.446914 Construction 5.585714 3.284762 7
158
1.0755
.4065 .2053
2.1947
2.952
.026
Once again, we have placed the numbers that are comparable to our manual calculations in bold. And once again, you see that calculated probability (.026: SPSS calls it Sig. 2-tailed) is less than our alpha level of 0.05, and thus we must assume that these results are unlikely due to chance and thus are more likely a result of time since the event.
159
There was a significant difference in the rate of nest visits between the undisturbed location (M = 6.79, SD = 1.94) and the construction location (M = 5.59, SD = 1.81), t(6) = 2.95, p = .03. This formal sentence includes the dependent variable (rate of nest visits), the independent variable (two different locations), the direction of the effect as evidenced by the reported means, as well as a statement about statistical significance, the symbol of the test (t), the degrees of freedom (6), the statistical value (2.95), and the estimated probability of obtaining this result simply due to chance (.03).
indePendenT t TeST
In the previous section, we described a situation where your two conditions contain either the same subjects or subjects that have been individually matched on an important characteristic that might potentially influence the outcome of your results and is not interesting to you (age or body weight are potential examples of characteristics that you might match subjects on). This is referred to as a within-groups design. Now we turn to the situation where you actually have two completely different (independent) groups of subjects that you want to compare to determine if they are significantly different from one another: a between-groups design. The classic example of this is when you have a sample and you randomly assign half of your subjects to the control condition and the other half to the experimental treatment condition. In this situation, we wish to compare the means of the two conditions/groups. We can no longer assume that we know a population mean (as we did when we assumed that the mD = 0 in the paired t test), and we must develop a new sampling distribution.
160
part II IntroductIon to HypotHesIs testIng Sampling distribution of the difference Between the Means
To test for the potential statistical significance of a true difference between sample means, we need a sampling distribution of the difference between sample means X1 2 X2 . This would be a sampling distribution that will provide us with the probability that the difference between our two sample means X1 ; X2 differs from the null hypothesis population of sample mean differences: a population in which there is no difference between samples or, restated, the independent variable has no effect. The sampling distribution of the difference between the means can be created by taking all possible sample sizes of n1 and n2, calculating the sample means, and then taking the difference of those means. If you do this repeatedly for all of the possible combinations of your sample sizes, then you end up with a family of distributions of differences between the two means when they are randomly drawn from the same null hypothesis population. Choice of the specific distribution to be used in a problem depends on the degrees of freedom, as always. The sampling distribution of the difference between sample means has the following characteristics: 1. If the null hypothesis population of scores is normally distributed, then the population of differences between the sample means will also be normally distributed. 2. The mean of the sampling distribution of the difference between sample means mX 2 X will be equal to m1 - m2 (just as mX 5 m).
1 2
3. The standard deviation of the sampling distribution of the difference between sample means will the square root of the sum of q be equal to each sample variance, or s2 1 s2 . X X
1 2
161
variability. In fact, what we do is to estimate the true population variability (or variance, s2) by taking the average variance (s2) of our samples but weighted by their respective sample sizes. Remember, as we learned in earlier chapters, sample size or degrees of freedom affects the accuracy of our variance estimates, so an estimate from a sample with a large sample size would be more accurate than an estimated variance from a smaller sample. So we need to weight our average variance by the respective sample sizes of each sample. In using this approach, we are going to make a new assumptionthat the sample variances are estimating the same underlying population variance, the variance of the null hypothesis population. Later in this chapter, we will have to make sure that our two sample variances are the same, within the bounds of random sampling error. This is referred to as the homogeneity of variance assumption. Formula for Weighted Variance:
s2 5 w df1 s2 1 df2 s2 1 2. df1 1 df2
Rearranging to simplify:
5
We have shown the formula in three different ways. The first way is the most intuitive way to present the average variance of the two samples when it is weighted by the sample size or, more specifically, by the appropriate degrees of freedom for each sample. The degrees of freedom are used because we are estimating the population variation from a sample, and thus one degree of freedom is lost each time we do that (one for each sample). The second formula actually plugs in the appropriate formulas for variance and degrees of freedom into the first formula, and the last formula is created by algebraic rearrangement into a simplified version. The first formula may be the best one to use if you are obtaining each sample variance from your calculator directly from these raw data or if you are given either variance or standard deviation of each sample in a problem. The last formula would be best if you have already calculated the sums of squares (SS) for each group.
162
The formula for an independent t test is derived by assuming the mean of the sampling distribution or differences between means is zero for the null hypothesis population and by using the average variance divided by each sample size. The square root in the denominator of the independent t test formula is there not only to take the square root of the sample size (as you did when you calculated a single-sample t test) but also because you are working in squared units (variance), and we must take the square root of the variance to get back to the standard deviation. Variations of the independent t Test Formula All-purpose formulas:
X1 2 X2 X1 2 X . tobtained 5 p 5 r 2 SS 1 SS 2 1=n 1 1=n sw 1 2 1 2 1=n1 1 1=n2 n 1n 22
1 2
To create the second variation of the formula, we simply substituted the formula for s2 directly into the independent t test formula. w Formula to be used only when n1 = n2:
X1 2 X2 tobtained 5 r .
SS1 1 SS2 nn 2 1
163
Step 1: Compute the probability that each of the sample means comes from the null hypothesis population of differences between means. Calculate the means and the intermediate numbers for the SS formula:
Maze-Bright rats 2 3 4 3 4 2
+XBRIGHT 5 18 +XBRIGHT 2 5 182 5 324
2 +XBRIGHT 5 58
Maze-dull rats 6 4 5 3 6
XBRIGHT 5 18 5 3 6
XDULL 5 24 5 4:8 5
164
SSDULL 5 +X 2
5 122 2
Step 2: Evaluate the probability of obtaining this score due to chance. Evaluate the t-obtained value based on alpha (a) = 0.05 and a onetailed hypothesis. To evaluate your t-obtained value, you must use the t distribution (Table B). To determine your t-critical value, you need to know your alpha level (0.05), the number of tails you are evaluating (one in this case), and your degrees of freedom (df). The degrees of freedom for an independent t test are (n1 - 1) + (n2 - 1) or n1 + n2 - 2. Thus, the df for this problem are 6 + 5 - 2 = 9. Compare the t-critical value with your t-obtained value. When a = 0.05, your degrees of freedom are equal to 9, and your hypothesis is one-tailed, you should use 1.833 as your t-critical value. -2.7414 > -1.833, so we reject the null hypothesis.
How should we interpret these data in light of the effect of time on the number of memory errors?
These results suggest that less than 5% of the time, you would obtain this difference in the number of errors if the breeding had no effect. Thus, it is not very likely that these error differences come from the normal null hypothesis population. However, there is a chance that you could get a difference this large between two means that is purely due to chance, but that chance is less than 5%. Note that you can refer back to the means to determine that the effect was in the correct direction. Specifically, maze-bright rats made 3 errors on average and maze-dull rats
165
made 4.8 errors on average. Not only is the t-obtained value more extreme than the t-critical value, but the direction of the effect is as the researcher predicted.
Complete Example
A researcher breeds rats for nine generations but only breeds the rats that perform very well in a maze (few errors) to each other (maze-bright rats) and also breeds rats that perform very poorly in a maze (many errors) to one another (maze-dull rats). After nine generations, is there a significant difference in the number of errors in the two groups of rats? Null hypothesis: There is no difference in the number of errors made by the maze-bright and the maze-dull rats or the differences are due to chance. Alternative hypothesis: There is a difference in the number of errors made by each group. Evaluate the t-obtained value based on alpha (a) = 0.05 and a twotailed hypothesis. To evaluate your t-obtained value, you must use the t distribution (Table B). To determine your t-critical value, you need to know your alpha level (0.05), the number of tails you are evaluating (two in this case), and your degrees of freedom (df). The degrees of freedom for an independent t test are (n1 - 1) + (n2 - 1) or n1 + n2 - 2. Thus, the df for this problem are 6 + 5 - 2 = 9. Compare the t-critical value with your t-obtained value. When a = 0.05, your degrees of freedom are equal to 9, and your hypothesis is two-tailed, you should use 2.262 as your t-critical value.
j22:714j $ j2:262j , so we reject the null hypothesis.
How should we interpret these data in light of the effect of time on the number of memory errors?
These results suggest that less than 5% of the time, you would obtain this difference in the number of errors if the breeding had no effect. Thus, it is not very likely that these error differences come from the normal null hypothesis population. However, there is a chance that you could get a difference this large between two means that is purely due to chance, but that chance is less than 5%.
166
This is the output you get from Excel when you type in these data for maze-bright and maze-dull rats. Note that Excel calls this test t-Test: TwoSample Assuming Equal Variances. This wording is slightly different from what we have been using, but it is describing the same analysis, and that will be even clearer after we have discussed the assumptions of the independent t test. We have bolded the numbers that are comparable to the numbers we just manually calculated or looked up in the table. Note that the t-obtained value (Excel calls it t Stat) is identical to ours, except they have carried more digits (-2.713602101). The t Critical two-tail is also the same (2.262158887), but again they have carried more digits. The degrees of freedom are the same (9). In addition, they have provided the calculated probability of obtaining a t value (t Stat) of -2.713602101, which is 0.023856384. Since 0.023856384 < 0.05, we clearly reject our null hypothesis. These results suggest that 2.3856384% of the time, you would obtain this difference by chance if breeding had no effect. Again, knowing the calculated probability for each and every t-obtained value (not just the t-critical values) is one of the major advantages of using a computer to calculate your analyses.
167
2.616
6.903
.035
1.8000
.6880
We have placed the numbers that are comparable to our manual calculations in bold. Once again, you see that calculated probability (SPSS calls it Sig. 2-tailed) is less than our alpha level of 0.05, and thus we must assume that these results would be unlikely simply due to chance.
3.4315 .1685
168
Step 1: Compute the probability that each of the sample means comes from the null hypothesis population of differences between means. Calculate the means and the intermediate numbers for the SS formula:
introductory 9 8 7 9 6 9
+XIntro 5 39 +XIntro 2 5 392 5 1521
2 +XIntro 5 311
advanced 8 9 8 6 10
39 5 7:80 XIntro 5 5
50 5 8:33 XAdv 5 6
169
SSIntro 5 +X 2 SSAdv 5 +X 2
2
+X n
5 311 2
+X n
5 426 2
Step 2: Evaluate the probability of obtaining this score due to chance. Evaluate the t-obtained value based on alpha (a) = 0.05 and a twotailed hypothesis. To evaluate your t-obtained value, you must use the t distribution (Table B). To determine your t-critical value, you need to know your alpha level (0.05), the number of tails you are evaluating (two in this case), and your degrees of freedom (df). The degrees of freedom for an independent t test are (n1 - 1) + (n2 - 1) or n1 + n2 - 2. Thus, the df for this problem are 5 + 6 - 2 = 9. Compare the t-critical value with your t-obtained value. When a = 0.05, your degrees of freedom are equal to 9, and your hypothesis is two-tailed, you should use 2.262 as your t-critical value.
j20:6538j \ j2:262j , so we fail to reject the null hypothesis.
How should we interpret these data in light of the effect of experience on scores?
These results suggest that greater than 5% of the time, you would obtain this difference in the scores if experience level had no effect. Thus, it
170
This is the output you get from Excel when you type in these data for introductory and advanced psychology students. We have again bolded the numbers that are comparable to the numbers we just manually calculated or looked up in the table. Note again that the t-obtained value is identical to ours, except they have carried more digits. The t Critical two-tail is also similar to the table except for differences due to rounding (2.262158887), and the same as in the first example since the degrees of freedom are the same (9). In addition, they have provided the calculated probability of obtaining a t value (t Stat) of -0.657843, which is 0.527105. Since 0.527105 > 0.05, we clearly fail to reject our null hypothesis. These results suggest that 52.7105% of the time, you would obtain this difference in errors if psychology experience had no effect.
171
.661
8.785 .526
.5333
.8069
We have placed the numbers that are comparable to our manual calculations in bold. Once again, you see that that calculated probability (SPSS calls it Sig. 2-tailed) is greater than (much greater than) our alpha level of 0.05, and thus we must assume that these results would be likely simply due to chance.
2.3655 1.2989
172
173
point for the subject but lacks the other data point and thus cannot calculate a difference score for the subject. There are two options in this situation. The first option is to drop those subjects with missing data from your analysis, but this reduces your power significantly if you have a large number of missing data points relative to your sample size. The second option is to treat the two samples as independent and calculate an independent t test, and thus equal ns are not required and difference scores are not the basis for the test. A second major drawback of the within-groups design is what generally is called experience effects: any research design in which novelty or experience with the assessment tool would bias the results. For example, any study in which the participants must be naive to the assessment to be able to provide a meaningful response would preclude the use of the within-groups design. You would require that both your control or pretest group and your treatment group be different individuals who had never before experienced the assessment itself.
Once you have calculated your effect size, you can use a free program to calculate the power of your test. One that we have often recommended to students is G*Power, which can be downloaded at www.psycho .uni-duesseldorf.de/aap/projects/gpower/. The program can be used a priori to predict adequate sample size, based on desired effect size and desired power, or post hoc to calculate power based on calculated effect size and standard error. A priori, after typing in the desired effect size (based on previous research or current hypotheses) and desired power (usually 0.8 or your research wont be funded), total sample size, along with tcrit and actual power, appears in the middle and bottom of the screen.
174
SuMMarY
In this chapter, you have covered statistical tests for designs in which you have two samples and lack information about the underlying population. Because we rarely know population parameters such as the mean and standard deviation (m and s), the two-sample tests tend to be used more often than the one-sample tests. Two-sample tests are less powerful because we are forced to estimate characteristics of the population, whereas one-sample tests rely on known measures of the population. In the next chapter, we will extend the concept of an independent t test or two-sample between-groups design to a situation where we have three samples and a between-groups design.
excel Step-by-Step: Step-by-Step instructions for using Microsoft excel 2003 or 2007 to run t Tests
1. Your first step will be to open Microsoft Excel and type the raw data into a spreadsheet (data listed on page 176). It is helpful to type the column headers so that your output will be labeled later. Note that the participants who received caffeine in the first treatment are different
Experimental Design? Single sample Individual score (not a sample) Relation between samples? z-score Within groups Normal population? Independent groups Normal population? Homogeneity of Variance 4 Yes Independent t-test 2 conditions or 2 samples
Normal population? Know population mean ()? Yes Know population standard deviation ()? No Single Sample t-test Paired t-test Yes
Yes
1. Within Groups a. subjects matchedmarried, partners, twins, etc., or individually matched for a reason that might affect the I.V. b. before vs. after conditions with the same subjects, measured both times 2. Independent Groups a. In one group/condition, NOT allowed in the other, subjects randomly assigned to be in the experiment in one group OR the other b. Sample sizes can be unequal (IF unequal, definitely independent t-test, but if equal, make decision based on experimental design info) 3. Power a. Single z > Single t, Paired > Independent
Chapter
175
176
2. Once your data are entered, you will need to calculate an independent t test.
For Excel 2003: To find the t test you will need, you can go to the built-in data analysis function. Youll find the option under the Tools menu, and at the bottom of the list that pops up, you should see Data Analysis.
If you do not see the Data Analysis option under the Tools menu, select Add Ins under the Tool menu. Check the box next to Analysis TookPak and click OK. Follow any further instructions that the computer gives you.
For Excel 2007: To get to the data analysis option, click on the DATA tab and the Data Analysis tool will be in the Analysis section to the far right of the screen. Once you find the Data Analysis tool, the rest of the instructions are the same.
3. After you click on Data Analysis, a list of possible statistical tests will pop up. Page down the list until you find the appropriate test. We want to do an independent t test, which Excel calls t-Test: Two Sample Assuming Equal Variances. After you have selected the appropriate test, the program will take you through the steps to complete the test. Note that Excel also has an unequal variances test. You can use this test if you meet the assumptions of normality but do not meet the variance assumption. Here is example output from an independent t test:
Control Group Mean Variance Observations Pooled Variance Hypothesized Mean Difference 2.7 1.566666667 10 1.561111111 0 alcohol Group 4 1.555555556 10
177
Control Group df t Stat P(T<=t) one-tail t Critical one-tail P(T<=t) two-tail t Critical two-tail 18 2.326544946 0.015932925 1.734063062 0.031865849 2.100923666
alcohol Group
SPSS Step-by-Step: Step-by-Step instructions for using SPSS to run an independent t Test
1. Your first step will be to open SPSS and select the option that allows you to type in new data. 2. This will open a page called Variable View. To confirm that, look at the tab at the bottom left of the page. There should be two tabs, and one will say Variable View (the one you are in now) and the other will say Data View. 3. Now you need to establish your variables for SPSS. Make a variable that codes for your independent groups by typing in the word group in the first box of row 1. Now name your dependent variable and call it dv and type that into box 1 in row 2. By default, SPSS will consider each of these variables to be numeric, and for these purposes, all of the default codes will work perfectly. However, keep in mind that this is where you can change some of your options to allow for alphabetical data, define coding in your variables, and so on. For example, you could define your group coding to be 1 for the control group and 2 for the experimental treatment group. 4. Click on the Data View tab now. You should see that the variable names you entered in Variable View have now appeared at the top of this spreadsheet. Now you can enter your raw data:
Group 2 2 dv 18 15 (Continued)
178
5. From the SPSS menu, you should now select Analyze, then Compare means, and finally Independent t-test. This will open up a new pop-up window with your variables listed on the left-hand side. Select your dependent variable and use the arrow in the middle of the pop-up to move it to the right-hand side of the pop-up box as your test variable. Now move your group variable the same way over to the group variable box. 6. Now you will need to define the groups for your grouping variable. Click this option and type 1 for Group 1 and 2 for Group 2. 7. Once your groups are defined and you are back to the independent t test pop-up box, you can just hit OK to run the test. 8. You should get output for an independent t test assuming equal variances and for an independent t test where you do not need to assume equal variances. SPSS will also include Levenes test, which tells you whether or not your variances are homogeneous. If they are homogeneous, you should report the independent t test assuming equal variances. If your variables are not homogeneous and are heterogeneous, then you report the unequal variances t test. In addition to the t value and significance level (p value), the output will also include descriptive statistics such as the difference between your means, standard error of the means, your degrees of freedom, and the confidence interval.
179
ChapTer 9 homework
Provide a short answer for the following questions. 1. Why are paired (or correlated) designs more powerful than independent designs? 2. What are the assumptions for the paired t test? 3. What are the assumptions for the independent t test? 4. List three ways that you can meet the assumption of normality. 5. Why does the independent t test require the assumption of homogeneity of variance but the paired t test does not require this assumption? 6. How should you handle a situation where you have paired design and two conditions but there are some missing data for one of your two conditions? 7. What do you do if you do not meet the assumptions of the paired t test or the independent t test? 8. A researcher records the number of positive early childhood memories that can be recalled by five individuals who grew up in military families to the number of memories of individuals who grew up in nonmilitary families. The number of memories is normally distributed in each group. Using a = 0.05 (two-tailed), what do you conclude?
Military family nonmilitary family 18 20 25 23 17 26 20 30 23 28
9. A sociologist is interested in whether or not race affects the likelihood that the average person will shoot a potential criminal in a computer simulation. Participants are required to make quick decisions about whether to shoot or not, and they are shown a variety of images of people. Some of the images are of people with a weapon and some of them are people holding nonviolent objects. Eight participants are randomly sampled for the study. The psychologist records the number of errors (shooting someone holding a nonviolent object) the participants made based on race (African American or Caucasian). The number of errors is normally distributed. The following data are recorded.
Participant African American Caucasian 1 28 25 2 29 28 3 25 22 4 30 30 5 25 26 6 27 24 7 28 25 8 24 22
180
10. Professor Jones is intensely curious about differences in testing situations and wondered if students tended to make better scores on her tests depending on whether the test was taken on a Monday morning or a Friday morning. Her exams have always been normally distributed. From a group of 19 similarly talented students, she randomly selected some to take a test on Friday and others to take it on Monday. The scores by groups were as follows:
Monday 89.8 90.2 98.1 91.2 88.9 90.3 99.2 94.0 88.7 83.9 Friday 87.3 87.6 87.3 91.8 86.4 86.4 93.1 89.2 90.1
For Questions 11 to 12, you should choose the most appropriate and powerful test. Support your answers and list assumptions you are making. Do not try to perform the calculations. 11. Extensive research has been done on the subject of birth order. Data on this research show that first-born children develop different characteristics than later-born children. For example, first-born children tend to be more responsible and self-disciplined than later-born children. A researcher is interested in finding out if first-born children tend to be more confident and have higher self-esteem than later-born siblings. A random sample of 31 first-born children and 35 later-born children were given a self-esteem test. The standard deviation for the first-born children is 1.34, and the standard deviation for the later-born children is 2.15. Test whether birth order affects self-esteem. 12. A researcher tested a new medicine to see if it would be effective in lowering blood pressure. Two samples of participants from a normally distributed population were matched for medical history and initial blood pressure readings. Fifteen randomly selected participants were run through the
181
experimental condition in which they received the new drug. The other 15 randomly selected individuals participated in the control group and received a placebo. Participants receiving the drug showed a lower blood pressure. Test whether the drug had a statistically significant effect on blood pressure. Variances are homogeneous. Answer Questions 13 to 19 using the following story problem. A marketer is interested in how an antismoking campaign affects the smoking habits of teenagers. The researcher samples 50 students from a local area high school and asks them how many cigarettes they smoked. After the antismoking campaign has run for a year, the researcher polls the same 50 students and records the exact number of cigarettes smoked after the campaign. 13. State the null hypothesis for this study. 14. State the alternative hypothesis for this study. 15. Is this a directional or nondirectional hypothesis? 16. Is this research an independent groups (between subjects) or a repeated measures/paired design (within subjects)? Why? 17. What are the independent and dependent variables? 18. Which type of measurement scale do the data from this study represent (e.g., nominal, ordinal, interval, or ratio)? Why? 19. What kind of statistical test should be used to test the hypothesis (hint: think of what we have been doing in class lately)? 20. Which of the following are assumptions underlying the use of the paired t test? A. The variance of the population is known B. The sampling distribution is normal C. Data are interval or ratio D. All of the above E. A and B F. B and C G. A and C 21. A drug and alcohol researcher is interested in studying the effects of alcohol on learning ability of college seniors. She randomly assigns 10 students to an alcohol group and another 10 students to a control group. The students in
182
Perform the statistical test and state whether or not you can reject the null hypothesis. The following homework questions should be answered with the online data set provided for this chapter via the textbooks website. 22. Produce a table of descriptive statistics using Microsoft Excel or SPSS. 23. Interpret the descriptive statistics produced by Excel. Do you meet the assumption of normality? 24. Do you meet the assumption of homogeneity of variance? 25. Analyze the data set using an independent t test and indicate if you have a statistically significant result. Explain how you evaluated the output.
alcohol Group 5 3 7 2 4 5 4 3 2 3
+x 5 38 +x2 5 166