MA155 Statistical Reasoning
SPSS Directions for graphs in chapter 3
Drawing a Pie Chart
The data we will enter is:
Level of Education / Number of personsLess than high school / 2554
High school graduate / 5942
Some college / 5559
Bachelor’s degree / 4589
Advanced degree / 1878
- Open up PASW/SPSS. Close the initial screen and you’ll have the screen (SPSS Data Editor) to enter the data.
- Go to variable view (tab at the bottom left corner).
- Enter the data as follows:
Name: Edlevel (The name is a variable name with rules similar to programming rules. You cannot use certain symbols or spaces. You may want to abbreviate or put words together.)
Type: String (String means you will enter names instead of numerical values.)
Width: 22 (This is just how many characters or letters are allowed. For example the word Mississippi
would need a width of 11, or the numeral 123.4 would need a width of 5)
Label: Education Level (You may name this category any way you want. This is what will appear as
labels on the graph.)
Measure: Nominal ( This is determined according to what type of data this variable can take, in this case, it can take nominal data.)
2nd variable—
Name: Count
Type: Numeric (This will allow you to input numbers, not names.)
Width: 8(again the width is how many digits you want to allow for the number)
Decimals: 0
Label: Number of persons (thousands)
Measure: Scale (If your data is numeric, measure must be scale.)
- Go to the data view (tab at the bottom) and enter the different levels under “edlevel” and the different numbers of persons under “count”. Never use commas when entering numerical values.
- From graphs at the top of the screen, go to Legacy Dialog, Interactive, Pie, Simple. Drag “Education level ” into “slice by” and “ Number of persons (thousands)” into “Slice Summary”.
- Click OK on the last menu (Create Simple Pie Chart) and the graph will appear.
- Double click on the graph to bring up the SPSS Chart Editor window, and explore how you can add a title, display the percentages each slice represents.
- Open a word file and copy the graph to a Word file. You can right click to copy and paste just like any other document. Practice changing the size on the word document and moving it around. You will turn in the word document. Resize the graphs so several graphs will fit on a page. I just need to see that you have completed the work.
Drawing a bar graph
- Using the same data, draw a bar graph. There is no need to reenter the data.
- From the data menu, click on graphs, Legacy Dialog, Interactive, Bar. Drag “Education level ” onto the horizontal axis and “Number of persons (thousands)” onto the vertical axis.
- Click OK and graph will appear. This graph will be below the previous graph in the Output. You may need to scroll down.
- Again, double click on the graph and explore how you can add a title and make changes.
- Copy the graph to the Word file. Again resize to make it smaller.
Drawing a line graph
Use the following data to draw a line graph.
Year / 1960 / 1965 / 1970 / 1975 / 1980 / 1985 / 1990 / 1995 / 2000Percentage of unwed mothers / 5.3 / 7.7 / 10.7 / 14.2 / 18.4 / 22.0 / 28.0 / 32.2 / 33.2
- Go to variable view and define your variables named “Year” and “Percentage unwed mothers “ (refer to question 1) , then enter the data. You can just add to the previous data. There is no need to clear the past data.
Remember to go to variable view tab first and set up the variables. Be sure both are numeric with scale. Also the name cannot have spaces but the label is what you will see when you draw the graph.
Now use the data view tab to enter the data.
- Go to Graphs, Legacy Dialogs, Interactive, Line. Drag “Year” to the horizontal axis and “Percentage unwed mothers “ to the vertical axis. Add a title. Click OK.
Click on the Titles tab. Add a title and click OK.
You may need to scroll down to see the graph.
- Copy the graph to the Word file. Again, minimize the size.
Drawing a histogram
You will use the following data to draw the histogram.
Highway gas mileage for model year 2004 midsize carsModel / MPG / Model / MPG
Acura 3.5RL / 24 / Lexus ES330 / 29
Bentley Arnage / 14 / Lexus GS430 / 23
BMW 5451 Sport M / 25 / Lincoln LS / 26
Buick Regal / 30 / Mazda 6 / 26
Cadillac CTS / 28 / Mercedes-Benz E320 / 27
Cadillac Seville / 26 / Mercedes-Benz E500 / 24
Chevrolet Malibu / 32 / Mitsubishi Diamante / 25
Chrysler Sebring / 28 / Mitsubishi Galant / 27
Dodge Stratus / 28 / Nissan Maxima / 27
Honda Accord / 34 / Pontiac Grand Prix / 28
Hyundai Sonata / 27 / Rolls Royce Phantom / 19
Infiniti I35 / 26 / Saturn L300 / 28
Infiniti Q45 / 23 / Toyota Camry / 29
Jaguar S-Type R / 24 / Volkswagen Passat / 28
Kia Optima / 28 / Volvo S80 / 28
Kia Sprectra / 34
- Go to variable view and define your variables named mpg (refer to question 1), then enter the data. You only need to enter the miles per gallon, not the names of the vehicle. Notice that I added the data to the previous data. Remember that you first define your variable in variable view and then enter the data in data view.
- Go to Graphs, Legacy Dialogs, Interactive, Histogram. Assign Variables by dragging Highway MPG to the horizontal axis. Add a title.
- Click OK to see the graph. Again, you may need to scroll down.
- Double click on the graph to bring up the SPSS Chart Editor window, click on Edit, Select X Axis, Scale.
- Fill out the “minimum” with 4, “maximum” with 36, “major increment” with 2. Click Apply and close the window. The scale on your graph is now changed in the Chart Editor.
- Copy the graph from the Chart Editor to the Word file. Minimize so all 4 graphs will fit on one sheet. Print the graphs to turn in.