Sunteți pe pagina 1din 17

Using SPSS for t Tests

This tutorial will show you how to use SPSS version 12.0 to perform one-sample t-tests, independent samples t-tests, and paired samples t-tests. This tutorial assumes that you have:

Downloaded the standard class data set clic! on the lin! and save the data file" Started SPSS clic! on Start # Pro$rams # SPSS for %indows # SPSS 12.0 for %indows"

One Sample t-Tests


&ne sample t-tests can 'e used to determine if the mean of a sample is different from a particular value. (n this e)ample, we will determine if the mean num'er of older si'lin$s that the PS* 21+ students have is $reater than 1. %e will follow our customary steps: 1. %rite the null and alternative hypotheses first: ,0: -21+ Students . 1 ,1: -21+ Students / 1 %here - is the mean num'er of older si'lin$s that the PS* 21+ students have. 2. Determine if this is a one-tailed or a two-tailed test. 0ecause the hypothesis involves the phrase 1$reater than1, this must 'e a one tailed test. 2. Specify the 3 level: 3 4 .05 6. Determine the appropriate statistical test. The varia'le of interest, older, is on a ratio scale, so a 7-score test or a t-test mi$ht 'e appropriate. 0ecause the population standard deviation is not !nown, the 7-test would 'e inappropriate. %e will use the t-test instead. 5. 8alculate the t value, or let SPSS do it for you9 The command for a one sample t tests is found at :naly7e # 8ompare ;eans # &neSample T Test this is shorthand for clic!in$ on the :naly7e menu item at the top of the window, and then clic!in$ on 8ompare ;eans from the drop down menu, and &ne-

Sample T Test from the pop up menu.":

The &ne-Sample t Test dialo$ 'o) will appear:

Select the dependent varia'le s" that you want to test 'y clic!in$ on it in the left hand pane of the &ne-Sample t Test dialo$ 'o). Then clic! on the arrow 'utton to move the varia'le into the Test <aria'le s" pane. (n this e)ample, move the &lder varia'le num'er

of older si'lin$s" into the Test <aria'les 'o):

8lic! in the Test <alue 'o) and enter the value that you will compare to. (n this e)ample, we are comparin$ if the num'er of older si'lin$s is $reater than 1, so we should enter 1 into the Test <alue 'o):

8lic! on the &= 'utton to perform the one-sample t test. The output viewer will appear. There are two parts to the output. The first part $ives descriptive statistics for the varia'les that you moved into the Test <aria'le s" 'o) on the &ne-Sample t Test dialo$ 'o). (n this e)ample, we $et descriptive statistics for the &lder varia'le:

This output tells us that we have 6+ o'servations >", the mean num'er of older si'lin$s is 1.2+ and the standard deviation of the num'er of older si'lin$s is 1.255. The standard error of the mean the standard deviation of the samplin$ distri'ution of means" is 0.1?5 1.255 @ sAuare root of 6+ 4 0.1?5".

The second part of the output $ives the value of the statistical test:

The second column of the output $ives us the t-test value: 1.2+ - 1" @ 1.255 @ sAuare root of 6+" 4 1.610 Bif you do the calculation, the values will not match e)actly 'ecause of round-off error". The third column tells us that this t test has 65 de$rees of freedom 6+ 1 4 65". The fourth column tells us the two-tailed si$nificance the 2-tailed p value." 0ut we didnCt want a two-tailed testD our hypothesis is one tailed and there is no option to specify a one-tailed test. 0ecause this is a one-tailed test, loo! in a ta'le of critical t values to determine the critical t. The critical t with 65 de$rees of freedom, 3 4 .05 and one-tailed is 1.+EF. +. Determine if we can reGect the null hypothesis or not. The decision rule is: if the onetailed critical t value is less than the o'served t :>D the means are in the ri$ht order, then we can reGect ,0. (n this e)ample, the critical t is 1.+EF from the ta'le of critical t values" and the o'served t is 1.610, so we fail to reGect ,0. That is, there is insufficient evidence to conclude that the mean num'er of older si'lin$s for the PS* 21+ classes is lar$er than 1. (f we were writin$ this for pu'lication in an :P: Gournal, we would write it as: : t test failed to reveal a statistically relia'le difference 'etween the mean num'er of older si'lin$s that the PS* 21+ class has ; 4 1.2+, s 4 1.2+" and 1, t 65" 4 1.610, p H .05, 3 4 .05.

