Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Introduction to SPSS

Purpose
The purpose of this assignment is to introduce you to SPSS, the most commonly used statistical package in the social
sciences. You will create a new data file and calculate some basic probabilities. Next you will open an existing data file
and calculate the same basic probabilities.

Part I: In this part of the assignment, we’ll create a new SPSS data file and analyze the data.

Creating an SPSS File

Open a new SPSS File


1. Double click the SPSS icon on the desktop. If SPSS is not on the desktop, click on the Start button, then scroll to
and click on IBM SPSS Statistics. Then select IBM SPSS 25. If you cannot find IBM SPSS 25, click the Start
button and then type “SPSS” into the Search box.
2. In some cases, two windows will appear: an Untitled DataSet and the Startup Window. The Startup Window will
ask you what you would like to do. Click Close.

Setting Output Display


1. Click Edit from the top menu and select Options from the drop-down menu. Click the Viewer tab.
2. On the left side of this window, you will see a list of item icons. The third icon represents Notes. To the right of
the icon, you will see the words “Contents are initially.” Make sure Notes are set to Hidden.
Note: The notes take up a lot of space in the Output file and would be in your way. For this course, you don’t
need them in your Output file. Simpler is better.
3. The fourth icon from the top is Title. Make sure this item is set to Shown.
4. Uncheck the box in the bottom left of this window that says, Display commands in the log.
5. Click Apply at the bottom of this window, and then click OK. An output window will be created. However, you
might not be able to see it, because it might be minimized. That’s okay.

Naming Variables
1. SPSS data files have two ways to view the data. Variable View is used for creating the file. Data View is used
for entering data. Click on the Variable View tab at the bottom left of the Untitled DataSet.
2. Click on the first empty cell in the Name column.
3. Type in “Status” for the variable. Variable names must be short. Press Enter.
4. Click on the first empty cell in the Label column. Type in “Relationship Status” for the Status variable. The
variable label can be much longer than the variable name. Press Enter.
5. Click on the cell directly below “Status”.
6. Type in “Sex” for the next variable.
7. Type in “Sex” as the label for the Sex variable.
8. For both variables, change the Type to String. To do this, first click in the cell that shows the Type for that
variable. Within the Type cell, click on the ellipsis (…). A new window will appear. Select String. Then click
OK. Repeat this process for the other variable.

Entering Data in SPSS


1. Click on the Data View tab at the bottom left of the window. In the Data View window, each row represents a
participant and each column represents a variable.
2. Click on the first empty cell under the first variable and enter “Married” (the Status for the first participant).
3. Enter the following set of data. Use the arrow or tab keys to move between cells. When you have finished
entering data for one participant/row, scroll back and begin with the next participant/row. Note that you do not
need to enter the participant numbers (these are already listed in the far left column as grey numbers). Here are
the data:

1
Participant Status Sex
1 Married Male
2 Single Male
3 Divorced Female
4 Widowed Male
5 Married Female
6 Single Male
7 Single Female
8 Divorced Female
9 Married Female
10 Single Female
11 Single Male
12 Married Female
13 Married Female
14 Single Male

Saving Data in SPSS

Initial Save
1. Switch back to the Untitled DataSet. To do this, click the Window menu, and select Untitled1 [DataSet0].
2. Click on the File menu at the top left of the window.
3. Click on Save As from the drop down menu.
4. From the Look In menu, open a place where you can save your file (such as a flash drive or a cloud drive).
5. Type in what you would like to call your file next to File Name. Sometimes, SPSS will suggest a file name, such
as “Untitled1 [DataSet0]”. Change this to something that will be easier to recognize, like “Psy 210 Sex and Status
Data”.
6. Click Save.
7. An output window may appear, telling you that the file has been compressed. If so, you can switch back to the
Data window by clicking Window, Data Editor.

Subsequent Saves
1. To save your data, you must first activate the data editor. To do this, click somewhere inside your data editor.
Alternatively, click on the Window menu and select the IBM SPSS Statistics Data Editor.
2. Click on the File menu at the top left of the window.
3. Click Save on the drop down menu.
4. If you want to save the file under a different name, use Save As.
5. Frequently save your SPSS files.

Adding a Title to the Output File


