cep740spssnotes1.doc

advertisement
D:\98944311.doc
Page 1 of 14
Student Handout - Pie Example - cep740spssnotes1.doc
You get in an argument with a friend about which kind of pie is most popular with UNR freshman students.
You insist that Pecan Pie is the hands-down favorite, while your friend insists that cherry pie is the choice of most UNR students.
You do a lit. review and you find very poor research has been done on this topic.
There are very mixed results, mostly due to non-random sampling, different flavor of pies, etc.
So, you go out and get a RANDOM sample of freshmen, and you assign them to either the cherry pie or the pecan pie group.
You give them all the pie they want under identical circumstances and you record how many grams of pie is eaten by each person.
Independent variable - type of pie
Dependent variable - amount consumed in grams
N=9
Range: 0-500
Mean
N=9
Range: 0-500
Mean
So, you do the study.
Here is the result:
PECAN P
PERSON
Sally
Sue
Stan
Steve
Stella
Saul
Sigmund
Sarah
Stuart
CHERRY PIE
PERSON
(grams)
40
30
100
80
0
10
20
10
40
Tom
Tim
Tommy
Terry
Tallulah
Travis
Toni
Ted
Truman
50
40
60
90
60
0
50
30
40
You decide to begin by using the SPSS DESCRIPTIVES, FREQUENCIES, and MEANS procedures to
begin massaging this data.
Here is the codebook for this data:
Full
Variable
Column
Name
1-3
Identification number
4
BLANK
SPSS
Variable
Name
id
Key:
continuous
D:\98944311.doc Page 2 of 14
5
Pie Group
6
BLANK
7-8-9 Grams of pie consumed
group
1=Pecan, 2=Cherry
grams
continuous
Once the codebook is made, we can begin to enter the data on the coding sheets (IBM paper or graph paper).
Here is what the code sheets will look like:
001 1 040
002 1 030
003 1 100
004 1 080
005 1 000
006 1 010
007 1 020
008 1 010
009 1 040
010 2 050
011 2 040
012 2 060
013 2 090
014 2 060
015 2 000
016 2 050
017 2 030
018 2 040
_____ 1. Go to the lab. Choose one of the computers with SPSS for Windows
on it, and double click on the SPSS for Windows icon. It will look similar
to this:
_____ 2. SPSS for Windows will open. It will look like a big, blank
spreadsheet:
D:\98944311.doc
Page 3 of 14
_____ 3. Now, you will enter the data. Each variable goes in a separate
column of cells headed "var" and each of these columns of cells can hold
more than one digit.
_____ 4. But, first, we will name the variables. Look at the lower left
corner of the data screen and find the tabs there. They look like this:
Currently, Data View is highlighted, because we are in the view where data
can be entered or seen. But now we need to name the variables:
_____ 5. Click on the Variable View tab. This will put us into a view
where we can name the variables. You should see the following:
Recall that the first variable is going to be named id, the second is
group, and the third is grams.
_____ 6. Type those variable names in the first three cells in the column
marked Name
When you are finished, the screen will look like this:
Categorical variables should have Value labels. A value label specifies
what category each possible value denotes. In our study, only the group
variable is categorical, and we need to tell the program that a 1
indicates Pecan group, while a 2 indicates Cherry group.
_____ 7. Click once in the group row under the Values column. You will see
a small gray box appear in that cell:
D:\98944311.doc
Page 4 of 14
_____ 8. Now, click once on that small, gray box and you will see the
following:
_____ 9. Type a 1 in the value field, Pecan in the Value Label field, and
click the Add button.
_____ 10. Now, type a 2 in the value field, Cherry in the Value Label
field, and click the Add button. When finished, the box should look like
this:
_____ 11. Click the OK button.
_____ 12. Click the Data View tab at the bottom left of the screen to
return to the data. It should now look like this:
_____ 13. Now, you can type in the data. Click on the first cell in the id
column. Now you will type in the id numbers. IT IS NOT NECESSARY TO TYPE
IN THE TWO ZEROES IN FRONT OF THE 1. JUST type in 1 and press the Down
D:\98944311.doc
Page 5 of 14
Arrow button. Continue until all the id numbers are in place. The first
few rows will look like this:
_____ 14. Now, type in all the data for the group and the grams variables.
When you are finished entering all the data, the first few rows will look
like this:
_____ 15. Now, you are ready to make a DESCRIPTIVES and then a FREQUENCIES
run on this data. On the menu line at the top of the screen, click on
Analyze (or Statistics, depending on the version of SPSS for Windows you
are using), then point to Descriptive Statistics, and then click on
Descriptives:
D:\98944311.doc
Page 6 of 14
This box will open:
_____ 16. Now, you must tell SPSS which variables you want to have
Descriptives run on. Since we want them on all variables, first highlight
id in the left field, then click the right arrow button in the middle of
the box. Do this for group and grams, also. This will move these three
variable names into the field at the right.
_____ 17. Now, click the Options button at the bottom of the box. The
following will appear:
D:\98944311.doc
Page 7 of 14
_____ 18. Put checks in the boxes identical to the above, then click the
Continue button, and then the OK button in the other box. Now SPSS will do
the analysis you have asked for.
_____ 19. The output file will open and display the statistics you have
calculated. Since you asked for so many, you will have to horizontally
scroll the screen in order to see them all. The printout will look similar
to this:
D:\98944311.doc
Page 8 of 14
_____ 20. Now, you can run a FREQUENCIES run on this data. Return to the
data by clicking on the other SPSS icon in the row of icons at the bottom
of the screen. It will look like this:
_____ 21. When you get back to the data, click on Analyze (or Statistics)
at the top of the screen, point to Descriptive Statistics and click on
Frequencies.
_____ 21. In the box that opens, if the variable names are not already
moved to the field on the right, move them by highlighting and using the
RIGHT ARROW button in the middle of the box. Make it look like this:
D:\98944311.doc
Page 9 of 14
_____ 22. Click the Statistics button at the bottom of the box. Make the
next box look like this:
_____ 23. Click the Continue button and then the Charts button at the
bottom of the Frequencies box that you will see again. The Charts box will
open.
_____ 24. Make the Charts box look like this:
D:\98944311.doc
Page 10 of 14
_____ 25. Click the Continue button, and then the OK button. You will then
see the results of your run, which you will have to scroll to view in its
entirety. It will look something like this:
D:\98944311.doc
Page 11 of 14
D:\98944311.doc
Page 12 of 14
D:\98944311.doc
Page 13 of 14
Note that the only histogram that makes sense is the one on the grams
variable. That is because the one on ID is square, since there is only one
case for each value, and the one for Group only has two values (1 and 2).
Now you can run a MEANS run.
_____ 26. When you get back to the data, click on ANALYZE, COMPARE MEANS,
and MEANS.
D:\98944311.doc
Page 14 of 14
_____ 27. Identify the independent and dependent variables by making the
box that opens look like this:
_____ 28. Click the OK button.
_____ 26. Print out the output file by clicking on File and Print at the
top of the screen. You do not need to turn this assignment in. It is
simply practice.
END
Download