Independent Samples t-Tests Single Value Groups


%hen two samples are involved, the samples can come from different individuals who are not matched the samples are independent of each other." &r the sample can come from the same individuals the samples are paired with each other" and the samples are not independent of each other. : third alternative is that the samples can come from different individuals who have 'een matched on a varia'le of interestD this type of sample will not 'e independent. The form of the ttest is sli$htly different for the independent samples and dependent samples types of two sample tests, and SPSS has separate procedures for performin$ the two types of tests. The (ndependent Samples t-test can 'e used to see if two means are different from each other when the two samples that the means are 'ased on were ta!en from different individuals who have not 'een matched. (n this e)ample, we will determine if the students in sections one and two of PS* 21+ have a different num'er of older si'lin$s. %e will follow our customary steps:

1. %rite the null and alternative hypotheses first: ,0: -Section 1 4 -Section 2 ,1: -Section 1 I -Section 2 %here - is the mean num'er of older si'lin$s that the PS* 21+ students have. 2. Determine if this is a one-tailed or a two-tailed test. 0ecause the hypothesis involves the phrase 1different1 and no orderin$ of the means is specified, this must 'e a two tailed test. 2. Specify the 3 level: 3 4 .05 6. Determine the appropriate statistical test. The varia'le of interest, older, is on a ratio scale, so a 7-score test or a t-test mi$ht 'e appropriate. 0ecause the population standard deviation is not !nown, the 7-test would 'e inappropriate. Jurthermore, there are different students in sections 1 and 2 of PS* 21+, and they have not 'een matched. 0ecause of these factors, we will use the independent samples t-test. 5. 8alculate the t value, or let SPSS do it for you9 The command for the independent samples t tests is found at :naly7e # 8ompare ;eans # (ndependent-Samples T Test this is shorthand for clic!in$ on the :naly7e menu item at the top of the window, and then clic!in$ on 8ompare ;eans from the drop down menu, and (ndependent-Samples T Test from the pop up menu.":

The (ndependent-Samples t Test dialo$ 'o) will appear:

Select the dependent varia'le s" that you want to test 'y clic!in$ on it in the left hand pane of the (ndependent-Samples t Test dialo$ 'o). Then clic! on the upper arrow 'utton to move the varia'le into the Test <aria'le s" pane. (n this e)ample, move the &lder varia'le num'er of older si'lin$s" into the Test <aria'les 'o):

8lic! on the independent varia'le the varia'le that defines the two $roups" in the left hand pane of the (ndependent-Samples t Test dialo$ 'o). Then clic! on the lower arrow 'utton to move the varia'le in the Kroupin$ <aria'le 'o). (n this e)ample, move the

Section varia'le into the Kroupin$ <aria'le 'o):

*ou need to tell SPSS how to define the two $roups. 8lic! on the Define Kroups 'utton. The Define Kroups dialo$ 'o) appears:

(n the Kroup 1 te)t 'o), type in the value that determines the first $roup. (n this e)ample, the value of the 10 :; section is 10. So you would type 10 in the Kroup 1 te)t 'o). (n the Kroup 2 te)t 'o), type the value that determines the second $roup. (n this e)ample, the value of the 11 :; section is 11. So you would type 11 in the Kroup 2 te)t 'o):

8lic! on the 8ontinue 'utton to close the Define Kroups dialo$ 'o). 8lic! on the &= 'utton in the (ndependent-Samples t Test dialo$ 'o) to perform the t-test. The output viewer will appear with the results of the t test. The results have two main parts:

descriptive statistics and inferential statistics. Jirst, the descriptive statistics:

This $ives the descriptive statistics for each of the two $roups as defined 'y the $roupin$ varia'le." (n this e)ample, there are 16 people in the 10 :; section >", and they have, on avera$e, 0.?+ older si'lin$s, with a standard deviation of 1.02E older si'lin$s. There are 22 people in the 11 :; section >", and they have, on avera$e, 1.66 older si'lin$s, with a standard deviation of 1.21? older si'lin$s. The last column $ives the standard error of the mean for each of the two $roups. The second part of the output $ives the inferential statistics:

