Descriptive Statistics: Tabular and Graphical Methods
Descriptive Statistics: Tabular and Graphical Methods
Descriptive Statistics:
Tabular and
Graphical Methods
20 CHAPTER 2
19
KEY CONCEPTSs
Excel Used
REVIEWs
Bar Graph
A bar graph is a graphical device for depicting qualitative data that have been
summarized in a frequency, relative frequency, or percent frequency distribution.
On the horizontal axis we specify the labels that are used for each of the classes.
A frequency, relative frequency, or percent frequency scale can be used for the vertical
axis.
Using a bar of fixed width drawn above each class label, we extend the height
appropriately.
The bars are separated to emphasize the fact that each class is a separate category.
Pie Chart
The pie chart is a commonly used graphical device for presenting relative frequency
distributions for qualitative data.
First draw a circle; then use the relative frequencies to subdivide the circle into sectors
that correspond to the relative frequency for each class.
Since there are 360 degrees in a circle, a class with a relative frequency of .25 would
consume .25(360) = 90 degrees of the circle.
Cumulative Distributions
The cumulative frequency distribution shows the number of items with values less than
or equal to the upper limit of each class.
The cumulative relative frequency distribution shows the proportion of items with values
less than or equal to the upper limit of each class.
The cumulative percent frequency distribution shows the percentage of items with
values less than or equal to the upper limit of each class.
Ogive
An ogive is a graph of a cumulative distribution.
The data values are shown on the horizontal axis.
Shown on the vertical axis are one of the following: cumulative frequencies, cumulative
relative frequencies, or cumulative percent frequencies.
The frequency (one of the above) of each class is plotted as a point.
Straight lines connect the plotted points.
Stem-and-Leaf Display
A stem-and-leaf display shows both the rank order and shape of the distribution of
the data.
It is similar to a histogram on its side, but it has the advantage of showing the actual
data values.
The first digit(s) of each data item are arranged to the left of a vertical line.
To the right of the vertical line we record the last digit for each item in rank order.
Each line in the display is referred to as a stem.
Each digit on a stem is a leaf.
Scatter Diagram
A scatter diagram is a graphical presentation of the relationship between two
quantitative variables.
One variable is shown on the horizontal axis and the other variable is shown on the
vertical axis.
A positive relationship, negative relationship, or no relationship might be apparent to a
manager with the aid of a scatter diagram.
Excel’s Tool for Scatter Diagrams
Excel’s Chart Wizard can be used to construct scatter diagrams.
Once a scatter diagram has been developed, other Excel tools (covered in later
chapters) can be used, for example to fit a trend line to the plotted data.
EXAMPLESs
EXAMPLE 1
FREQUENCY DISTRIBUTION – QUALITATIVE DATA
Guests staying at Marada Inn were asked to rate the quality of their accommodations
as being excellent, above average, average, below average, or poor. The ratings provided
by a sample of 20 quests are shown below.
Provide a frequency distribution, using Excel, showing the number of occurrences of each
rating level in the sample.
SOLUTION 1
USING EXCEL’S COUNTIF FUNCTION FOR FREQUENCY DISTRIBUTIONS
Excel can be used to count the frequencies and construct a frequency distribution for
TABULAR AND GRAPHICAL METHODS 25
Enter Data: The label “Rating Given” and the data for the 20-guest sample are entered
into cells A1:A21.
(Note: Misspelled data will not be counted as it should. Misspelling
includes typing any spaces before or after the phrases!)
Enter Functions and Formulas: Excel’s COUNTIF function can be used to count the
number of times each rating level appears in cells A2:A21. We first enter a label and the
rating levels in cells C1:C6, the label “Total” in cell C7, and the label “Frequency” in cell D1.
Then, we enter the following function into cell D2:
=COUNTIF($A$2:$A$21,C2)
To count the number of times the other rating levels appear in our data, we copy the above
formula into cells D3:D6. Finally, we total the frequency counts using the SUM function in
cell D7.
(Note: It is a good idea to total your frequency count as a partial check of the
accuracy of your data and function entries. We know from our sample size that
the total frequency should be 20.)
Formula Worksheet
Value Worksheet
26 CHAPTER 2
EXAMPLE 2
RELATIVE AND PERCENT FREQUENCY DISTRIBUTIONS – QUALITATIVE DATA
Refer to the quality ratings data in Example 1. Construct, using Excel, a relative
frequency distribution and percent frequency distribution for the data.
SOLUTION 2
USING EXCEL
For a data set with n observations, the relative frequency of each class is computed as
follows:
Relative Frequency of a Class = (Frequency of the Class)/n
Extending the worksheet shown in the solution to Example 1, we can construct the relative
frequency and percent frequency distributions for the quality ratings data.
Enter Data: The data set is already entered. We simply enter the label “Relative
Frequency” in cell E1and “Percent Frequency” in cell F1.
Enter Functions and Formulas: Using the relative frequency formula above, we compute
the relative frequency for the Poor rating by entering the formula =D2/$D$7 in cell E2. We
then copy cell E2 to cells E3:E6.
To compute the percent frequency for the Poor rating we enter the formula =E2*100
into cell F2. We then copy cell F2 to cells F3:F6. Finally, we copy cell D7 to cells E7:F7 to
compute the total of the relative frequencies (1.00) and the total of the percent frequencies
(100).
Formula Worksheet
Value Worksheet
EXAMPLE 3
BAR GRAPH
Refer to the quality ratings data in Example 1. Display the frequencies (computed in
Example 1) graphically with a bar graph using Excel.
SOLUTION 3
USING EXCEL’S CHART WIZARD FOR BAR GRAPHS
Extending the worksheet shown in the solution to Example 1, we can construct the bar
graph using Excel’s Chart Wizard. A third task (in addition to Enter Data and Enter
Formulas/Functions) is now necessary: Apply Tools.
Enter Functions and Formulas: The functions and formulas for the relative frequencies
we want to graph were entered in Example 1.
Apply Tools: The following steps describe how to use Excel’s Chart Wizard to construct a
bar graph using the frequency distribution appearing in cells C1:D6.
With practice and patience, you can alter the graph initially produced by Excel to look
like the one below or to suit your personal preferences. A right-click on almost any item in
the chart will bring up a menu of alteration options.
Bar Graph
EXAMPLE 4
PIE CHART
Refer to the quality ratings data in Example 1. Display the percent frequencies
(computed in Example 2) graphically with a pie chart using Excel.
SOLUTION 4
USING EXCEL’S CHART WIZARD FOR PIE CHARTS
Excel’s Chart Wizard provides a general tool for constructing graphical displays such as
pie charts. Extending the worksheet shown in the solution to Example 2, we can construct
the pie chart. A third task (in addition to Enter Data and Enter Formulas/Functions) is
necessary: Apply Tools.
TABULAR AND GRAPHICAL METHODS 29
Pie Chart
30 CHAPTER 2
EXAMPLE 5
FREQUENCY DISTRIBUTION – QUANTITATIVE DATA
The manager of Hudson Auto Repair would like to get a better picture of the distribution
of costs for new parts used in the engine tune-up jobs done in the garage. A sample of 50
customer invoices for tune-ups has been taken and the costs of parts, rounded to the
nearest dollar, are listed below.
Develop, using Excel, a frequency distribution for these cost data. Use your own judgment
to determine the number of classes and class width that provide a distribution that will be
meaningful and helpful to the manager.
SOLUTION 5
USING EXCEL’S FREQUENCY FUNCTION
Before we employ Excel we must define the nonoverlapping classes to be used in the
frequency distribution. In this example the data is in dollars. Most people will think in
increments of $5, $10, $20, and so on because these increments coincide with the
denominations of U.S. currency. We should consider using one of these increments as the
class width.
If we round up the largest data value (109) to 110 and we round down the smallest
data value (52) to 50, we have a range of 110 – 50 = 60 for the frequency distribution to
span. If we choose 10 as the class width, the result will be 60/10 = 6 classes, which looks
reasonable.
The data is in integer dollar (no cents) amounts. If we set the lower limit of the first
class at 50, the upper limit of the first class will be 59 (not 60). There are 10 dollar amounts
between 50 and 59 inclusively. The second class will have limits of 60 and 69, and so on.
Now we are ready to use Excel. Using Excel’s COUNTIF function to construct a
frequency distribution for quantitative data is cumbersome. Excel’s FREQUENCY function
is more appropriate here.
Enter Data: The label “Parts Cost” and the cost data from the 50 customer invoices are
entered into cells A1:A51.
Enter Functions and Formulas: Descriptive labels are entered into cells C1 and D1, and
the class limits 50-59, 60-69, and so on, are entered in a text format into cells C2:C7.
TABULAR AND GRAPHICAL METHODS 31
EXAMPLE 6
32 CHAPTER 2
HISTOGRAM
Refer to the auto parts cost data in Example 5. Display the frequency distribution
(constructed in Example 5) graphically with a histogram using Excel.
SOLUTION 6
USING EXCEL’S CHART WIZARD FOR HISTOGRAMS
Enter Functions and Formulas: The functions and formulas for the frequencies we want
to graph were entered in Example 5.
Apply Tools: The following steps describe how to use Excel’s Chart Wizard to construct a
Histogram.
Step 1 Select cells C1:D7
Step 2 Select the Chart Wizard button
Step 3 When the Chart Wizard-Step 1 of 4-Chart Type dialog box appears:
Choose Column in the Chart type list
Choose Clustered Column from the Chart sub-type display
Select Next >
Step 4 When the Chart Wizard-Step 2 of 4-Chart Source Data dialog box appears
Select Next >
Step 5 When the Chart Wizard-Step 3 of 4-Chart Options dialog box appears:
Select the Titles tab and then
Type Histogram for Parts Cost Data in the Chart title box
Enter Parts Cost ($) in the Value (X) axis box
Enter Frequency in the Value (Y) axis box
Select the Legend tab and then
Remove the check in the Show Legend box
Select Next >
Step 6 When the Chart Wizard-Step 4 of 4-Chart Location dialog box appears:
Specify the location for the new chart
Select Finish to display the histogram
Initial Histogram
TABULAR AND GRAPHICAL METHODS 33
Finished Histogram
34 CHAPTER 2
EXAMPLE 7
CUMULATIVE DISTRIBUTIONS
Refer to the auto parts cost data in Example 5. Develop a cumulative frequency
distribution and a cumulative percent frequency distribution for this data using Excel.
SOLUTION 7
USING EXCEL FOR CUMULATIVE DISTRIBUTIONS
Extending the worksheet shown in the solution to Example 5, we can construct the
cumulative frequency and cumulative percent frequency distributions for the cost data.
Enter Functions and Formulas: The functions and formulas for the frequencies we need
were entered in Example 5. The first cumulative frequency (2) is simply the frequency for
the first class, so we enter the formula =D2 in cell E2. The second cumulative frequency
(15) is equal to the frequency of the second class (13) plus the prior cumulative frequency
(2), so we enter the formula =D3+E2 in cell E3. Now, we copy cell E3 to cells E4:E7 to
complete the cumulative distribution.
Value Worksheet
EXAMPLE 8
OGIVE
Refer to the auto parts cost data in Example 5. Construct an ogive, using Excel,
showing the cumulative percent frequency distribution for the data.
SOLUTION 8
USING EXCEL’S CHART WIZARD FOR OGIVES
We will extend the worksheet shown in the solution to Example 7 to develop the ogive.
We need to modify the worksheet in two ways before we can apply the Chart Wizard tool.
We will “insert” (figuratively) a new row between existing rows 1 and 2, and we will insert
(literally) a new column between existing columns C and D.
The reason for a “new” row is that we need a starting point for the ogive showing that
36 CHAPTER 2
no data values fall below the 50-59 class. In other words, we need to create a 40-49 class
with a cumulative percent frequency equal to 0. The reason for a new column is this:
Because the class limits are 50-59, 60-69, and so on, there appear to be one-unit gaps
from 59 to 60, 69 to 70, and so on. These gaps are eliminated by plotting points, on our
ogive, at the midpoints of the gaps. Thus, 59.5 is used as the upper limit for the 50-59
class, 69.5 is used for the 60-69 class, and so on. We will enter these new upper limits in
the new column.
Enter Functions and Formulas: The formulas for the cumulative percent frequencies we
need were entered in Example 7. Now, in order to enter the new 40-49 class in the
worksheet we must free up a row. To do this, we drag cells C2:G8 down one row to cells
C3:G9. This frees up cells C2:G2 for the new 40-49 class information. Next, we will insert
a new column between existing columns C and D. To do this, select any cell in column D
and then go to the main menu, select Insert, and select Columns in the drop-down menu.
In the new column D, enter the label “Parts Cost Upper Limit” in cell D1 and enter the
new upper limits 49.5, 59.5, and so on, in cells D2:D8. In cell C2 enter, in text format, 40-
49. In cells E2:G2 enter zeros. Finally, drag the Sum label in cell C9 to cell D9.
Apply Tools: The following steps describe how to use Excel’s Chart Wizard to construct
TABULAR AND GRAPHICAL METHODS 37
an ogive.
Step 1 Select cells D2:D8 and G2:G8 (To select nonadjacent cells, select cells D2:D8
and then press the Control key while selecting cells G2:G8.)
Step 2 Select the Chart Wizard button
Step 3 When the Chart Wizard-Step 1 of 4-Chart Type dialog box appears:
Choose XY (Scatter) in the Chart type list
Choose Scatter with data points connected by lines from the
Chart sub-type display
Select Next >
Step 4 When the Chart Wizard-Step 2 of 4-Chart Source Data dialog box appears
Select Next >
Step 5 When the Chart Wizard-Step 3 of 4-Chart Options dialog box appears:
Select the Titles tab and then
Type Ogive for the Parts-Cost Data in the Chart title box
Enter Parts Cost ($) in the Value (X) axis box
Enter Cumulative Percent Frequency in the Value (Y) axis box
Select the Legend tab and then
Remove the check in the Show Legend box
Select Next >
Step 6 When the Chart Wizard-Step 4 of 4-Chart Location dialog box appears:
Specify the location for the new chart
Select Finish to display the ogive
Ogive
EXAMPLE 9
38 CHAPTER 2
STEM-AND-LEAF DISPLAY
a) Develop a stem-and-leaf display showing both the rank order and shape of the data set
simultaneously.
b) Also, develop a stretched stem-and-leaf display using two stems for each leading
digit(s).
c) Which of the two displays is better in terms of revealing the natural grouping and
variation in the data?
SOLUTION 9
a) To develop a stem-and-leaf display, we first arrange the leading digits (all but the last
digit) of each data value to the left of a vertical line. To the right of the vertical line, we
record the last digit for each data value as we pass through the observations in the
order they are recorded. The last digit for each data value is placed on the line
corresponding to its first digit.
Next, we sort (in ascending order) the digits on each line. The result is the finished
stem-and-leaf display.
b) If we believe that our stem-and-leaf display has condensed the data too much, we can
stretch the display by using two stems for each leading digit(s). All data values ending
in 0, 1, 2, 3, and 4 are placed on one line, and all values ending in 5, 6, 7, 8, and 9 are
placed on a second line.
c) The stretched stem-and-leaf display in (b) does a better job of revealing the dispersion
of the data.
EXAMPLE 10
CROSSTABULATION
Ithaca Log Homes manufactures four styles of log houses that are sold in kits. The
number of log houses the company has sold, by price and style, for the past year is shown
below.
SOLUTION 10
40 CHAPTER 2
Step 5 When the PivotTable and PivotChart Wizard Step 3 of 3 dialog box appears:
Select New Worksheet
TABULAR AND GRAPHICAL METHODS 41
Drag the Home field button to the DATA section of the diagram
Double click the Sum of Home field button in the data section
When the PivotTable Field dialog box appears:
Choose Count under Summarized by:
Select OK
Select OK
When the PivotTable and PivotChart Wizard-Step 3 of 3 dialog box
reappears:
Select Finish >
EXAMPLE 11
SCATTER DIAGRAM
Develop a scatter diagram to show the relationship between the two variables, number
of interceptions and number of points scored.
SOLUTION 11
Enter Data: The appropriate labels and the data for the five football games are entered
into cells A1:B6.
Apply Tools: The following steps describe how to use Excel’s Chart Wizard to produce a
scatter diagram from the data in the worksheet.
EXERCISESs
EXERCISE 1
FREQUENCY DISTRIBUTIONS – QUALITATIVE DATA
It is time for Roger Hall, manager of new car sales at the Maxwell Ford dealership, to
submit his order for new Mustang coupes. These cars will be parked in the lot, available
for immediate sale to buyers who are not special-ordering a car. One of the decisions he
must make is how many Mustangs of each color option he should order. The new color
options are very similar to the past year’s options.
Roger believes that the colors chosen by customers who special-order their cars best
reflect most customers’ true color preferences. For that reason, he has taken a random
sample of 40 special orders for Mustang coupes placed in the past year. The color
preferences found in the sample are listed below.
EXERCISE 2
BAR GRAPH AND PIE CHART
Refer to the data set in Exercise 1. Construct, using Excel, a bar graph showing the
frequency distribution of the car colors. Also construct, using Excel, a pie chart showing
the percent frequency distribution of the car colors.
EXERCISE 3
FREQUENCY DISTRIBUTIONS – QUANTITATIVE DATA
Missy Walters owns a mail-order business specializing in clothing, linens, and furniture
for children. She is considering offering her customers a discount on shipping charges for
furniture based on the dollar-amount of the furniture order. Before Missy decides the
discount policy, she needs a better understanding of the dollar-amount distribution of the
furniture orders she receives.
Missy had an assistant randomly select 50 recent orders that included furniture and
record the value, to the nearest dollar, of the furniture portion of each order. The data
collected is listed below.
EXERCISE 4
HISTOGRAM
Refer to the data set in Exercise 3. Construct, using Excel, a histogram showing the
percent frequency distribution of the furniture-order values in the sample.
EXERCISE 5
TABULAR AND GRAPHICAL METHODS 45
Refer to the data set in Exercise 3. Develop a cumulative frequency distribution and a
cumulative percent frequency distribution for this data using Excel. Then construct, using
Excel, an ogive showing the cumulative percent frequency distribution.
EXERCISE 6
STEM-AND-LEAF DISPLAY
EXERCISE 7
CROSSTABULATION
Tony Zamora, a real estate investor, has just moved to Clarksville and wants to learn
about the local real estate market. He wants to understand, for example, the relationship
between geographical segment of the city and selling price of a house, the relationship
between selling price and number of bedrooms, and so on.
Tony has randomly selected 25 house-for-sale listings from the Sunday newspaper and
collected the data listed below.
a) Use Excel to construct a crosstabulation for the variables city segment and number of
bedrooms.
EXERCISE 8
SCATTER DIAGRAM
Refer to the real estate data in Exercise 7. Develop a scatter diagram to show the
relationship between the two variables size of house and number of bathrooms. Place the
variable number of bathrooms on the horizontal axis.
TABULAR AND GRAPHICAL METHODS 47
SELF-TESTs
TRUE/FALSE
1. The lines that connect the points plotted in an ogive cannot have a negative slope.
2. In a stem-and-leaf display, a single digit is used to define each leaf, while more than one
digit can be used to define each stem.
5. For a bar graph to be worthwhile, the data being displayed must involve at least two
variables.
FILL-IN-THE-BLANK
1. The techniques of _____________________ consist of simple arithmetic and easy-to-draw
graphs that can be used to summarize data quickly.
5. Adjacent bars are touching in a bar graph and are not touching in a _____________.
MULTIPLE CHOICE
1. Which one of the following graphical methods is most appropriate for qualitative data?
a) ogive
b) scatter diagram
c) histogram
d) pie chart
2. A graphical method that will assist in the understanding of the relationship between two
variables is a
a) crosstabulation
b) scatter diagram
c) stem-and-leaf display
d) bar graph
48 CHAPTER 2
3. A graphical method that can be used to show both the rank order and shape of a data set
simultaneously is a
a) relative frequency distribution
b) pie chart
c) stem-and-leaf display
d) pivot table
4. The proper way to construct a stem-and-leaf display for the data set
{62,67,68,73,73,79,91,94,95,97} is to
a) exclude a stem labeled ‘8’
b) include a stem labeled ‘8’ and enter no leaves on the stem
c) include a stem labeled ‘(8)’ and enter no leaves on the stem
d) include a stem labeled ‘8’ and enter one leaf value of ‘0’ on the stem
5. The graphical method presented in the chapter for displaying cumulative frequencies is
a) an ogive
b) a stem-and-leaf display
c) a histogram
d) a bar graph
ANSWERSs
EXERCISES
1)
TABULAR AND GRAPHICAL METHODS 49
3)
50 CHAPTER 2
4)
5)
6)
TABULAR AND GRAPHICAL METHODS 51
7) a) Crosstabulation:
b) Row Percentages:
c) We see that fewest bedrooms are associated with the South, and the most bedrooms
are associated with the West and particularly the Northwest.
8)
52 CHAPTER 2
TRUE/FALSE
1. True
2. True
3. False
4. True
5. False
FILL-IN-THE-BLANK
1. exploratory data analysis
2. frequency distribution
3. cumulative relative frequency
4. quantitative, qualitative
5. histogram
MULTIPLE CHOICE
1. d
2. b
3. c
4. b
5. a