Business Economis
Chapter 13
Correlation and Linear Regression
© McGraw-Hill Education. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education.
In this chapter, we study the relationship between two interval- or ratio-level variables and develop numerical measures to express the relationship between two variables. We also develop an equation to express the relationship between variables. We examine both correlation analysis and regression analysis.
1
Learning Objectives (1 of 2)
13-1 Explain the purpose of correlation analysis
13-2 Calculate a correlation coefficient to test and interpret the relationship between two variables
13-3 Apply regression analysis to estimate the linear relationship between two variables
13-4 Evaluate the significance of the slope of the regression equation
13-5 Evaluate a regression equation’s ability to predict using the standard estimate of the error and the coefficient of determination
© McGraw-Hill Education.
13-‹#›
Learning Objectives (2 of 2)
13-6 Calculate and interpret confidence and prediction intervals
13-7 Use a log function to transform a nonlinear relationship
© McGraw-Hill Education.
13-‹#›
What is Correlation Analysis? (1 of 2)
Used to report the relationship between two variables
CORRELATION ANALYSIS A group of techniques to measure the relationship between two variables.
In addition to graphing techniques, we’ll develop numerical measures to describe the relationships
© McGraw-Hill Education.
13-‹#›
In all business fields, identifying and studying relationships between variables can provide information on ways to increase profits, methods to decrease costs, or variables to predict demand.
4
What is Correlation Analysis? (2 of 2)
Examples
Does the amount Healthtex spends per month on training its sales force affect its monthly sales
Does the number of hours students study for an exam influence the exam score
© McGraw-Hill Education.
13-‹#›
Scatter Diagram (1 of 3)
A scatter diagram is a graphic tool used to portray the relationship between two variables
The independent variable is scaled on the X-axis and is the variable used as the predictor
The dependent variable is scaled on the Y-axis and is the variable being estimated
© McGraw-Hill Education.
13-‹#›
We often begin our study of the relationship between two variables with a scatter diagram. It gives us a visual representation of the relationship between the variables. For instance, a sales manager wants to know if there is a relationship between the number of sales calls made in a month and the number of copiers sold that month and begins the analysis with a random sample of 15 sales representatives. With this data, the number of sales calls is the independent variable and number of copiers sold is the dependent variable.
6
Scatter Diagram (2 of 3)
| Sales Representative | Sales Calls | Copiers Sold |
| Brian Virost | 96 | 41 |
| Carlos Ramirez | 40 | 41 |
| Carol Saia | 104 | 51 |
| Greg Fish | 128 | 60 |
| Jeff Hall | 164 | 61 |
| Mark Reynolds | 76 | 29 |
| Meryl Rumsey | 72 | 39 |
| Mike Kiel | 80 | 50 |
| Ray Snarsky | 36 | 28 |
| Rich Niles | 84 | 43 |
| Ron Broderick | 180 | 70 |
| Sal Spina | 132 | 56 |
| Soni Jones | 120 | 45 |
| Susan Welch | 44 | 31 |
| Tom Keller | 84 | 30 |
© McGraw-Hill Education.
13-‹#›
Scatter Diagram (3 of 3)
Graphing the data in a scatter diagram will make the relationship between sales calls and copiers sales easier to see.
© McGraw-Hill Education.
13-‹#›
8
Scatter Diagram Example (1 of 2)
North American Copier Sales sells copiers to businesses of all sizes throughout the United States and Canada. The new national sales manager is preparing for an upcoming sales meeting and would like to impress upon the sales representatives the importance of making an extra sales call each day. She takes a random sample of 15 sales representatives and gathers information on the number of sales calls made last month and the number of copiers sold. Develop a scatter diagram of the data.
© McGraw-Hill Education.
13-‹#›
We develop a scatter diagram of the data. The first salesperson, Brian Virost, made 96 sales calls and sold 41 copiers; to plot this point move along the horizontal axis to x=96 and then go vertically to y=41 and place a dot at that intersection. Do this for the all the sales data. It is perfectly reasonable for the manager to tell the sales people that the more sales calls they make, the more copiers they can expect to sell. Note, that while there does seem to be a positive relationship between the two variables, all the points do not fall on a line.
9
Scatter Diagram Example (2 of 2)
Sales reps who make more calls tend to sell more copiers!
© McGraw-Hill Education.
13-‹#›
Correlation Coefficient (1 of 5)
CORRELATION COEFFICIENT A measure of the strength of the linear relationship between two variables.
© McGraw-Hill Education.
13-‹#›
Both variables must be at least the interval scale of measurement to find the correlation coefficient. A value of -1 indicates perfect negative correlation and a value of +1 indicates perfect positive correlation.
11
Correlation Coefficient (2 of 5)
Characteristics of the correlation coefficient are
The sample correlation coefficient is identified as r
It shows the direction and strength of the linear relationship between two interval- or ratio-scale variables
It ranges from -1.00 to 1.00
If it’s 0, there is no association
A value near 1.00 indicates a direct or positive correlation
A value near -1.00 indicates a negative correlation
© McGraw-Hill Education.
13-‹#›
Correlation Coefficient (3 of 5)
© McGraw-Hill Education.
13-‹#›
Correlation Coefficient (4 of 5)
The following graphs summarize the strength and direction of the correlation coefficient
© McGraw-Hill Education.
13-‹#›
In the set of charts at the bottom of the slide, the first one indicates no correlation between the number of children as the independent variable, and income (as the dependent variable). The middle chart shows there is a slightly negative correlation between price and quantity. The chart on the right shows a strong positive relationship between hours studied (the independent variable) and exam score (the dependent variable).
14
Correlation Coefficient (5 of 5)
© McGraw-Hill Education.
13-‹#›
15
Correlation Coefficient, r (1 of 6)
How is the correlation coefficient determined? We’ll use the North American Copier Sales as an example. We begin with a scatter diagram, but this time we’ll draw a vertical line at the mean of the x-values (96 sales calls) and a horizontal line at the mean of the y-values (45 copiers).
© McGraw-Hill Education.
13-‹#›
Drawing lines through the center of the data establishes quadrants. These two variables are positively related when the number of copiers sold is above the mean and the number of sales calls is also above the mean; the points appear in quadrant 1. When the number of sales calls is less than the mean, so is the number of copiers sold, the points appear in quadrant lll.
16
Correlation Coefficient, r (2 of 6)
| Sales Representative | Sales Calls | Copiers Sold |
| Brian Virost | 96 | 41 |
| Carlos Ramirez | 40 | 41 |
| Carol Saia | 104 | 51 |
| Greg Fish | 128 | 60 |
| Jeff Hall | 164 | 61 |
| Mark Reynolds | 76 | 29 |
| Meryl Rumsey | 72 | 39 |
| Mike Kiel | 80 | 50 |
| Ray Snarsky | 36 | 28 |
| Rich Niles | 84 | 43 |
| Ron Broderick | 180 | 70 |
| Sal Spina | 132 | 56 |
| Soni Jones | 120 | 45 |
| Susan Welch | 44 | 31 |
| Tom Keller | 84 | 30 |
© McGraw-Hill Education.
13-‹#›
Correlation Coefficient, r (3 of 6)
© McGraw-Hill Education.
13-‹#›
Correlation Coefficient, r (4 of 6)
How is the correlation coefficient determined? Now we find the deviations from the mean number of sales calls and the mean number of copiers sold; then multiply the them. The sum of their product is 6,672 and will be used in formula 13-1 to find r. We also need the standard deviations. The result, r=.865 indicates a strong, positive relationship.
© McGraw-Hill Education.
13-‹#›
The correlation coefficient is designated by the letter r and found with equation 13-1. We will use Excel to find the standard deviations of the two variables, x (sales calls) and y (copier sales) to use in the formula.
19
Correlation Coefficient, r (5 of 6)
© McGraw-Hill Education.
13-‹#›
Correlation Coefficient, r (6 of 6)
© McGraw-Hill Education.
13-‹#›
Correlation Coefficient Example (1 of 3)
The Applewood Auto Group’s marketing department believes younger buyers purchase vehicles on which lower profits are earned and older buyers purchase vehicles on which higher profits are earned. They would like to use this information as part of an upcoming advertising campaign to try to attract older buyers. Develop a scatter diagram and then determine the correlation coefficient. Would this be a useful advertising feature?
© McGraw-Hill Education.
13-‹#›
We use Excel to calculate r; r is .262 and is much closer to zero than one. We would observe the relationship between the age of the buyer and the profit of their purchase is not strong.
22
Correlation Coefficient Example (2 of 3)
The scatter diagram suggests that a positive relationship does exist between age and profit. But it does not appear to be a strong relationship.
© McGraw-Hill Education.
13-‹#›
Correlation Coefficient Example (3 of 3)
Next, calculate r, it is 0.262. The relationship is positive but weak. The data does not support a business decision to create an advertising campaign to attract older buyers!
| Age | Profit | |
| Age | 1 | |
| Profit | 0.262 | 1 |
© McGraw-Hill Education.
13-‹#›
Testing the Significance of r
Recall that the sales manager from North American Copier Sales found an r of 0.865
Could the result be due to sampling error? Remember only 15 salespeople were sampled
We ask the question, could there be zero correlation in the population from which the sample was selected?
We’ll let ρ represent the correlation in the population and conduct a hypothesis test to find out
© McGraw-Hill Education.
13-‹#›
25
Testing the Significance of r Example (1 of 3)
Step 1: State the null and the alternate hypothesis
Step 2: Select the level of significance, we’ll use .05
Step 3: Select the test statistic, we use t
Step 4: Formulate the decision rule, reject H0 if t < 2.160 or > 2.160
© McGraw-Hill Education.
13-‹#›
The population in this example is all of the salespeople employed by the firm. This is a two-tailed test. We use Appendix B.5 for degrees of freedom n-2=15-2=13 and a level of significance of .05. Use formula 13-2; the result is 6.216. We reject the null hypothesis, there is correlation with respect to the number of sales calls made and the number of copiers sold in the population of salespeople.
26
Testing the Significance of r Example (2 of 3)
Step 5: Make decision, reject H0, t = 6.216
Step 6: Interpret, there is correlation with respect to the number of sales calls made and the number of copiers sold in the population of salespeople.
© McGraw-Hill Education.
13-‹#›
Testing the Significance of r Example (3 of 3)
Decision rule for Test of Hypothesis at .05 significance Level and 13 df
© McGraw-Hill Education.
13-‹#›
Testing the Significance of the Correlation Coefficient (1 of 3)
In the Applewood Auto Group example, we found an r=0.262 which is positive, but rather weak. We test our conclusion by conducting a hypothesis test that the correlation is greater than 0.
Step 1: State the null and the alternate hypothesis
© McGraw-Hill Education.
13-‹#›
This is a one-tailed (right-tailed) test. The degrees of freedom in this test is n-2=180-2=178; but Appendix B.5 doesn’t have 178, so we use 180 so the critical value is 1.653. We use formula 13-2 and conclude the sample correlation is too large to have come from a population with no correlation. The outcome of a marketing campaign directed to older buyers is uncertain.
29
Testing the Significance of the Correlation Coefficient (2 of 3)
Step 2: Select the level of significance, we’ll use .05
Step 3: Select the test statistic, we use t
Step 4: Formulate the decision rule, reject H0 if t > 1.653
Step 5: Make decision, reject H0, t = 3.622
Step 6: Interpret, there is correlation with respect to profits and age of the buyer
© McGraw-Hill Education.
13-‹#›
Testing the Significance of the Correlation Coefficient (3 of 3)
© McGraw-Hill Education.
13-‹#›
Regression Analysis
In regression analysis, we estimate one variable based on another variable
The variable being estimated is the dependent variable
The variable used to make the estimate or predict the value is the independent variable
The relationship between the variables is linear
Both the independent and the dependent variables must be interval or ratio scale
REGRESSION EQUATION An equation that expresses the linear relationship between two variables.
© McGraw-Hill Education.
13-‹#›
The least squares criterion is used to determine the regression equation.
32
Least Squares Principle (1 of 2)
In regression analysis, our objective is to use the data to position a line that best represents the relationship between two variables
The first approach is to use a scatter diagram to visually position the line
© McGraw-Hill Education.
13-‹#›
The lines drawn in the chart on the right represents the judgement of four people. The method that results in a single, best regression line is called the least squares principle.
33
Least Squares Principle (2 of 2)
But this depends on judgement, we would prefer a method that results in a single, best regression line
© McGraw-Hill Education.
13-‹#›
Least Squares Regression Line (1 of 6)
LEAST SQUARES PRINCIPLE A mathematical procedure that uses the data to position a line with the objective of minimizing the sum of the squares of the vertical distances between the actual y values and the predicted values of y.
To illustrate, the same data are plotted in the three charts below
© McGraw-Hill Education.
13-‹#›
The line drawn in chart 13-9 is the best fitting line and is drawn using the least squares method. It is the best fitting because the sum of the squares of the vertical deviations about it is at a minimum; the sum of the squares is 24. Chart 13-10 and 13-11 was drawn differently and their sum of the squares is 44 and 132 respectively.
35
Least Squares Regression Line (2 of 6)
CHART 13-9 The Least Squares Line
© McGraw-Hill Education.
13-‹#›
Least Squares Regression Line (3 of 6)
CHART 13-10 Line Drawn with a straight Edge
© McGraw-Hill Education.
13-‹#›
Least Squares Regression Line (4 of 6)
CHART 13-11 Different line Drawn with a straight Edge
© McGraw-Hill Education.
13-‹#›
Least Squares Regression Line (5 of 6)
This is the equation of a line
a is the constant or intercept
b is the slope of the fitted line
x is the value of the independent variable
© McGraw-Hill Education.
13-‹#›
39
Least Squares Regression Line (6 of 6)
The formulas for a and b are
© McGraw-Hill Education.
13-‹#›
Least Squares Regression Line Example (1 of 3)
Recall the example of North American Copier Sales. The sales manager gathered information on the number of sales calls made and the number of copiers sold. Use the least squares method to determine a linear equation to express the relationship between the two variables.
© McGraw-Hill Education.
13-‹#›
The b value of .2608 indicates that for each additional sales call, the sales representative can expect to increase the number of copiers sold by about .2608. So 20 additional sales calls in a month will result in about five more copiers being sold.
41
Least Squares Regression Line Example (2 of 3)
The first step is to find the slope of the least squares regression line, b
Then determine the regression line
Next, find a
© McGraw-Hill Education.
13-‹#›
Least Squares Regression Line Example (3 of 3)
So if a salesperson makes 100 calls, he or she can expect to sell 46.0432 copiers
© McGraw-Hill Education.
13-‹#›
Drawing the Regression Line (1 of 3)
The least squares equation can be drawn on the scatter diagram. For example, the fifth sales representative is Jeff Hall. He made 164 calls. His estimated number of copiers sold is 62.7344. The plot x = 164 and
is located by moving to 164 on the x-axis and then going vertically to 63.7344. The other points on the regression equation can be determined by substituting a particular value of x into the regression equation and calculating
© McGraw-Hill Education.
13-‹#›
The line of regression is drawn on the scatter diagram. Estimated sales for all sales representatives are calculated using the formula we determined earlier and placed in the table. The regression line will always pass through the mean of variables x and y. Plus, there is no other line through the data where the sum of the deviations is smaller.
44
Drawing the Regression Line (2 of 3)
© McGraw-Hill Education.
13-‹#›
Drawing the Regression Line (3 of 3)
| Sales Representative | Sales Calls (x) | Coplers Sold (y) | Estimated Sales |
| Brian Virost | 96 | 41 | 45.0000 |
| Carlos Ramirez | 40 | 41 | 30.3952 |
| Carol Sala | 104 | 51 | 47.0864 |
| Greg Fish | 128 | 60 | 53.3456 |
| Jeff Hall | 164 | 61 | 62.7344 |
| Mark Reynolds | 76 | 29 | 39.7840 |
| Meryl Rumsey | 72 | 39 | 38.7408 |
| Mike Kiel | 80 | 50 | 40.8272 |
| Ray Snarsky | 36 | 28 | 29.3520 |
| Rich Niles | 84 | 43 | 41.8704 |
| Ron Broderick | 180 | 70 | 66.9072 |
| Sal Spina | 132 | 56 | 54.3888 |
| Sonl Jones | 120 | 45 | 51.2592 |
| Susan Welch | 44 | 31 | 31.4384 |
| Tom Keller | 84 | 30 | 41.8704 |
© McGraw-Hill Education.
13-‹#›
Regression Equation Slope Test
For a regression equation, the slope is tested for significance
We test the hypothesis that the slope of the line in the population is 0
If we do not reject the null hypothesis, we conclude there is no relationship between the two variables
When testing the null hypothesis about the slope, the test statistic is with n – 2 degrees of freedom
We begin with the hypothesis statements
© McGraw-Hill Education.
13-‹#›
47
Regression Equation Slope Test Example (1 of 3)
Recall the North American Copier Sales example. We identified the slope as b and it is our estimate of the slope of the population, β. We conduct a hypothesis test.
Step 1: State the null and alternate hypothesis
© McGraw-Hill Education.
13-‹#›
This is a one-tailed test. If we do not reject the null hypothesis, we conclude that the slope of the regression line could be zero. We use Excel to determine the needed regression statistics. We find the critical value in Appendix B.5 with degrees of freedom of n-2, 15-2=13 and a level of significance of .05, it is 1.771. We reject the null hypothesis and conclude the slope of the line is greater than 0.
48
Regression Equation Slope Test Example (2 of 3)
Step 2: Select the level of significance, we use .05
Step 3: Select the test statistic, t
Step 4: Formulate the decision rule, reject H0 if t > 1.771
Step 5: Make decision, reject H0, t = 6.205
Step 6: Interpret, the number of sales calls is useful in estimating copier sales
© McGraw-Hill Education.
13-‹#›
Regression Equation Slope Test Example (3 of 3)
Highlighted, b is .2606; the standard error is .0420
© McGraw-Hill Education.
13-‹#›
Evaluating a Regression Equation’s Ability to Predict (1 of 2)
Perfect prediction is practically impossible in almost all disciplines, including economics and business
The North American Copier Sales example showed a significant relationship between sales calls and copier sales, the equation is
Number of copiers sold = 19.9632 +.2608
(Number of sales calls)
© McGraw-Hill Education.
13-‹#›
The measure we’ll use is the standard error of the estimate, sy,x. We find more information on the next slide.
51
Evaluating a Regression Equation’s Ability to Predict (2 of 2)
What if the number of sales calls is 84, we calculate the number of copiers sold is 41.8704 - we did have two employees with 84 sales calls, they sold just 30 and 24
So, is the regression equation a good predictor?
We need a measure that will tell how inaccurate the estimate might be
© McGraw-Hill Education.
13-‹#›
The Standard Error of Estimate (1 of 2)
The standard error of estimate measures the variation around the regression line
STANDARD ERROR OF ESTIMATE A measure of the dispersion, or scatter, of the observed values around the line of regression for a given value of x.
It is in the same units as the dependent variable
It is based on squared deviations from the regression line
© McGraw-Hill Education.
13-‹#›
The standard error of estimate is the same concept as the standard deviation in chapter 3. The standard deviation measures dispersion around the mean. Whereas, the standard error of estimate measures dispersion around the regression line for a given value of x.
53
The Standard Error of Estimate (2 of 2)
Small values indicate that the points cluster closely about the regression line
It is computed using the following formula
© McGraw-Hill Education.
13-‹#›
The Standard Error of Estimate Example (1 of 3)
We calculate the standard error of estimate in this example. We need the sum of the squared differences between each observed value of y and the predicted value of y, which is
We use a spreadsheet to help with the calculations.
© McGraw-Hill Education.
13-‹#›
The standard error of estimate can be calculated using statistical software like Excel.
55
The Standard Error of Estimate Example (2 of 3)
© McGraw-Hill Education.
13-‹#›
The standard error of estimate can be calculated using statistical software like Excel.
56
The Standard Error of Estimate Example (3 of 3)
The standard error of estimate is 6.720
If the standard error of estimate is small, this indicates that the data are relatively close to the regression line and the regression equation can be used. If it is large, the data are widely scattered around the regression line and the regression equation will not provide a precise estimate of y.
© McGraw-Hill Education.
13-‹#›
Coefficient of Determination (1 of 2)
COEFFICIENT OF DETERMINATION The proportion of the total variation in the dependent variable Y that is explained, or accounted for, by the variation in the independent variable X.
It ranges from 0 to 1.0
It is the square of the correlation coefficient
It is found from the following formula
© McGraw-Hill Education.
13-‹#›
The coefficient of determination provides a more interpretable measure of a regression equation’s ability to predict. It’s easy to compute too, just square the correlation coefficient.
58
Coefficient of Determination (2 of 2)
In the North American Copier Sales example, the correlation coefficient was .865; just square that (.865)2 = .748; this is the coefficient of determination
This means 74.8% of the variation in the number of copiers sold is explained by the variation in sales calls
© McGraw-Hill Education.
13-‹#›
Relationships among r, r2, and sy,x (1 of 2)
Recall the standard error of estimate measures how close the actual values are to the regression line
When it is small, the two variables are closely related
The correlation coefficient measures the strength of the linear association between two variables
When points on the scatter diagram are close to the line, the correlation coefficient tends to be large
© McGraw-Hill Education.
13-‹#›
As the strength of a linear relationship between two variables increases, the correlation coefficient increases and the standard error of the estimate decreases.
60
Relationships among r, r2, and sy,x (2 of 2)
Therefore, the correlation coefficient and the standard error of estimate are inversely related
As noted earlier, the coefficient of determination is the correlation coefficient squared
© McGraw-Hill Education.
13-‹#›
Inference about Linear Regression (1 of 2)
We can predict the number of copiers sold (y) for a selected value of number of sales calls made (x)
But first, let’s review the regression assumptions of each of the distributions in the graph below
Follow the normal distribution
Has a mean on the regression line
Has the same standard error of estimate, sy,x
Is independent of the others
© McGraw-Hill Education.
13-‹#›
We’ll now relate these assumptions to North American Copier Sales.
62
Inference about Linear Regression (2 of 2)
© McGraw-Hill Education.
13-‹#›
Constructing Confidence and Prediction Intervals (1 of 2)
Use a confidence interval when the regression equation is used to predict the mean value of y for a given value of x
For instance, we would use a confidence interval to estimate the mean salary of all executives in the retail industry based on their years of experience
© McGraw-Hill Education.
13-‹#›
Two different predictions can be made for a selected value of the independent variable; a confidence interval and a prediction interval. In a confidence interval, the width of the interval is affected by the level of confidence, the size of the standard error of the estimate, and the size of the sample, as well as the value of the independent variable. The prediction interval is also based on the level of confidence, the size of the standard error of the estimate, the size of the sample, and the value of the independent variable. The difference between formulas 13-11 and 13-12 is the 1 under the radical. The prediction interval will be wider than the confidence interval.
64
Constructing Confidence and Prediction Intervals (2 of 2)
Use a prediction interval when the regression equation is used to predict an individual y for a given value of x
For instance, we would estimate the salary of a particular retail executive who has 20 years of experience
© McGraw-Hill Education.
13-‹#›
Confidence Interval and Prediction Interval Example (1 of 4)
We return to the North American Copier Sales example. Determine a 95% confidence interval for all sales representatives who make 50 calls, and determine a prediction interval for Sheila Baker, a west coast sales representative who made 50 sales calls.
© McGraw-Hill Education.
13-‹#›
66
Confidence Interval and Prediction Interval Example (2 of 4)
© McGraw-Hill Education.
13-‹#›
Confidence Interval and Prediction Interval Example (3 of 4)
© McGraw-Hill Education.
13-‹#›
Confidence Interval and Prediction Interval Example (4 of 4)
The 95% confidence interval for all sales representatives is 27.3942 up to 38.6122
The 95% prediction interval for Sheila Baker is 17.442 up to 48.5644 copiers
© McGraw-Hill Education.
13-‹#›
Transforming Data (1 of 2)
Regression analysis and the correlation coefficient requires data to be linear
But what if data is not linear?
If data is not linear, we can rescale one or both of the variables so the new relationship is linear
© McGraw-Hill Education.
13-‹#›
For example, instead of using the actual values of the dependent variable y, we would create a new dependent variable by transforming it.
70
Transforming Data (2 of 2)
Common transformations include
Computing the log to the base 10 of y, Log(y)
Taking the square root
Taking the reciprocal
Squaring one or both variables
Caution: when you are interpreting a correlation coefficient or regression equation – it could be nonlinear
© McGraw-Hill Education.
13-‹#›
Transforming Data Example (1 of 9)
GroceryLand Supermarkets is a regional grocery chain located in the midwestern United States. The director of marketing wishes to study the effect of price on weekly sales of their two-liter private brand diet cola. The objectives of the study are
To determine whether there is a relationship between selling price and weekly sales. Is this relationship direct or indirect? Is it strong or weak?
© McGraw-Hill Education.
13-‹#›
There is a strong relationship between the two variables. The coefficient of determination is 88.9%. So 88.9% of the variation in Sales is accounted for by the variation in Price. But, a careful analysis of the scatter diagram reveals that the relationship may not be linear. That means we need to transform the data.
72
Transforming Data Example (2 of 9)
To determine the effect of price increases or decreases on sales. Can we effectively forecast sales based on the price?
To begin, the company decides to price the two-liter diet cola from $0.50 to $2.00. To collect the data, a random sample of 20 stores is taken and then each store is randomly assigned a selling price.
© McGraw-Hill Education.
13-‹#›
Transforming Data Example (3 of 9)
GroceryLand Sales and Price Data
| Store Number | Price | Sales |
| 17 | 0.50 | 181 |
| 121 | 1.35 | 33 |
| 227 | 0.79 | 91 |
| 135 | 1.71 | 13 |
| 6 | 1.38 | 34 |
| 282 | 1.22 | 47 |
| 172 | 1.03 | 73 |
| 296 | 1.84 | 11 |
| 143 | 1.73 | 15 |
| 66 | 1.62 | 20 |
© McGraw-Hill Education.
13-‹#›
Transforming Data Example (4 of 9)
GroceryLand Sales and Price Data
| Store Number | Price | Sales |
| 30 | 0.76 | 91 |
| 127 | 1.79 | 13 |
| 266 | 1.57 | 22 |
| 117 | 1.27 | 34 |
| 132 | 0.96 | 74 |
| 120 | 0.52 | 164 |
| 272 | 0.64 | 129 |
| 120 | 1.05 | 55 |
| 194 | 0.72 | 107 |
| 105 | 0.75 | 119 |
© McGraw-Hill Education.
13-‹#›
Transforming Data Example (5 of 9)
A strong, inverse relationship!
© McGraw-Hill Education.
13-‹#›
Transforming Data Example (6 of 9)
The director of marketing decides to transform the dependent variable, Sales, by taking the logarithm to the base 10 of each sales value. Note the new variable, Log-Sales, in the following analysis as it is used as the dependent variable with Price as the independent variable.
© McGraw-Hill Education.
13-‹#›
Clearly, as price increases, sales decrease. This relationship will be very helpful to GroceryLand when making pricing decisions for this product.
77
Transforming Data Example (7 of 9)
© McGraw-Hill Education.
13-‹#›
Transforming Data Example (8 of 9)
By transforming the dependent variable, Sales, we increase the coefficient of determination from .889 to .989. So now Price explains almost all of the variation in Log-Sales
The transformed data “fit” the linear relationship better
The regression equation is
© McGraw-Hill Education.
13-‹#›
Transforming Data Example (9 of 9)
Now, undo the transformation by taking the antilog of 1.593; 39.174 or 39 bottles
That is, if they price the cola at $1.25, they’ll sell 39 bottles; at $2.00 they’ll sell 9
© McGraw-Hill Education.
13-‹#›
End of Presentation
© McGraw-Hill Education. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw-Hill Education.
13-‹#›
(
)
(
)
(
)
[
]
1
-
13
T
COEFFICIEN
N
CORRELATIO
y
x
s
s
-
n
y
-
y
x
-
x
1
r
å
=
(
)
(
)
(
)
(
)
6,672
0
0
675
1440
Totals
180
15
12
30
84
Keller
Tom
728
14
52
31
44
Welch
Susan
0
0
24
45
120
Jones
Soni
396
11
36
56
132
Spina
Sal
2,100
25
84
70
180
Broderick
Ron
24
2
12
43
84
Niles
Rich
1,020
17
60
28
36
Snarsky
Ray
80
5
16
50
80
Kiel
Mike
144
6
24
39
72
Rumsey
Meryl
320
16
20
29
76
Reynolds
Mark
1,088
16
68
61
164
Hall
Jeff
480
15
32
60
128
Fish
Greg
48
6
8
51
104
Saia
Carol
224
4
56
41
40
Ramirez
Carlos
0
4
0
41
96
Virost
Brian
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
y
y
x
x
y
y
x
x
y
x
Sold
Copiers
Calls
Sales
tive
Representa
Sales
(
)
(
)
(
)
0.865
12.89
42.76
1
15
6672
r
=
-
=
zero
from
different
is
population
the
in
n
correlatio
The
0
ñ
:
H
zero
is
population
the
in
n
correlatio
The
0
ñ
:
H
1
0
¹
=
[
]
216
.
6
865
.
1
2
15
865
.
1
freedom
of
degrees
2
-
n
with
1
2
2
2
=
-
-
=
-
-
=
-
-
=
r
2
n
r
t
r
2
n
r
t
2
-
13
T
COEFFICIEN
N
CORRELATIO
THE
FOR
TEST
t
positive
is
population
the
in
n
correlatio
The
0
ñ
:
H
zero
or
negative
is
population
the
in
n
correlatio
The
0
ñ
:
H
1
0
>
£
[
]
3.622
0.262
1
2
180
0.262
1
freedom
of
degrees
2
-
n
with
1
2
2
2
=
-
-
=
-
-
=
-
-
=
r
2
n
r
t
r
2
n
r
t
2
-
13
T
COEFFICIEN
N
CORRELATIO
THE
FOR
TEST
t
[
]
x
of
value
selected
a
for
y
of
value
estimated
the
is
y
bx
a
y
^
^
3
-
13
EQUATION
REGRESSION
LINEAR
OF
FORM
GENERAL
+
=
[
]
[
]
5
-
13
INTERCEPT
-
4
-
13
LINE
REGRESSION
THE
OF
SLOPE
^
^
x
y
bx
-
y
a
s
s
r
b
=
÷
÷
ø
ö
ç
ç
è
æ
=
Y
0.2608
42.76
12.89
.865
=
÷
ø
ö
ç
è
æ
=
÷
÷
ø
ö
ç
ç
è
æ
=
x
y
s
s
r
b
(
)
19.9632
96
.2608
45
=
-
=
-
=
x
b
y
a
0.2608x.
19.9632
y
^
+
=
(
)
46.0432
100
0.2608
19.9632
x
0.2608
19.9632
y
^
=
+
=
+
=
62.7344
y
^
=
.
y
ˆ
0.2608x.
19.9632
y
^
+
=
0
â
:
H
0
â
:
H
1
0
¹
=
0
â
:
H
0
â
:
H
1
0
>
£
[
]
6.205
0.042
0
0.2606
0
freedom
of
degrees
2
-
with
0
=
-
=
-
=
-
=
b
b
s
b
t
n
s
b
t
6
-
13
SLOPE
THE
FOR
TEST
[
]
7
-
13
ESTIMATE
OF
ERROR
STANDARD
2
2
-
÷
ø
ö
ç
è
æ
-
å
=
×
n
y
y
s
^
x
y
.
y
ˆ
(
)
(
)
(
)
(
)
587.1108
0.0000
Total
y
y
y
y
Sales
Estimated
y
Sold
Copiers
x
Calls
Sales
Rep
Sales
2
140.9064
11.8704
41.8704
30
84
Keller
Tom
0.1922
0.4384
31.4384
31
44
Welch
Susan
39.1776
6.2592
51.2592
45
120
Jones
Soni
2.5960
1.6112
54.3888
56
132
Spina
Sal
9.5654
3.0928
66.9072
70
180
Broderick
Ron
1.2760
1.1296
41.8704
43
84
Niles
Rick
1.8279
1.3520
29.3520
28
36
Snarsky
Ray
84.1403
9.1728
40.8272
50
80
Kiel
Mike
0.0672
0.2592
38.7408
39
72
Rumsey
Meryl
116.2947
10.7840
39.7840
29
76
Reynolds
Mark
3.0081
1.7344
62.7344
61
164
Hall
Jeff
44.2810
6.6544
53.3456
60
128
Fish
Greg
15.3163
3.9136
47.0864
51
104
Saia
Carol
112.4618
10.6048
30.3952
41
40
Ramirez
Carlos
16.0000
4.0000
45.0000
41
96
Virost
Brian
ˆ
ˆ
-
-
-
-
-
-
-
-
-
6.720
2
15
587.1108
2
2
=
-
=
-
÷
ø
ö
ç
è
æ
-
å
=
×
n
y
y
s
^
x
y
[
]
8
-
13
ION
DETERMINAT
OF
T
COEFFICIEN
Total
SS
SSE
1
Total
SS
SSR
2
-
=
=
r
ns
observatio
the
all
virtually
include
will
3s
y
ns
observatio
the
of
95%
include
will
2s
y
ns
observatio
the
of
68%
include
will
s
y
x
y,
^
x
y,
^
x
y,
^
±
±
±
(
)
(
)
[
]
11
-
13
X
GIVEN
Y,
OF
MEAN
THE
FOR
INTERVAL
CONFIDENCE
1
2
2
å
-
-
+
±
×
x
x
x
x
n
ts
y
x
y
^
(
)
(
)
[
]
12
-
13
X
GIVEN
Y,
FOR
INTERVAL
PREDICTION
1
1
2
2
å
-
-
+
+
±
×
x
x
x
x
n
ts
y
x
y
^
(
)
(
)
(
)
(
)
25,600
0
675
1440
Total
144
12
30
84
Keller
Tom
2,704
52
31
44
Welch
Susan
576
24
45
120
Jones
Sani
1,296
36
56
132
Spina
Sal
7,056
84
70
180
Broderick
Ron
144
12
43
84
Niles
Rich
3,600
60
28
36
Snarsky
Ray
256
16
50
80
Kiel
Mike
576
24
39
72
Rumsey
Meryl
400
20
29
76
Reynolds
Mark
4,624
68
61
164
Hall
Jeff
1,024
32
60
128
Fish
Greg
64
8
51
104
Saia
Carol
3,136
56
41
40
Ramirez
Carlos
0
0
41
96
Virost
Brian
-
-
-
-
-
-
-
-
-
-
2
y
Sold
Copiers
x
Calls
Sales
tive
Representa
Sales
x
x
x
x
(
)
(
)
(
)
(
)
(
)
5.6090
33.0032
25,600
96
50
15
1
6.720
2.160
33.0032
1
Interval
Confidence
33.0032
50
0.2608
19.9632
0.2608x
19.9632
2
2
2
±
=
-
+
±
=
-
-
+
±
=
=
+
=
+
=
å
×
x
x
x
x
n
ts
y
y
x
y
^
^
(
)
(
)
(
)
(
)
15.5612
33.0032
25,600
96
50
15
1
1
6.720
2.160
33.0032
1
1
Interval
Prediction
2
2
2
±
=
-
+
+
±
=
-
-
+
+
±
=
å
×
x
x
x
x
n
ts
y
x
y
^
(
)
(
)
1.593
1.25
.8738
-
2.685
x
.8738
-
2.685
y
.8738x
-
2.685
y
^
^
=
=
=
=