The columns la'eled 1LeveneCs Test for MAuality of <ariances1 tell us whether an assumption of the t-test has 'een met. The t-test assumes that the varia'ility of each $roup is appro)imately eAual. (f that assumption isnCt met, then a special form of the t-test should 'e used. Loo! at the column la'eled 1Si$.1 under the headin$ 1LeveneCs Test for MAuality of <ariances1. (n this e)ample, the si$nificance p value" of LeveneCs test is . 202. (f this value is less than or eAual to your 3 level for the test usually .05", then you can reGect the null hypothesis that the varia'ility of the two $roups is eAual, implyin$ that the variances are uneAual. (f the p value is less than or eAual to the 3 level, then you should use the 'ottom row of the output the row la'eled 1MAual variances not assumed.1" (f the p value is $reater than your 3 level, then you should use the middle row of the output the row la'eled 1MAual variances assumed.1" (n this e)ample, .202 is lar$er than 3, so we will assume that the variances are eAual and we will use the middle row of the output. The column la'eled 1t1 $ives the o'served or calculate t value. (n this e)ample, assumin$ eAual variances, the t value is 1.6+1. %e can i$nore the si$n of t for a two tailed t-test." The column la'eled 1df1 $ives the de$rees of freedom associated with the t test. (n this e)ample, there are 66 de$rees of freedom.

The column la'eled 1Si$. 2-tailed"1 $ives the two-tailed p value associated with the test. (n this e)ample, the p value is .151. (f this had 'een a one-tailed test, we would need to loo! up the critical t in a ta'le. +. Decide if we can reGect ,0: :s 'efore, the decision rule is $iven 'y: (f p . 3 , then reGect ,0. (n this e)ample, .151 is not less than or eAual to .05, so we fail to reGect ,0. That implies that we failed to o'serve a difference in the num'er of older si'lin$s 'etween the two sections of this class. (f we were writin$ this for pu'lication in an :P: Gournal, we would write it as: : t test failed to reveal a statistically relia'le difference 'etween the mean num'er of older si'lin$s that the 10 :; section has ; 4 0.?+, s 4 1.02E" and that the 11 :; section has ; 4 1.66, s 4 1.21?", t 66" 4 1.6+1, p 4 .151, 3 4 .05.

Independent Samples t-Tests Cut Point Groups


Sometimes you want to perform a t-test 'ut the $roups are defined 'y a varia'le that is not dichotomous i.e., it has more than two values." Jor e)ample, you may want to see if the num'er of older si'lin$s is different for students who have hi$her KP:s than for students who have lower KP:s. Since there is no sin$le value of KP: that specifies 1hi$her1 or 1lower1, we cannot proceed e)actly as we did 'efore. 0efore proceedin$, decide which value you will use to divide the KP:s into the hi$her and lower $roups. The median would 'e a $ood value, since half of the scores are a'ove the median and half are 'elow. (f you do not remem'er how to calculate the median see the freAuency command in the descriptive statistics tutorial." 1. %rite the null and alternative hypotheses first: ,0: -lower KP: 4 -hi$her KP: ,1: -lower KP: I -,i$her KP: %here - is the mean num'er of older si'lin$s that the PS* 21+ students have. 2. Determine if this is a one-tailed or a two-tailed test. 0ecause the hypothesis involves the phrase 1different1 and no orderin$ of the means is specified, this must 'e a two tailed test. 2. Specify the 3 level: 3 4 .05 6. Determine the appropriate statistical test. The varia'le of interest, older, is on a ratio scale, so a 7-score test or a t-test mi$ht 'e appropriate. 0ecause the population standard deviation is not !nown, the 7-test would 'e inappropriate. Jurthermore, different students have hi$her and lower KP:s, so we have a 'etween-su'Gects desi$n. 0ecause of these factors, we will use the independent samples t-test. 5. 8alculate the t value, or let SPSS do it for you. The command for the independent samples t tests is found at :naly7e # 8ompare ;eans # (ndependent-Samples T Test this is shorthand for clic!in$ on the :naly7e menu item at the top of the window, and then clic!in$ on 8ompare ;eans from the drop down menu,

and (ndependent-Samples T Test from the pop up menu.":

The (ndependent-Samples t Test dialo$ 'o) will appear:

Select the dependent varia'le s" that you want to test 'y clic!in$ on it in the left hand pane of the (ndependent-Samples t Test dialo$ 'o). Then clic! on the upper arrow 'utton to move the varia'le into the Test <aria'le s" pane. (n this e)ample, move the &lder

varia'le num'er of older si'lin$s" into the Test <aria'les 'o):

8lic! on the independent varia'le the varia'le that defines the two $roups" in the left hand pane of the (ndependent-Samples t Test dialo$ 'o). Then clic! on the lower arrow 'utton to move the varia'le in the Kroupin$ <aria'le 'o). (f there already is a varia'le in the Kroupin$ <aria'le 'o), clic! on it if it is not already hi$hli$hted, and then clic! on the lower arrow which should 'e pointin$ to the left." (n this e)ample, move the KP: varia'le into the Kroupin$ <aria'le 'o):

*ou need to tell SPSS how to define the two $roups. 8lic! on the Define Kroups 'utton. The Define Kroups dialo$ 'o) appears:

8lic! in the circle to the left of 18ut Point:1. Then type the value that splits the varia'le into two $roups. Kroup one is defined as all scores that are $reater than or eAual to the cut point. Kroup two is defined as all scores that are less than the cut point. (n this e)ample, use 2.00E the median of the KP: varia'le" as the cut point value:

8lic! on the 8ontinue 'utton to close the Define Kroups dialo$ 'o). 8lic! on the &= 'utton in the (ndependent-Samples t Test dialo$ 'o) to perform the t-test. The output viewer will appear with the results of the t test. The results have two main parts: descriptive statistics and inferential statistics. Jirst, the descriptive statistics:

This $ives the descriptive statistics for each of the two $roups as defined 'y the $roupin$ varia'le." (n this e)ample, there are 22 people with a KP: $reater than or eAual to 2.01 >", and they have, on avera$e, 1.06 older si'lin$s, with a standard deviation of 1.1?+ older si'lin$s. There are 22 people with a KP: less than 2.01 >", and they have, on avera$e, 1.6? older si'lin$s, with a standard deviation of 1.210 older si'lin$s. The last column $ives the standard error of the mean for each of the two $roups.

The second part of the output $ives the inferential statistics:

:s 'efore, the columns la'eled 1LeveneCs Test for MAuality of <ariances1 tell us whether an assumption of the t-test has 'een met. Loo! at the column la'eled 1Si$.1 under the headin$ 1LeveneCs Test for MAuality of <ariances1. (n this e)ample, the si$nificance p value" of LeveneCs test is .2?2. (f this value is less than or eAual to your 3 level for this test, then you can reGect the null hypothesis that the varia'ilities of the two $roups are eAual, implyin$ that the variances are uneAual. (n this e)ample, .2?2 is lar$er than our 3 level of .05, so we will assume that the variances are eAual and we will use the middle row of the output. The column la'eled 1t1 $ives the o'served or calculated t value. (n this e)ample, assumin$ eAual variances, the t value is 1.1?0. %e can i$nore the si$n of t when usin$ a two-tailed t-test." The column la'eled 1df1 $ives the de$rees of freedom associated with the t test. (n this e)ample, there are 66 de$rees of freedom. The column la'eled 1Si$. 2-tailed"1 $ives the two-tailed p value associated with the test. (n this e)ample, the p value is .266. (f this had 'een a one-tailed test, we would need to loo! up the critical t in a ta'le. +. Decide if we can reGect ,0: :s 'efore, the decision rule is $iven 'y: (f p . 3 , then reGect ,0. (n this e)ample, .266 is $reater than .05, so we fail to reGect ,0. That implies that there is not sufficient evidence to conclude that people with hi$her or lower KP:s have different num'er of older si'lin$s. (f we were writin$ this for pu'lication in an :P: Gournal, we would write it as: :n eAual variances t test failed to reveal a statistically relia'le difference 'etween the mean num'er of older si'lin$s for people with hi$her ; 4 1.06, s 4 1.1?+" and lower KP:s ; 4 1.6?, s 4 1.210", t 66" 4 1.1?, p 4 .266, 3 4 .05.

Paired Samples t-Tests


%hen two samples are involved and the values for each sample are collected from the same individuals that is, each individual $ives us two values, one for each of the two $roups", or the

samples come from matched pairs of individuals then a paired-samples t-test may 'e an appropriate statistic to use. The paired samples t-test can 'e used to determine if two means are different from each other when the two samples that the means are 'ased on were ta!en from the matched individuals or the same individuals. (n this e)ample, we will determine if the students have different num'ers of youn$er and older si'lin$s. 1. %rite the null and alternative hypotheses: ,0: -older 4 -youn$er ,1: -older I -youn$er %here - is the mean num'er of si'lin$s that the PS* 21+ students have. 2. Determine if this is a one-tailed or a two-tailed test. 0ecause the hypothesis involves the phrase 1different1 and no orderin$ of the means is specified, this must 'e a two tailed test. 2. Specify the 3 level: 3 4 .05 6. Determine the appropriate statistical test. The varia'les of interest, older and youn$er, are on a ratio scale, so a 7-score test or a t-test mi$ht 'e appropriate. 0ecause the population standard deviation is not !nown, the 7-test would 'e inappropriate. Jurthermore, the same students are reportin$ the num'er of older and youn$er si'lin$s, we have a withinsu'Gects desi$n. 0ecause of these factors, we will use the paired samples t-test. 5. Let SPSS calculate the value of t for you. The command for the paired samples t tests is found at :naly7e # 8ompare ;eans # Paired-Samples T Test this is shorthand for clic!in$ on the :naly7e menu item at the top of the window, and then clic!in$ on 8ompare ;eans from the drop down menu, and Paired-Samples T Test from the pop up menu.":

The Paired-Samples t Test dialo$ 'o) will appear:

*ou must select a pair of varia'les that represent the two conditions. 8lic! on one of the varia'les in the left hand pane of the Paired-Samples t Test dialo$ 'o). Then clic! on the other varia'le in the left hand pane. 8lic! on the arrow 'utton to move the varia'les into the Paired <aria'les pane. (n this e)ample, select &lder and *oun$er varia'les num'er of older and youn$er si'lin$s" and then clic! on the arrow 'utton to move the pair into the Paired <aria'les 'o):

8lic! on the &= 'utton in the Paired-Samples t Test dialo$ 'o) to perform the t-test. The output viewer will appear with the results of the t test. The results have three main parts: descriptive statistics, the correlation 'etween the pair of varia'les, and inferential

