Graphing Data and Descriptive Statistics

Chapter 2 Graphing Data and Descriptive Statistics 1 Chapter Graphing Data and Descriptive Statistics 2 Pie Charts A sample of 40 students at a un...
Author: Angelica May
5 downloads 1 Views 2MB Size
Chapter 2 Graphing Data and Descriptive Statistics 1

Chapter

Graphing Data and Descriptive Statistics

2

Pie Charts A sample of 40 students at a university was randomly selected, and each was asked if they were satisfied with the amount of parking available on campus. The data is summarized below. Satisfaction Yes No Not Sure

Frequency 17 20 3

To create a graph of this data, you will need to enter the data into the Worksheet. This can be done in two ways. The first way the data can be entered is in summary format. In column 1, type in the three satisfaction ratings. Label the column by typing "Satisfaction" in the gray cell in C1. Label column 2 "Frequency", and type in the frequencies.

Chapter 2 Graphing Data and Descriptive Statistics 2

To create the Pie chart, click on Graph  Pie Chart. On the screen that appears, select the circle next to Chart values from a table. Place the cursor in the Categorical variable field, and either double-click the Satisfaction column name from the left side of the screen or type in C1. Next, click in the Summary variables field, and either doubleclick the Frequency column name from the left side of the screen or type in C2.

At this point, you have many options that you can add to your graph. However, if you click OK, Minitab will draw the pie chart using the default settings, which is shown below.

Chapter 2 Graphing Data and Descriptive Statistics 3

You can edit many options on the graph by right clicking on the part that you want to change. A pop-up window of options will appear from which you can choose. You may right-click on the title, the legend, the slice labels, or the slices of the pie. This will give you the option of changing the name, font, color, or labels on your current chart. To see the actual data used, hold the cursor over each slice and the category name and percentage will be displayed. However, there are several options that will enhance your pie chart.

Labels The default pie chart will name the chart “Pie Chart of Categorical Variable”. To give the chart a more meaningful name, click on the LABELS button. In the window, enter your new name for the chart in the Title field, adding any Subtitles if necessary.

Chapter 2 Graphing Data and Descriptive Statistics 4

To better display each section of the pie, select the top tab labeled Slice Labels. You may select to label each slick with the Category name, the actual Frequency, or the relative frequency (Percent) by clicking on one or more of the checkboxes beside each option. You may also select to Draw a line from label to slice if desired. When finished, click OK.

The information will now be shown on the pie chart.

If you want to print the graph, click on File  Print Graph while the graph is open. Once the graph prints, you can close the Graph Window by clicking on the X in the upper right corner of the window of the graph window. If you want to save the graph, you may select to do so, or you may close without saving.

Chapter 2 Graphing Data and Descriptive Statistics 5

In the above example, the data was entered in a summary format. If instead you have the raw data, each individual response should be entered in Column 1, with 17 YES rows, 20 NO rows, and 3 NOT SURE rows, in no particular order. Label the column by typing "Satisfaction" in the gray cell in C1.

To create the Pie chart, click on Graph  Pie Chart. On the screen that appears, select the circle next to Chart counts of unique values. Place the cursor in the Categorical variables field, and either double-click the Satisfaction column name from the left side of the screen or type in C1.

Chapter 2 Graphing Data and Descriptive Statistics 6

The chart options available are the same as described previously. When finished changing any options, click OK. The default Pie Chart will be identical to the ones shown above.

Chapter 2 Graphing Data and Descriptive Statistics 7

Pareto Diagrams To demonstrate Pareto Diagrams, the satisfaction data from above will be used. First, assume your data is in the summary format. To make a Pareto Diagram of the data, click on Graph  Bar chart. At the top of the window in the Bars Represent pull-down, click on the down arrow and choose Values from a table. The bottom of the window should now contain options for One column of values or a Two-way table. Click on and highlight the picture of the Simple bar graph option and click OK.

Chapter 2 Graphing Data and Descriptive Statistics 8

Click in the field below Graph variables. This variable must be a numerical measurement. In this case, it is the Frequency. Since C2 contains the frequencies, either double-click the Frequency column name from the left side of the screen or type in C2. Next, click on the field below Categorical variable. Either double-click the Satisfaction column name from the left side of the screen or type in C1. Click on the Chart Options button.

Select the circle next to Decreasing Y. Click OK. Click OK on the Bar Chart – Values from a table, One column of values, Simple window.

Chapter 2 Graphing Data and Descriptive Statistics 9

At this point, you have many options that you can add to your graph. However, if you click OK, Minitab will draw the bar graph using the default settings, which is shown below.

You can edit many options on the graph by right clicking on the part that you want to change. A pop-up window of options will appear from which you can choose. You may right-click on the title, the x-axis label or scale, the y-axis label or scale, or the bars. This will give you the option of changing the name, font, color, or scale on your current chart. To see the actual data used, hold the cursor over each bar and the category name and frequency will be displayed. There are several other options that will enhance your bar graph.

