Title: Doing Statistics for Business Data, Inference, and Decision Making Marilyn K' Pelosi Theresa M' Sand
1Doing Statistics for Business Data, Inference,
and Decision MakingMarilyn K. PelosiTheresa M.
Sandifer
Chapter 5 Analyzing Bivariate Data
2Doing Statistics for Business
- Chapter 5 Objectives
- Bivariate Qualitative Data
- Contingency Tables
- Clustered Stacked Bar Charts
- Identifying Quantitative Relationships
Scatter Plots - The Least-squares Line
3Doing Statistics for Business
- A Contingency Table is a table whose
- rows represent the possible values of
- one variable and whose columns
- represent the possible values for a
- second variable. The entries in the table
- are the number of times that each pair
- of values occurs.
4Doing Statistics for Business
- TRY IT NOW!
- Quality Problems
- Creating a Contingency Table
- A company that manufactures cardboard boxes is
trying to - understand some of their quality problems. They
have analyzed some - data and determined that their major defects are
Printing, Color and - Skewness (how square the box is). Further
attempts to pinpoint the - problems have resulted in many opinions and
finger pointing about - responsibility. They decide to collect some
additional data on defect - type and the shift during which production
occurred.
5Doing Statistics for Business
- TRY IT NOW!
- Quality Problems
- Creating a Contingency Table (cont)
- The data (sorted by defect type) are as follows
6Doing Statistics for Business
- TRY IT NOW!
- Quality Problems
- Creating a Contingency Table (cont)
- Create a relative frequency contingency table for
the data. - What percentage of the defects were color?
- Does there appear to be any credence tot he claim
that the majority of the - defects occur on the third shift?
7Doing Statistics for Business
Figure 5.1 Two bar charts representing
a contingency table
8Doing Statistics for Business
- In a Clustered Bar Chart, the bars for
- one variable are grouped according to
- the values of the other qualitative
- variables.
9Doing Statistics for Business
Figure 5.2 Example of a Clustered Bar Chart
10Doing Statistics for Business
- TRY IT NOW!
- Quality Problems
- Creating a Clustered Bar Chart
- The management of the company that manufactures
cardboard boxes - decide to have a meeting with the crews about the
quality problems. The - managers decide that a graphical display of the
data is the best way to - convey the information they have obtained and
that they want to display - the crew data for each of the quality defects.
11Doing Statistics for Business
- TRY IT NOW!
- Quality Problems
- Creating a Clustered Bar Chart (cont)
- Create a clustered bar chart that display the
percent defects for each shift - using the quality problems as the categories for
the x axis.
12Doing Statistics for Business
- TRY IT NOW!
- Quality Problems
- Creating a Clustered Bar Chart (cont)
- Which shift contributes the largest percentage of
color defects? The least - percentage?
- What do you notice about the skewness defects?
13Doing Statistics for Business
- In a Stacked Bar Chart the data for the
- selected variable are represented as a
- percentage of the total for each category
- of the second variable. Each value of
- the selected variable is represented in a
- different way and the bars are stacked
- to total 100.
14Doing Statistics for Business
Figure 5.3 Stacked Bar Chart
15Doing Statistics for Business
- TRY IT NOW!
- Quality Problems
- Creating a Stacked Bar Chart
- The company that manufactures cardboard boxes
decides to create - a graphical display of the data to show to the
employees. What the - company wants to do is to display type of defect
as a percentage of - total defects for each shift. It is hoped that
these data will help each shift - concentrate on its own priorities. The
contingency table for the defect is - shown on the following slide.
16Doing Statistics for Business
- TRY IT NOW!
- Quality Problems
- Creating a Stacked Bar Chart (cont)
- Modify the contingency table to display defect
types as a percentage of - total defects for each shift.
17Doing Statistics for Business
- TRY IT NOW!
- Quality Problems
- Creating a Stacked Bar Chart (cont)
- Create a stacked bar chart for the data.
- Which defect type should each crew concentrate
on? Why?
18Doing Statistics for Business
- In a Scatter Plot an axis is used to
- represent each of the variables and the
- data are plotted as points on the graph.
- Typically, the independent variable is
- plotted on the x axis and the dependent
- variable is plotted on the y axis.
19Doing Statistics for Business
Figure 5.4 Scatter Plot
20Doing Statistics for Business
- TRY IT NOW!
- Airline Fares
- Creating a Scatter Plot
- A travel agency was interested in knowing how
airline fares were - related to the length of the flight in miles.
The agency hypothesized - that the longer the flight, the more the
airfare. The following data were - collected
21Doing Statistics for Business
- TRY IT NOW!
- Airline Fares
- Creating a Scatter Plot (cont)
- Which variable is the dependent variable and
which is the independent - variable?
- Make a scatter plot of the data.
- From your plot, do you think that the travel
agencys hypothesis was - correct? Why or why not?
22Doing Statistics for Business
Figure 5.6 Scatter Plot Indicating no
Relationship Between Two Variables
23Doing Statistics for Business
- TRY IT NOW!
- Starting Salaries Math Courses
- Finding the Least-Squares Line
- The Career Planning office of a large university
is interested in knowing - whether there is a relationship between the
starting salary of graduates - and the number of mathematics courses the
graduates had taken as - students. The Career Planning office goes
through the records for the - last year and finds the following data.
24Doing Statistics for Business
- TRY IT NOW!
- Starting Salaries Math Courses
- Finding the Least-Squares Line (cont)
- Which variable is the independent variable? The
dependent variable?
25Doing Statistics for Business
- TRY IT NOW!
- Starting Salaries Math Courses
- Finding the Least-Squares Line (cont)
- Use a grid to create a scatter plot of the data.
- Do you think that there is a linear relationship
between the number of - math courses taken and the starting salary? If
so, describe the - relationship.
26Doing Statistics for Business
- Discovery Exercise 5.1
- Discovering Relationships
- 1. The data below represent data taken on the
number - of weeks that a student was enrolled in a speed
reading program - and the speed gain in words per minute that the
student has experienced -
-
27Doing Statistics for Business
- Discovery Exercise 5.1
- Discovering Relationships (cont)
- 2. Plot the data on graph paper. Be sure to
label your axes - and to construct the graph so that it uses most
of the paper. -
- 3. Draw a straight line through the points that
you think best represent the - relationship between x and y. What criteria did
you use for drawing the - line you selected?
28Doing Statistics for Business
- The Least Squares technique finds the
- equation of the line that minimizes the
- sum of the squared errors between the
- actual data points and the line.
29Doing Statistics for Business
Figure 5.7 Deviations Between the Data
Points and the Line
30Doing Statistics for Business
- The distance between the predicted value
- of Y, called the deviation or error. The
- deviation, e, is equal to - y.
31Doing Statistics for Business
- TRY IT NOW!
- Starting Salaries and Math Courses
- Finding the Least-Squares Line
- The Career Planning office at the university
wants to use - least squares to find the equation that relates
the number of math - courses taken and starting salary. The data are
- Number of math courses Starting Salary ()
- 1 26,284
- 1 25,470
- 2 26,777
- 3 27,269
- 4 28,553
- 6 30,054
32Doing Statistics for Business
- TRY IT NOW!
- Starting Salaries and Math Courses
- Finding the Least-Squares Line (cont)
- (a) Find the equation for the least-squares line
for the data. - (b) Explain what the least-squares line tells the
Career Planning Office about math courses and
starting salary.
33Doing Statistics for Business
- TRY IT NOW!
- Starting Salaries and Math Courses
- Finding the Least-Squares Line
- Once the least-squares equation is obtained the
Career Planning - Office wants to see whether the equation does a
good job of predicting - starting salary for a given number of math
courses. - Plot the data and the least-squares line on the
same graph.
34Doing Statistics for Business
- TRY IT NOW!
- Starting Salaries and Math Courses
- Finding the Least-Squares Line
- Use the equation you just found to predict the
starting salary - of a person who takes 2 mathematics courses. Do
the same thing - for the starting salary of a person who takes 5
mathematics courses. - Do you think the predictions from the
least-squares line are useful? Why - or why not?
- Is what you just did interpolation or
extrapolation?
35Doing Statistics for Business
- TRY IT NOW!
- Starting Salaries and Math Courses
- Finding the Least-Squares Line (cont)
- Now use the equation of the least-squares line to
predict the - starting salary of a person who takes no math
courses. Do the - same thing for a person who takes 10 math
courses. - Do you think these predictions are valid? Why or
why not?
36Doing Statistics for Business
- Creating Contingency Tables in Excel
-
- 1. From the Data menu, select PivotTable and
Pivot Chart Report . - 2. Since you have already highlighted the range
that contains your data, you can just proceed by
clicking Nextgt. - 3. Indicate where you want the Pivot table to
appear and click the button labeled Layout.
37Doing Statistics for Business
- Creating Contingency Tables in Excel
- 4. Drag the field box for Rank to the area
marked Row and the field box for School to the
area marked Column. Now drag the field box for
either Rank or School into the area marked Data. - 5. Click on Next and tell Excel where you want
- the table to appear either in the current
worksheet - or in a new worksheet.
- 6. Finally, click on Finish.
38Doing Statistics for Business
- Figure 5.10 Contingency Table of Rank and School
39Doing Statistics for Business
- The basics of creating a chart in Excel,
- using the Chart Wizard.
- 1. Highlight the data (Frequency table) that you
want to graph. - 2. Invoke the Chart Wizard by clicking on the
icon on the toolbar. - 3. Follow the directions and hints from the Chart
Wizard. - 4. Edit the graph to include any other features
or changes you want.
40Doing Statistics for Business
- Creating Clustered Bar Charts in in Excel
- 1. Highlight just a portion of the pivot table by
copying it to another location in the worksheet
using the Paste Special command. To do this click
on the lower right hand corner of the table and
highlight it. Select Copy from the Edit menu.
Then, click on the location for the copy and
select Paste Special. In the Paste section,
click on the radio button for Values and in the
Operation section, select None. Click OK. -
41Doing Statistics for Business
- Creating Clustered Bar Charts in in Excel
- (cont)
- 2. Highlight the copy of the table, being careful
not to highlight the Grand Total row or column.
Then start the Chart Wizard and select Column as
the type of chart and clustered chart as the
sub-type. - 3. Click Next twice to get to the Options step
add titles and make any desired formatting
changes. - 4. Click Next to indicate where you want the
chart to be located and then click Finish. -
42Doing Statistics for Business
- Figure 5.14 Clustered Bar Chart
43Doing Statistics for Business
- Creating Stacked Bar Charts in in Excel
-
- 1. Highlight the rows of the pivot table, being
careful not to include the Grand Total row and
column and start the Chart Wizard. - 2. Select Column as the chart type and 100
Stacked Column as the sub-type. - 3. Click Next twice to get to the Options step
put in titles and any other formatting changes
that you want. - 4. Click Next, enter the location for the chart,
and click Finish to display the chart. -
44Doing Statistics for Business
- Figure 5.17 Stacked Bar Chart
45Doing Statistics for Business
- Analyzing Quantitative Bivariate Data
- in Excel
-
- 1. Highlight the range of the data and start the
Chart Wizard. Select XY (Scatter) as the chart
type and Scatter no lines) for the subtype. - 2. Select Nextgt twice to get to the Chart Options
dialog box put in titles and any other
formatting changes that you want. - 3. Select Nextgt to tell Excel where to locate the
chart and click Finish to display the chart. -
46Doing Statistics for Business
- Figure 5.20 Finished Scatter Plot
47Doing Statistics for Business
- Adding the Least-Squares Line to Your
- Scatter Plot
-
- 1. Click on any one of the points in the scatter
plot to highlight them all. - 2. From the Chart menu, select Add Trendline. The
Add Trendline dialog box will open. - 3. In the Trend/Regression section, highlight
Linear. - 4. Click on the Options tab and click the box
labeled Display equation on chart. - 5. Click OK.
48Doing Statistics for Business
- Figure 5.24 Scatter Plot with Least-Squares
Line
49Doing Statistics for Business
- Chapter 5 Summary
- In this chapter you have learned
- Some methods for looking at how two variables are
related. - There are graphical methods, such as stacked bar
charts, clustered bar charts, and scatter plots. - There are quantitative methods, such as
least-squares analysis.