statistics. Jirst, the descriptive statistics:

This $ives the descriptive statistics for each of the two $roups as defined 'y the pair of varia'les." (n this e)ample, there are 65 people who responded to the &lder si'lin$s Auestion >", and they have, on avera$e, 1.26 older si'lin$s, with a standard deviation of 1.2+ older si'lin$s. These same 65 people also responded to the *oun$er si'lin$s Auestion >", and they have, on avera$e, 1.12 youn$er si'lin$s, with a standard deviation of 1.20 youn$er si'lin$s. The last column $ives the standard error of the mean for each of the two varia'les. The second part of the output $ives the correlation 'etween the pair of varia'les:

This a$ain shows that there are 65 pairs of o'servations >". The correlation 'etween the two varia'les is $iven in the third column. (n this e)ample r 4 -.2F2. The last column $ive the p value for the correlation coefficient. :s always, if the p value is less than or eAual to the alpha level, then you can reGect the null hypothesis that the population correlation coefficient N" is eAual to 0. (n this case, p 4 .052, so we fail to reGect the null hypothesis. That is, there is insufficient evidence to conclude that the population correlation N" is different from 0. The third part of the output $ives the inferential statistics:

The column la'eled 1;ean1 is the difference of the two means 1.26 - 1.12 4 0.11 in this e)ample the difference is due to round off error"." The ne)t column is the standard deviation of the difference 'etween the two varia'les 1.F? in this e)ample."

The column la'eled 1t1 $ives the o'served or calculated t value. (n this e)ample, the t value is 0.2EE you can i$nore the si$n." The column la'eled 1df1 $ives the de$rees of freedom associated with the t test. (n this e)ample, there are 66 de$rees of freedom. The column la'eled 1Si$. 2-tailed"1 $ives the two-tailed p value associated with the test. (n this e)ample, the p value is .E0?. (f this had 'een a one-tailed test, we would need to loo! up the critical value of t in a ta'le. +. Decide if we can reGect ,0: :s 'efore, the decision rule is $iven 'y: (f p . 3, then reGect ,0. (n this e)ample, .E0? is not less than or eAual to .05, so we fail to reGect ,0. That implies that there is insufficient evidence to conclude that the num'er of older and youn$er si'lin$s is different. (f we were writin$ this for pu'lication in an :P: Gournal, we would write it as: : paired samples t test failed to reveal a statistically relia'le difference 'etween the mean num'er of older ; 4 1.26, s 4 1.2+" and youn$er ; 4 1.12, s 4 1.20" si'lin$s that the students have, t 66" 4 0.2EE, p 4 .E0?, 3 4 .05.

S-ar putea să vă placă și