Chapter 2 Graphing Data and Descriptive Statistics 10

Relative Frequency The default bar chart will plot the actual frequency against each category. If the relative frequency is desired instead, click on the CHART OPTIONS button. In the window, under the Percent and Accumulate section, click the check box to Show Y as Percent and then click OK.

The bar graph will show the relative frequency (in percentage) against each category.

Chapter 2 Graphing Data and Descriptive Statistics 11

Labels The default bar chart will name the chart “Chart of Graph Variable”. To give the chart a more meaningful name, click on the LABELS button. In the window, enter your new name for the chart in the Title field, adding any Subtitles if necessary. When finished, click OK.

The title will now be displayed on the bar chart.

If you want to print the graph, click on File  Print Graph while the graph is open. Once the graph prints, you can close the Graph Window by clicking on the X in the upper right corner of the window of the graph window. If you want to save the graph, you may select to do so, or you may close without saving.

Chapter 2 Graphing Data and Descriptive Statistics 12

Now, assume your data is in the raw data format. To make a Bar Graph of the data in this format, click on Graph  Bar Chart. At the top of the window in the Bars Represent pull-down, select Counts represent unique values. The bottom of the window should now contain 3 options for different bar charts. Click on and highlight the picture of the Simple bar graph option and click OK.

Click in the field below Categorical variables. Either double-click the Satisfaction column name from the left side of the screen or type in C1. Click on the Chart Options button.

Chapter 2 Graphing Data and Descriptive Statistics 13

Select the circle next to Decreasing Y. Click OK. Click OK on the Bar Chart – Counts of unique values, Simple window.

The chart options available are the same as described previously. When finished changing any options, click OK. The default Bar Chart will be identical to the ones shown above.

Chapter 2 Graphing Data and Descriptive Statistics 14

Histograms A sample of 40 students at a university was randomly selected, and each was asked the number of hours spent working each week. The raw data is shown in the table below. 10 25 16 0

12 40 4 8

15 20 18 12

0 16 22 15

5 24 10 23

42 9 6 36

35 14 30 25

32 15 25 16

10 21 15 24

16 13 10 12

Enter the data into a Minitab worksheet. Enter the number of hours of work into column C1 and label the column “Hours of Work” in the gray cell.

Chapter 2 Graphing Data and Descriptive Statistics 15

To make a Histogram of the data, click on Graph  Histogram. In the window click on and highlight the picture of the Simple histogram option and click OK.

Click in the field below Graph variables. Either double-click the Hours of Work column name from the left side of the screen or type in C1.

Chapter 2 Graphing Data and Descriptive Statistics 16

At this point, you have many options that you can add to your graph. However, if you click OK, Minitab will draw the histogram using the default settings, which is shown below.

You can edit many options on the graph by right clicking on the part that you want to change. A pop-up window of options will appear from which you can choose. You may right-click on the title, the x-axis label or scale, the y-axis label or scale, or the bars. This will give you the option of changing the name, font, color, or scale on your current chart. To see the actual data used, hold the cursor over each bar and the interval endpoints and frequency will be displayed. However, there are several options that will enhance your histogram.

Chapter 2 Graphing Data and Descriptive Statistics 17

Relative Frequency The default histogram will plot the actual frequency against each interval. If the relative frequency is desired instead, click on the SCALE button. In the window, select the top tab labeled Y-Scale Type. Select the circle next to the Percent field and then click OK.

The bar graph will show the relative frequency (in percentage) against each category.

Chapter 2 Graphing Data and Descriptive Statistics 18

Labels The default bar chart will name the chart “Histogram of Graph Variable”. To give the chart a more meaningful name, click on the LABELS button. In the window, enter your new name for the chart in the Title field, adding any Subtitles if necessary. When finished, click OK.

The title will now be displayed on the histogram.

Chapter 2 Graphing Data and Descriptive Statistics 19

Interval Length To adjust the intervals on the x-axis, right-click on the x-axis and select Edit X Scale. Select the Binning tab on the top of the window. Select the circle next to the Cutpoint Interval Type, which locates the numbers for each class at the start of the bar instead of the midpoint. You may specify the number of intervals desired by clicking the circle next to the Number of Intervals in the Interval Definition section and entering the number of intervals desired, or to specify the width desired, click the circle next to the Midpoint/Cutpoint positions. In the field below, enter the smallest and largest values desired for the x-axis and the desired width of the intervals. For example, if the x-axis should contain values from 0 to 45, and the desired width of each interval is 5, enter 0:45/5. When finished, click OK.

The histogram will now contain the intervals 0-5, 5-10, and so on.

Chapter 2 Graphing Data and Descriptive Statistics 20

