9.4: Using SPSS
- Page ID
- 50062
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)As reviewed in Chapter 2, software such as SPSS can be used to expedite analyses once data have been properly entered into the program. Data need to be organized and entered into SPSS in ways that serve the analysis to be conducted. Thus, this section focuses on how to enter and analyze data for a dependent samples t-test using SPSS. SPSS version 29 was used for this book; if you are using a different version, you may see some variation from what is shown here.
Entering Data
The dependent samples t-tests is bivariate but the way data are entered is different than for an independent samples t-test. Instead of entering a grouping variable, posttest scores are entered as one variable and pretest scores are entered as a second variable in SPSS. The variable being measured twice (one at posttest and once a pretest) and compared must be quantitative and should have been measured using numbers on an interval or ratio scale. If this is true of your data, you are ready to open SPSS and begin entering your data.
Open the SPSS software, click “New Dataset,” then click “Open” (or “OK” depending on which is shown in the version of the software you are using). This will create a new blank spreadsheet into which you can enter data. There are two tabs which appear towards the bottom of the spreadsheet. One is called “Variable View” which is the tab that allows you to tell the software about your variables. The other is called “Data View” which is the tab that allows you to enter your data.
Click on the Variable View tab. This tab of the spreadsheet has several columns to organize information about the variables. The first column is titled “Name.” Start here and follow these steps:
- Click the first cell of that column and enter the name for your posttest version of the variable using no spaces, special characters, or symbols. You can name this variable “PosttestMotivation” or just “Posttest” for simplicity. Hit enter and SPSS will automatically fill in the other cells of that row with some default assumptions about the data.
- Click the first cell of the column titled “Type” and then click the three dots that appear in the right side of the cell. Specify that the data for that variable appear as numbers by selecting “Numeric.” For numeric data SPSS will automatically allow you to enter values that are up to 8 digits in length with decimals shown to the hundredths place as noted in the “Width” and “Decimal” column headers, respectively. You can edit these as needed to fit your data, though these settings will be appropriate for most quantitative variables in the behavioral sciences.
- Click the first cell of the column titled “Label.” This is where you can specify what you want the variable to be called in output, including in tables and graphs. You can use spaces or phrases here, as desired. For example, you could clarify here that the variable Posttest refers to “Posttest Motivation” by indicating as such in the label column for this variable.
- Click on the first cell of the column titled “Measure.” A pulldown menu with three options will allow you to specify the scale of measurement for the variable. Select the “scale.” option because the variable was measured on the interval or ratio scale. Now SPSS is set-up for data for the posttest scores of the main test variable.
- Move to the second row of the variable table and repeat steps 1 through 4, specifying the variable as Pretest and the label as “Pretest Motivation.” Once this is done, SPSS will be set-up for data for the pretest scores of the main test variable.
Here is what the Variable View tab would look like when created for Data Set 9.1:
Now you are ready to enter your data. Click on the Data View tab toward the bottom of the spreadsheet. This tab of the spreadsheet has several columns into which you can enter the data for each variable. Each column will show the names given to the variables that were entered previously using the Variable View tab. Click the first cell corresponding to the first row of the first column. Start here and follow these steps:
- Enter the data for the posttest version of the variable moving down the rows under the first column.
- Enter the data for the pretest version of the variable moving down the rows under the second column. Take special care to ensure the data for each case appear next to each other. This means that each posttest score must appear next to its pretest score in the same order in which they appear in the original version of Data Set 9.1 in this chapter.
- Then hit save to ensure your data set will be available for you in the future. Here is how Data Set 9.1 looks entered into SPSS:
Once all the variables have been specified and the data have been entered, you can begin analyzing the data using SPSS.
Conducting a Dependent Samples t-Test in SPSS
The steps to running a dependent sample t-test in SPSS are:
- Click Analyze -> Compare Means and Proportions -> Paired-Samples T Test from the pull down menus as shown below.
- Drag the name of the posttest version of the variable from the list on the left into the section for Variable 1 in the Paired Variables box on the right of the command window. You can also do this by clicking on the variable name to highlight it and the clicking the arrow to move the variable from the left into the Variable 1 text box on the right. Next, drag (or use the arrow to move) the name of the pretest version of the variable from the list on the left into the section for Variable 2 in the Paired Variables box on the right of the command window. If the version of SPSS you are using has a check box to estimate effect sizes, click that as well and select the “Standard deviation of the difference” option.
If you reverse their order and put the pretest data as Variable 1 and the posttest data as Variable 2, it is not problematic. It will simply reverse their order in the formula causing the sign of the result to switch from either positive to negative or negative to positive. However, you could still look at the means for posttest and pretest to determine which, if either, was higher; thus, the sign of the t-value is not a crucial element in determining whether a directional hypothesis was supported using a dependent samples t-test.
- Click OK.
- The output (which means the page of calculated results) will appear in a new window of SPSS known as an output viewer. The results will appear in four tables as follows:
Mean | N | Std. Deviation | Std. Error Mean | |
---|---|---|---|---|
Posttest Motivation | 5.3000 | 10 | 1.49443 | .47258 |
Pretest Motivation | 5.1000 | 10 | 1.52388 | .48189 |
N | Correlation | One-Sided p | Two-Sided p | |
---|---|---|---|---|
Posttest Motivation & Pretest Motivation | 10 | .424 | .111 | .221 |
Paired Differences | Significance | ||||||||
---|---|---|---|---|---|---|---|---|---|
95% Confidence Interval of the Difference | |||||||||
Mean | Std. Deviation | Std. Error Mean | Lower | Upper | t | \(df\) | One Sided \(p\) | Two Sided \(p\) | |
Posttest Motivation -Pretest Motivation | .20000 | 1.61933 | .51208 | -.95840 | 1.35840 | .391 | 9 | .353 | .705 |
95% Confidence Interval of the Difference | |||||
Standardizera | Point Estimate | Lower | Upper | ||
Posttest Motivation | Cohen's \(d\) | 1.61933 | .124 | -.502 | .742 |
Pretest Motivation | Hedges' correction | 1.77194 | .113 | -.459 | .679 |
Reading SPSS Output for a dependent samples t-Test
The first table shows the descriptive statistics for the test. These include the sample size, the sample means, the sample standard deviations, and the standard errors for the posttest scores and the pretest scores for Data Set 9.1. Note that the overall sample size is 10 because the same 10 participants who completed the pretest also completed the posttest. We will need the means and standard deviations for each wave of testing (posttest and pretest) when writing an APA-formatted results summary.
The second table shows correlation between the posttest and pretest scores. We do not need these for the standard way we are using the dependent samples t-test in this chapter so we can move to the next table of results.
The third output table shows the t-test results. Though the table lists several things, the main three items we need are the degrees of freedom, the obtained t-value, and the \(p\)-value. We see that the t-value was 0.39 when rounded to the hundredths place, the \(df\) was 9, and the \(p\)-value was 0.705 for the two-tailed (called “two-sided” by SPSS) test which means the result was not significant. Remember, when using the standard alpha level of .05, a \(p\)-value that is less than .05 is significant and a \(p\)-value greater than 0.05 is not significant. These values and the conclusion that the result was not significant are consistent with what we found when using hand-calculations and comparing the obtained t-value to the critical value that fit our hypothesis and data. Therefore, the results and conclusions when using hand-calculations and when reading the results of SPSS agree. This is what should always happen unless a mistake was made in either the use of hand-calculations or in using SPSS. Note that you may see slight variation when comparing hand-calculations to SPSS results if you rounded your steps when doing the work by hand.
The last table of results in the SPSS output shows the effect sizes. This will only appear if you checked the box in the command window to select this extra analysis. Cohen’s d can generally be used; however, the Hedge’s correction is sometimes recommended and should be considered when working with sample sizes smaller than 20. Because our t-test was not significant and, thus, we are only checking the effect size for demonstration purposes, we will stick to reviewing the Cohen’s \(d\) value. The effect size is reported in the SPSS output table in the column labelled “point estimate.” SPSS reports Cohen’s d in this column as 0.124, or 0.12 when rounded to the hundredths place. If you compare the result for Cohen’s \(d\) shown in the SPSS output table to our hand-calculations for earlier, you will see they are the same. All is well.
Reading Review 9.4
- What scale of measurement should be indicated in SPSS for each version of the test variable?
- Under which table and column of the SPSS output can the t-value be found?
- Under which table and column of the SPSS output can the \(p\)-value be found?
- Under which table and column of the SPSS output can the Cohen’s \(d\)-value be found?
- Under what conditions is the Hedge’s correction for effect size recommended over using Cohen’s \(d\)?