In this section, you will add a title to your Output file.
1. Your SPSS Viewer window is divided into two parts: the main part where you see your output, and an outline on
the left hand side. If you cannot see the outline, it is minimized. Just drag the divider bar to the right, so that you
can see the outline. To add a title, we will use the Outline section.
2. Move your mouse over to the Outline on the left-hand side of the screen and click on the word "Output". When
you click on this word, it will highlight this word. Sometimes it will highlight all the sub-headings as well; that’s
okay.
3. Click on the Insert menu.
4. Click on New Title. The word “Title” will appear just after the word “Output” in the outline window. A blank
title box will also be added at the very top of the page in your statistical results, and so all of your results will shift
down a little. Sometimes this blank title box is invisible. If yours is invisible, you can show where it is by
clicking on the word “Title” in the Outline window.
5. Now that you can see where the title box is in the main output window, open it for editing by double-clicking on
it. The title should give names of all group members, the course number and assignment name, and today’s date.
Use three lines, so this looks organized.

2
6. When you are finished typing, click somewhere else in the output window.
7. Now add a second title, below the first one. Type the title “Sex and Relationship Status”.
8. Sometimes your title will end up in the wrong part of your output. To fix this, move your mouse over to the
outline window on the left. Then drag the title to where you want it to be. You CANNOT drag stuff around in
the main window: You have to use the outline window. Any time something feels like it is out of order, use the
outline window to move it to its proper place.
9. Keep this Output file open, so that new output is added to the bottom of this file.

Saving Your Output


In addition to saving your data, you must also save your output.
1. Click somewhere inside your output window
2. Click on the File menu at the top left of the window.
3. Click Save As on the drop down menu. You should name your file “Intro to SPSS [Last Name] Output” (replace
“Last Name” with the last names of all group members) by typing the names in the File name box. Clear file
names will make it easy to keep track of your assignments throughout the course.
4. You should save your Output file regularly, perhaps after each analysis you do.
5. Do NOT close your Output file after each analysis: if you do that, you will end up with many Output files (which
is very confusing), each of which has to be printed separately. Keep your Output file open, so that new
analyses are added to the bottom of the file, and save regularly, in case your computer crashes.

Calculating Simple Probabilities


1. Click on the Analyze menu.
2. Click on Descriptive Statistics on the drop down menu.
3. Click on Frequencies from the side menu.
4. Choose one of the two variables from the menu on the left (click once to highlight).
5. Click on the arrow button between the two boxes to move that variable to the Variable(s) box on the right.
Alternatively, you can drag the variable to the Variable(s) box.
6. Make sure that the box next to “Display Frequency Tables” has been selected. Click OK.
7. This will bring up an Output window. When you first open the Output window, SPSS may show that it is
“(Processing…)”. After a few seconds, the “(Processing…)” symbol will be replaced by the appropriate output.
8. You can switch back and forth between the Output window and the Data Editor window by clicking on the
Window menu and selecting the window you want, or by using the icons on the Task Bar at the bottom of the
screen.
9. Check that your output shows a Valid N of 14. If you have a Valid N that is less than 14, then you missed some
of the rows when you entered the data. If you have a Valid N that is more than 14, then you may have entered
some rows twice or you may have accidently included a blank row. You need to fix your data before you proceed,
or else you will get incorrect answers for all of your frequencies. Switch back to Data View, then identify and fix
your error. If necessary, you can delete a row by (a) selecting the row, (b) clicking the Edit menu, and clicking
Clear.
10. Repeat these steps to calculate the frequencies for the second variable. When you get to step 4, move the first
variable back to the left before selecting your new variable: Because you have already calculated descriptive
statistics for the first variable; you do not need to calculate them again.

Calculating Joint and Conditional Probabilities


1. Click on the Analyze menu.
2. Click on Descriptive Statistics on the drop down menu.
3. Click on Crosstabs from the side menu.
4. Move the variable Status into the Row(s) box. To do this, select Status and then click the arrow that is pointing
at the Row box.
5. Move the variable Sex into the Column(s) box.
6. Click the Cells button.
7. To calculate the joint and conditional probabilities, in the Percentages area, check the Column, and Total boxes.
Click Continue.
8. In the Crosstabs box, click OK.