Dot Diagrams To demonstrate Dot Diagrams, the hours of work data from above will be used. To construct a Dot Diagram, click on Graph  Dotplot. On the window, click and highlight the Simple plot under the top section, labeled One Y. Click OK.

Click in the field below Graph variables. Either double-click the Hours of Work column name from the left side of the screen or type in C1.

Chapter 2 Graphing Data and Descriptive Statistics 21

At this point, you have many options that you can add to your graph. However, if you click OK, Minitab will draw the dot ploy using the default settings, which is shown below.

You can edit many options on the graph by right clicking on the part that you want to change. A pop-up window of options will appear from which you can choose. You may right-click on the title, the x-axis label or scale, the data region, or the dots. This will give you the option of changing the name, font, color, or scale on your current chart. However, there are several options that will enhance your dot diagram.

Chapter 2 Graphing Data and Descriptive Statistics 22

Labels The default bar chart will name the chart “Dotplot of Graph Variable”. To give the chart a more meaningful name, click on the LABELS button. In the window, enter your new name for the chart in the Title field, adding any Subtitles if necessary. When finished, click OK.

The title will now be displayed on the dot diagram.

If you want to print the graph, click on File  Print Graph while the graph is open. Once the graph prints, you can close the Graph Window by clicking on the X in the upper right corner of the window of the graph window. If you want to save the graph, you may select to do so, or you may close without saving.

Chapter 2 Graphing Data and Descriptive Statistics 23

Stem-and-Leaf To demonstrate Stem-and-Leaf plots, the hours of work data from above will be used. To construct a Stem-and-leaf plot, click on Graph  Stem-and-Leaf. Click in the field below Graph variables. Either double-click the Hours of Work column name from the left side of the screen or type in C1.

Click OK. The stem and leaf plot will be displayed in the Session Window.

Chapter 2 Graphing Data and Descriptive Statistics 24

In this Minitab display, the first column on the left is a counter. This column counts the number of data points starting from the smallest value (at the top of the plot) down to the median. It also counts from the largest data value (at the bottom of the plot) up to the median. Notice that there are two data points in the first row of the stem and leaf plot, so the counter is "2". Row 2 has 1 data point so the counter increases to “3” (2+1=3). The row that contains the median has the number “5” in parentheses. This number counts the number of data points that are in the row that contains the median. If there are no data points in a row, the counter on the left remains at the number from the previous row. The second column in the display is the Stem. In this example, the Stem values range from 0 to 4. Notice that this display contains two rows for each of the values. These are called split-stems. For each stem value, the first row contains all data points with leaf values from 0 to 4 and the second row contains all data points with leaf values from 5 to 9. The leaf values are shown to the right of the stem. The leaf values may be the actual data points or they may be the rounded data points. To find the actual values of the data points in the display, use the “Leaf Unit=” statement at the top of the display. The "Leaf Unit" gives you the place value of the leaves. In this stem and leaf plot, the last data point has a stem value of 4 and a leaf value of 2. Since the "Leaf Unit=1.0", the leaf value of 2 is the "ones" place and the stem value of 4 is the "tens" places. Thus the data point is 42.

Chapter 2 Graphing Data and Descriptive Statistics 25

Measures of Central Tendency and Measures of Dispersion A sample of 40 students at a university was randomly selected, and each was asked the number of hours spent working each week. The raw data is shown in the table below. 10 25 16 0

12 40 4 8

15 20 18 12

0 16 22 15

5 24 10 23

42 9 6 36

35 14 30 25

32 15 25 16

10 21 15 24

16 13 10 12

Enter the data into a Minitab worksheet. Enter the number of hours of work into column C1 and label the column “Hours of Work” in the gray cell.

Chapter 2 Graphing Data and Descriptive Statistics 26

To find the descriptive statistics of this data, click on Stat  Basic Statistics  Display Descriptive Statistics. Either double-click the Hours of Work column name from the left side of the screen or type in C1 into the Variables field.

Click on the Statistics button. A list of each statistic that Minitab will calculate will open. Select the checkbox next to the statistics desired, or deselect the checkbox next to the ones that are not desired. For the measures of central tendency, the Mean, Median and Mode are available options described in the textbook. For the measures of dispersion, the Standard Deviation, Variance, First and Third Quartiles, Interquartile Range, Minimum, Maximum, and Range are available options described in the textbook. There are numerous other statistics available, if desired. When finished selecting, click OK. Click OK on the Display Descriptive Statistics window.

Chapter 2 Graphing Data and Descriptive Statistics 27

