Picturing Distributions With Graphs

download Picturing Distributions With Graphs

of 23

Transcript of Picturing Distributions With Graphs

  • 7/28/2019 Picturing Distributions With Graphs

    1/23

    Chapter 1. Picturing Distributions with Graphs

    Topics covered in this chapter:

    Pie Charts Bar Graphs Histograms Stem-and-L eaf Plots Sorting Data

    Pie Charts

    Example 1.2: Which major?

    The Problem: About 1.6 million first-year students enroll in colleges anduniversities each year. What do they plan to study?

    1. Prepare the data : open the data set eg01-02.por .a. Go to File. b. Go to Open. c. Go to Data.

    16

  • 7/28/2019 Picturing Distributions With Graphs

    2/23

    Chapter 117

    d. Choose the right directory (which is either on the CD that accompaniesthe text or in the place where the data are stored) and select open

    2. Go to the Graphs menu.3. Under Legacy Dialogs , scroll to the Pie option.

    The following window should open:

    4. Click on Values of individual cases before you click Define .

    The following window should open:

  • 7/28/2019 Picturing Distributions With Graphs

    3/23

    Picturing Distributions with Graphs 18

    a. Highlight the variable Percent and then click the arrow to the left of the Slices Represent box.

    b. Highlight the variable Discipline and then under Slice Labels clickVariable and click the arrow underneath it.

    c. Click OK.

    Now the pie-chart should be in its own widow.

    Bar Graphs

    Example 1.3: I love my iPod!

    The Problem: The rating service Arbitron asked adults who used several high-tech devices and services whether they loved using them.

    1. Open the data set eg01-03.por .2. Go to the Graphs menu.3. Under Legacy Dialogs , scroll to the Bar option.

    The following window should open:

    4. Click on Simple and click on Values of individual cases before you clickDefine.

    The following window should open:

  • 7/28/2019 Picturing Distributions With Graphs

    4/23

  • 7/28/2019 Picturing Distributions With Graphs

    5/23

    Picturing Distributions with Graphs 20

    4. Highlight the variable PctFor and then click the arrow to the left of theVariable box.

    5. Click OK .

    Now the histogram should be in its own window, but we are not finished yet. This gives us interval widths of 2.5 units.

    6. Double-click on the histogram. Now a Chart Editor should appear in itsown box.

  • 7/28/2019 Picturing Distributions With Graphs

    6/23

    Chapter 121

    7. Right-click on one of the bars of the histogram and scroll down toProperties Window.

    The following window should appear:

    8. Click on the box Binning tab.9. Beneath X Axis click on Custom and then click on Interval width .

    10. Enter a 5 for the width and click Apply .11. Click Close on this box and hit the X at the top right corner of theChart Editor box.

    Now the histogram should be in its own window with the correct interval width.

    Stem-and-L eaf Plots

    Example 1.9: Pulling Wood Apart

    The Problem: Student engineers learn that, although handbooks give the strengthof a material as a single number, in fact the strength varies from piece to piece.Here are data from a typical student laboratory exercise: the load in poundsneeded to pull apart pieces of Douglas fir 4 inches long and 1.5 inches square.

  • 7/28/2019 Picturing Distributions With Graphs

    7/23

  • 7/28/2019 Picturing Distributions With Graphs

    8/23

    Chapter 123

    d. Highlight the variable rStrength, and then click the arrow to the left of the Dependent L ist box.

    e. Under Display click the Plots option.f. Now click on the Plots button to the right of the Dependent L ist box.

    The following window should open:

    g. Make sure that in the Boxplots box you click None and under theDescriptive box you only check Stem-and-leaf.

    h. Click Continue .i. Click OK .

    The stem-and-leaf plot should be in its own window.

  • 7/28/2019 Picturing Distributions With Graphs

    9/23

    Picturing Distributions with Graphs 24

    Sorting Data

    Example: Sorting data by a second variable

    The problem: Sort the oils in Table 1.4 using alphabetical order

    1. Open the data set ta01-04 .2. Sort the data.

    a. Click Data . b. Click Sort Cases .

    The following window opens up:

    c. Select Oil and click on the right-facing arrow.d. Choose Ascending for the Sort Order then click OK .

    The oils have now been sorted alphabetically in the Data Editor .

  • 7/28/2019 Picturing Distributions With Graphs

    10/23

    Chapter 125

    Chapter 1 Exercises

    1.3 Do You Listen to Country Radio?1.5 Never on Sunday?

    1.11 Heath Care Spending.1.25 What Color is Your Car?1.27 Deaths among young people.1.29 Spam.1.35 Where are the doctors?1.37 Rock sole in the Bering Sea1.39 Rock sole in the Bering Sea.1.43 El Nino and the monsoon.1.45 Alligator bites.

  • 7/28/2019 Picturing Distributions With Graphs

    11/23

    Chapter 1 SPSS Solutions

    1.3 Open data file ex01-03.por . We add together the given percentages; they add to61.6%, so 38.4% of radio stations are some other format. Add a category Other with38.4% at the bottom of the spreadsheet.

    To create the bar graph, click Graphs , LegacyDialogs , Bar . The chart type definition box show atright appears. Since our data are already summarized,we want our bars to represent Values of individualcases , so click on the button to change this option; wealso want a Simple bar chart (the default). Click Define to proceed.

    Click to enter Share into the Bars Represent box, then

    move the Category Labels button to Variable .Highlight Format and click the arrow to enter it intothe box. Click Titles and give your graph anappropriate title. Click Continue and OK to generatethe graph.

    288

  • 7/28/2019 Picturing Distributions With Graphs

    12/23

  • 7/28/2019 Picturing Distributions With Graphs

    13/23

  • 7/28/2019 Picturing Distributions With Graphs

    14/23

    You can customize each slices color by double clicking in any slice to bring up the ChartEditor window. Right click on each box of the colors legend, then select PropertiesWindow , select the appropriate color to reflect the actual car color and Apply and Closethe window. Our results are below.

    291

  • 7/28/2019 Picturing Distributions With Graphs

    15/23

    1.27 These data are not in a worksheet. Define the two variables by clicking on theVariable View tab at the bottom of the worksheet. Reason is a string (alpha) variable thatwe have allowed 10 characters for. Deaths is numeric (with no decimal places clickingon the right had side of the decimals box will allow you to change these from 2 (thedefault) to 0.

    Click on the Data View tab, and enter the death reasons and the corresponding numbers.We cant make a pie chart with these, because we dont know the total number of deathsin this age group. Well make a bar chart using Graphs , Legacy Dialogs , Bar forValues of individual cases . Click to enter that Bars Represent Deaths ; then move theCategory Labels button to Variable . Highlight Reason and click the arrow to enter it

    into the box. Click Titles and give your graph an appropriate title. Click Continue andOK to generate the graph.

    292

  • 7/28/2019 Picturing Distributions With Graphs

    16/23

    1.29 Open data file ex01-29 . Well make a bar chart using Graphs , Legacy Dialogs ,Bar for Values of individual cases . Click to enter that Bars Represent Pct ; then movethe Category Labels button to Variable . Highlight Type and click the arrow to enter itinto the box. Click Titles and give your graph an appropriate title. Click Continue andOK to generate the graph.

    To sort the bars in descending order, double click on the graph to bring up the ChartEditor. Click on the large X icon on the menu bar. This brings up the Propertieswindow for the x axis. Use the pull down boxes to Sort by Statistic in Descendingdirection. Apply the change and Close the Properties box and Chart Editor.

    293

  • 7/28/2019 Picturing Distributions With Graphs

    17/23

    1.35 We first note that the number of doctors per 100,000 people is a better measure of the availability of health care because states vary greatly in the number of people. Opendata file ta01-05 . To create the histogram of the number of doctors, click Graphs ,Legacy Dialogs , Histogram . Click to highlight variable MDs and click to enter this intothe Variable box. Give your graph an appropriate Title , then Continue and OK .

    294

  • 7/28/2019 Picturing Distributions With Graphs

    18/23

    The graph is rather right skewed with an outlier (Washington, D.C.) The range is fromabout 100 to about 800 with a center about 250. (SPSS actually displays the mean of

    265.61 and the standard deviation for you.

    1.37 Open data file ex01-37 . Create the histogram as described above in Exercise 1.35.This graph is skewed right with an outlier above 4000 million fish. The center is about1000 million (SPSS gives the mean as 1119.71 million); the data range from (roughly) 0to over 4000 million.

    295

  • 7/28/2019 Picturing Distributions With Graphs

    19/23

  • 7/28/2019 Picturing Distributions With Graphs

    20/23

    The increase in recruitment until the peak in 1987 followed by a sharp decline is clearlyevident in this graph.

    1.41 Open data file ex01-12. Follow the instructions from Exercise 1.39 to create an

    initial time series plot as seen below.

    297

  • 7/28/2019 Picturing Distributions With Graphs

    21/23

    To make the graph appear shallower, wecan increase the y axis range. Double-click on the graph in the output window tobring up the Chart Editor. Click on thelarge Y icon on the menu bar. This bringsup a Properties box for the scale. Uncheck the Automatic boxes for the minimum andmaximum and enter new values (we used0 and 10000). OK applies the change.The new graph is below.

    298

  • 7/28/2019 Picturing Distributions With Graphs

    22/23

    To make the increase seem sharper, repeat the process, but decrease the y axis scale. Youcan also narrow the width of the graph by clicking on the X icon and then click the ChartSize tab; make the width narrower (be sure to uncheck the Maintain aspect ratio box).(We changed the width to 250 in the graph below).

    299

  • 7/28/2019 Picturing Distributions With Graphs

    23/23

    1.45 Open data file ex01-45 . Follow the instructions from Exercise 1.39 above to createthe time series plot seen below. We can see that alligator bites in Florida are highlyvariable (there are lots of jagged peaks in the graph) and show a generally increasingtrend, perhaps due to encroachment on their natural territory by humans and theircontinued development of the state.

    300