3
Computer crashes
When a computer crashes, the program you are using may close, or the entire computer may stop responding. When
this happens, it is often sufficient to turn the computer off, and then start it up again: use the power button to make sure
the computer is completely shut down. You may have to hold the button down for several seconds before the computer
turns off.
When you are working in a computer lab, turning the computer off and on again might not be enough to fix the
problem. If not, I recommend switching computers. Furthermore, sometimes there is a problem with the entire lab
(because all the computers in a lab are networked). If switching computers doesn't work, I recommend you move to
another computer lab.
Computers will crash. So be prepared by saving your files after each change you make.

Opening an Output File


If you want to open an Output file that you were working on some other day, then
1. Open SPSS, and close the pop up window that asks what you would like to do.
2. Click on the File menu.
3. Click on Open from the drop-down menu.
4. Click on Output from the side-menu.
5. Select your folder and file.
6. Click Open.

Editing Your Output

Changing Format to Show 2 Decimals


In your Frequencies tables for Status and Sex, follow the steps below to change the format of the cells in the Valid
Percent column, so that two decimals are visible for all rows.
1. Double click on the first Frequencies table to open it up for editing. Sometimes SPSS will open the table in a new
window, and sometimes it will allow you to edit it in the current window – either is fine. If this is the first time
you have attempted to edit a table, SPSS may open two pop-up windows, one titled “Formatting Toolbar” and one
titled “Pivoting Trays”. You do not need either of these windows to edit the table and so you can close them. If
they continue to pop up when you double click on tables for editing, you can uncheck them in the View and Pivot
menus.
2. Select the cells whose format you want to change. To do this, click the first cell you want to select, then hold
down the SHIFT key, and click the last cell you want to select; finally, release the SHIFT key.
3. Click on the Format menu.
4. Click on Cell Properties on the drop down menu.
5. In the Cell Properties window, click on the Format Value menu.
6. To change the number of decimals that are shown, type the number of decimals you want (e.g., 2) in the box at
the bottom of the window labeled “Decimals”. Click Apply and then click OK. Next, click somewhere else in
your output, so that your output knows you have finished editing the table.
7. Repeat these steps to change the number of decimals for the Valid Percent in the Frequencies table for your other
variable.
8. In the Relationship Status * Sex Crosstabs table, change the % of Total, and % within Sex,to show two decimals.
9. Save your Output file.

Deleting Output
If you made any mistakes when you were working, you might need to remove a portion of your output. For example, if
you do the same analysis twice, you should delete the extra analysis. To delete a portion of your output:
1. Click once on the heading, table, or graph you want to delete.
2. Press the Delete key on your keyboard.

To Show More Results


Sometimes the computer will not show you all of your results for a particular section. If this happens, to show all your
results you should
1. Double click on the section. This will select the section and open it for editing.
4
2. Click on one of the dots that are on the border, and drag it to resize the window. If no black dots show up, you are
seeing everything there is to see.

Interpreting Your Output


The frequencies tables you just created can be used to calculate probabilities.
1. Using the Frequencies table for Status, calculate the probability that one of the participants is Married.
2. Insert your answer into your output, using the following steps:
a. Select the Crosstabs table by clicking on it once. This way your textbox will show up in the right place.
A red arrow will point to the Crosstabs table.
b. Click the Insert menu.
c. Select New Text from the drop down menu.
d. Type your answer to the probability question, with four decimal places. For example, the output shows
that the Valid Percent for Divorced is 14.29, if you wanted to show the probability of being divorced, you
would write P(divorced) = .1429. As you can see, the probability is simply the Valid Percent divided by
100. Using this format, show the probability that a participant is Married.
3. Using the Frequencies table for Sex, calculate the probability that one of the participants is Female. Type your
answer into the same textbox as the previous probability.
4. Using the Crosstabs table, calculate the joint probability that one of the participants is a Single Male. Type your
answer into the same textbox as the previous probability.
5. Using the Crosstabs table, calculate the conditional probability that one of the participants is a married given they
are Male. Type your answer into the same textbox as the previous probability.
6. If you followed these instructions correctly, your textbox should be directly below the Crosstabs table. If it isn’t,
don’t worry. We will show you how to move it in a minute.

Part II: In this part of the assignment, we’ll work with an existing SPSS data file.