The selected statistics will be displayed in the Session Window. The Total Count of 40 shows that there are 40 students in the sample. The Mean of the sample is 17.52 hours of work per week. The StDev of 10.22 is the standard deviation of the sample. The Variance of the sample is 104.41. The five number summary of the data set (the Minimum, Q1, Median, Q3, and Maximum) are 0, 10, 15.5, 24, and 42. The Range of the data is 42. The IQR of 14 is the Interquartile Range. There are 3 Modes of the data: 10, 15, and 16, each with 4 observations.

Chapter 2 Graphing Data and Descriptive Statistics 28

Box Plots To demonstrate box plots, the student hours of work data from above will be used. To create the boxplot, click on Graph  Boxplot. Click on and highlight the One Y, Simple boxplot on the top left of the window, then click OK.

On the screen that appears, either double-click the Hours of Work column name from the left side of the screen or type in C1.

Chapter 2 Graphing Data and Descriptive Statistics 29

The default boxplot will name the chart “Boxplot of Graph Variable”. To give the chart a more meaningful name, click on the LABELS button. In the window, enter your new name for the chart in the Title field, adding any Subtitles if necessary. When finished click OK. Click OK on the Boxplot, One-Y, Simple window. The Boxplot will be displayed.

Notice that Minitab defaults a vertical boxplot while the textbook uses a horizontal boxplot. To construct a horizontal boxplot, click on Graph  Boxplot, choose the One Y, Simple boxplot on the top left of the window, then click OK. After selecting the data for the Graph Variables field, click on the SCALE button. Select the checkbox next to Transpose value and category scales, then click OK.

Chapter 2 Graphing Data and Descriptive Statistics 30

The horizontal Boxplot will be displayed.

If you want to print the graph, click on File  Print Graph while the graph is open. Once the graph prints, you can close the Graph Window by clicking on the X in the upper right corner of the window of the graph window. If you want to save the graph, you may select to do so, or you may close without saving. You can edit many options on the graph by right clicking on the part that you want to change. A window of options will appear from which you can choose. To see the actual data used to draw the boxplot, hold the cursor over each bar and the Q1, Median, Q3, IQR, and endpoints of the whiskers will be displayed. If there are any outliers, hold the cursor over the outlier to see the data value of each.

Chapter 2 Graphing Data and Descriptive Statistics 31

Graphical Summary Another method of calculating the default descriptive statistics, as well as viewing the boxplot and histogram of the data is available. Using the same data, click on Stat  Basic Statistics  Graphical Summary. Either double-click the Hours of Work column name from the left side of the screen or type in C1 into the Variables field. When finished, click OK.

The resulting summary contains a histogram of the data, a boxplot of the data, the Mean, Standard Deviation, Variance, and N (sample size), as well as the Five Number Summary. The graphs of the histogram and boxplot may be edited by right-clicking on the part of the graph to be changed and selecting the options.

Chapter 2 Graphing Data and Descriptive Statistics 32

If you want to print the graph, click on File  Print Graph while the graph is open. Once the graph prints, you can close the Graph Window by clicking on the X in the upper right corner of the window of the graph window. If you want to save the graph, you may select to do so, or you may close without saving.

Chapter 2 Graphing Data and Descriptive Statistics 33

Control Charts The following table gives the number of reported accidents on a certain stretch of highway over a period of 8 years.

Year 2001 Accidents 78

2002 49

2003 62

2004 98

2005 73

2006 162

2007 82

2008 93

2009 96

To create a control chart of this data, you will need to enter the data into the Worksheet. In column C1, enter the Number of Accidents in order by year. The Years do not need to be entered since they will not be used for analysis.

Chapter 2 Graphing Data and Descriptive Statistics 34

To create the control chart, click on Stat  Control Charts  Variables Charts for Individuals  Individuals. In the Variables field, either double-click the Accidents column name from the left side of the screen or type in C1.

At this point, you have many options that you can add to your graph. However, if you click OK, Minitab will draw the control chart using the default settings, including control limits of ±3s, which is shown below.

Chapter 2 Graphing Data and Descriptive Statistics 35

You can edit many options on the graph by right clicking on the part that you want to change. A pop-up window of options will appear from which you can choose. If you would like to change the control limits to ±2s instead of the default of ±3s, on the Individuals Chart window, click the I Chart Options button. Select the top tab labeled S-Limits. In the Display control limits at these multiples of the standard deviation field, enter 2. Click OK. Click OK on the Individuals Chart window.

The control limits of ±2s will now be shown on the control chart.

Chapter 2 Graphing Data and Descriptive Statistics 36

Suggested Exercises Section 2.3 2.4, 2.5, 2.6, 2.14, 2.15, 2.18, 2.22, 2.23

Section 2.4 2.29, 2.33, 2.41, 2.42, 2.45

Section 2.5 2.66, 2.71, 2.76, 2.85, 2.90

Section 2.6 2.95, 2.97, 2.98

Section 2.9 Review Exercises 2.104, 2.107, 2.113, 2.119, 2.121, 2.122, 2.128