Define a variable in SPSS
When you plan to perform a complicated operation, like a 'Z test', you must define variables in SPSS before you perform the test. In other words, you need to tell SPSS what your variables represent. For example, you may have a list of boys and girls in a classroom study with a “1” representing a boy in your data list and 2 representing a girl. SPSS won’t know what a “1” or a “2” means until you tell it, through defining variables.
Sample Problem:
Define the variables for gender in the following data sheet, where “1” represents a boy and “2” represents a girl:
Step 1:
Click “Data” and then click “Define Variable Properties”.
Step 2:
Click a variable in the left window that you want to define. In this sample problem, we want to define the “gender” variable, so click “Gender” and then click the center arrow.
In this sample problem, we want to define the “gender” variable, so click “Gender” and then click the center arrow.
Step 3:
Click “Continue.” The main Define Variable Properties window will open.
Step 4:
Type your variable names in the “Label” section of the Define Properties window. For this sample problem, type “boy” to the right of the value 1.00 and “girl” to the right of the value 2.00.
Step 5:
Click “OK” to save the variable changes.
Tip:
You can also define variables by double-clicking on the variable name (at the top of the column). This opens the variable window where you can double-click on the “…” to open the a define variable window. If you choose this option, you’ll need to separately enter the variable value and variable name.
Watch How
You can also watch the video below to learn how to define a variable.