Getting the data file from the Open Science Framework website
1. Using a web browser other than Internet Explorer (e.g., Mozilla Firefox, Google Chrome, or Safari), go to the
SPSS Assignments for Introductory Statistics project page on the Open Science Framework website at
https://osf.io/5qy2p/
2. Click the Data Files component. Then click the Questionnaire Data component. Locate the Questionnaire
Data.sav data file. You may have to click the + symbol next to Questionnaire Data or next to OSF Storage in
order to see it.
3. Click on Questionnaire Data.sav. This will allow you to preview the file.
4. To download the data file, click the Download button in the upper right part of the screen.
5. A Save As window may appear. If so, select the appropriate drive. Check that the file name is specified in the File
name box. Then click Save.
6. The file will be downloaded. Once the download is complete, click on the file to open it.

Opening a File
If you have already downloaded the data file and you just need to open it, here’s what you do:
1. In SPSS, click on the File menu at the top left of the window.
2. Click Open on the drop down menu.
3. Click Data from the side menu.
4. Select the appropriate drive from the Look in menu at the top of the screen.
5. Select the appropriate folder from the list of folders in the middle of the screen.
6. Once you are in the correct folder, double-click on the file name, to select and open it. Alternatively, single click
on the file name to select it, and then click Open to open it.

Calculating Probabilities
1. Add a title to this section, saying "Student Employment" below the P(Married | Male) you previously inserted
below the Crosstabs table.
2. Calculate the simple probabilities, joint probabilities, and conditional probabilities for the following two
questions:
5
• Are you a full-time or part-time student?
• Are you employed?
The results of these analyses will appear at the bottom of your Output file, after your analyses for Part I. Make
sure you are using the SAME Output file for your entire assignment.
3. To correctly calculate the conditional probability, move Are you a full-time or part-time student? into the
Row(s) box and Are you employed? into the Column(s) box of the crosstabs menu.
4. Round the Valid Percent, % of Total, and % within Are you employed? values to 2 decimal places.
5. Calculate the following probabilities and insert your answers into your output using a new textbox:
a. The probability that a participant said they were not employed.
b. The probability that a participant said they were a full-time student.
c. The joint probability that a participant said they were a full-time student who also worked full-time.
d. The conditional probability that a participant is a full-time student given they are employed part-time.
6. This textbox should appear directly AFTER the Crosstabs table you just created. Move the textbox if necessary.
7. Save your Output file.

Using Print Preview in SPSS


When you have finished the assignment, you should use Print Preview to make sure it looks right.
1. If you want to submit everything in your Output file (which you usually do), click on the word Output in the
outline window on the left, so that all output is selected.
2. Click File, Print Preview. This shows you what it will look like when you print.
3. To close the Print Preview window and get back to the regular view, click Close.
4. If you see any errors, fix them now. For example, check that your titles are in the right location, and that you
don’t have any duplicate output. Then use Print Preview again to make sure it looks right.

Export Your File to PDF


SPSS is an expensive program that you may not have access to on other computers you use. To ensure you are able to
read your assignments from any computer, you need to export your Output file to Adobe PDF.
1. In the left-hand outline window, click once on Output. This should highlight the entire outline. Click on File in
the top left corner of the window and select Export. The Export Window will open.
2. In the Export Output Window, at the top, set Objects to Export to “All Visible”. This will ensure that extra
components such as notes and log stay out of your exported output file.
3. Change the Document type to “Portable Document Format (*.pdf)”
4. Click on the Browse button and select a new location to save your file to (such as your flash drive or your cloud
drive).
5. Name your file as “Intro to SPSS Last Name Output” (replace “Last Name” with the last names of all group
members). Click Save. Then click OK to export the PDF.
6. Navigate to your file location. To do this in Windows, right click on the Start Menu Icon and click File Explorer.
If your file is not where you tried to save it, export the Output file again, but try some of these:
Save your Output file somewhere else before you export it
Export your Output file to a different location
Email your Output file to yourself, download the file from your email, double click the file to open it, and
then export it to pdf.
If all else fails, use File / Print / Adobe PDF / Print Range: All visible output / OK. However, this method
sometimes cuts off parts of your output. Check your file carefully.
7. Open your PDF, so you can check that it is correct.

WHAT YOU SHOULD HAND IN


Hand in your Output file (in PDF format), which shows the results from both parts of this assignment.

You might also like