7.6: Using SPSS
- Page ID
- 50046
\( \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 one sample 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 one sample t-test is univariate. The variable being tested must be quantitative and should have been measured using numbers on an interval or ratio scale. If this is true, 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 of your test variable using no spaces, special characters, or symbols. 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 hundreds 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.
- 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. SPSS does not differentiate between interval and ratio data and, instead, refers to both of these as “Scale.” Select the “Scale” option because, if you are using a one sample t-test, your data should have been measured on the interval or ratio scale. If you are only planning to conduct one test, you can skip step 5 below.
- If you will conduct additional one sample t-tests with other variables, move to the second row of the spreadsheet, starting with the cell under “Name” and repeat steps 1-4 until you have entered the information for all of your variables.
Here is what the Variable View tab would look like when created for Data Set 7.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 test variable moving down the rows under the first column. If your data are already on your computer in a spreadsheet format such as excel, you can copy-paste the data in for the variable. Note: If the spreadsheet will not allow you to enter the information and/or makes a blunt tone when you try to enter the data, it means you have an error in the format of the data you are trying to enter or that they do not match the details you provided in the variable tab. Change the data format or go back to edit the information on the Variable View tab if this occurs, as appropriate. Then, return to the Data View tab to enter your data. If you are only entering and data for one variable and conducting one test, skip step 2 below.
- Repeat step 1 for each variable until all of your data have been entered.
- Then hit save to ensure your data set will be available for you in the future.
Data entered into SPSS are saved in a file format that can only be opened in specific forms of software such as SPSS. Therefore, if you use a computer to make data files at school or work that has SPSS and try to open them on a different computer which does not have SPSS, you will not be able to. SPSS files can only be opened on devices which have access to SPSS software. Keep this in mind if you plan to use different devices while practicing the use of SPSS.
Here is what the Data View tab would look like for the first 21 cases when created for data set 7.1:
Once all the variables have been specified and the data have been entered, you can begin analyzing the data using SPSS.
Conducting a One Sample t-Test in SPSS
The steps to running a one sample t-test in SPSS are:
- Click Analyze › Compare Means and Proportions › One-Sample T Test from the pull-down menus as shown below.
- Drag the name of the variable you want to test from the list on the left into the Test Variable box on the right of the command window. You can also do this by clicking on the variable name to highlight it and then clicking the arrow to move the variable from the left into the Variable text box on the right. Next, put the known or hypothesized population mean in the Test Value box under the Test Variable box. The population mean used for our example with Data Set 7.1 was 58.00 so this value is indicated in the Test Value box. If the version of SPSS you are using has a check box to estimate effect sizes (as shown in the picture below), click that as well.
- 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 three tables as shown below.
Reading SPSS Output for a One Sample t-Test
The first table shows the descriptive statistics for the test. These include the sample size, mean, standard deviation, and standard error. These are foundational pieces that would appear in the formula steps as we saw when we performed hand-calculations for Data Set 7.1 earlier in this chapter.
The second table shows the main test results which are needed for the evidence string. These include the t value, the degrees of freedom (df) and the p-value for a one-tailed test (called “One-Sided p” in SPSS) and for a two-tailed test (called a Two-Sided p in SPSS). When using the standard alpha level of .05, a p-value that is less than .05 is significant. This is because the p-value shown in SPSS is the risk of a Type I Error (which is what the alpha level is saying needs to be less than .05). Our hypothesis for Data Set 7.1 earlier in this chapter was non directional and, thus, the two-tailed (i.e. two-sided) p-value should be used. SPSS reports this value to be .002. The obtained p-value of .002 is less than the alpha level of .05, thus, the result is significant. This conclusion is consistent with the conclusion we had when using hand-calculations to compare 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 are consistent with one another. This is what should always happen unless a mistake was made in either the use of hand-calculations or SPSS.
Take a careful look at the results (i.e. the SPSS output) and you will see they match what we found when doing computations by hand with Data Set 7.1.
You will sometimes see slight variation in results due to rounding error when comparing hand-calculated results to SPSS generated results. However, these differences should usually only appear in the third (thousandths) or fourth (ten-thousandths) decimal place; your hand calculated results will usually match the SPSS generated results to the hundredths place (meaning they should match to two decimal places).
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. By default, SPSS will provide two calculations of effect size: Cohen’s d and Hedge’s correction. The results of these calculations will be similar for data sets with sample sizes of 20 or greater. When a sample size is approximately 20 or more, Cohen’s d can be used. When the sample size is lower than 10, the Hedge’s correction may be more appropriate. Our sample size was 25 and the results of both of these effect size estimates are similar, thus, the Cohen’s \(d\) value is appropriate to use. 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.686, or 0.69 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.
Reading Review 7.3
- What scale of measurement should be indicated in SPSS for 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 \(d\)-value be found?