Presentation on theme: "Chapter 4 Describing the Relation Between Two Variables 4.3 Diagnostics on the Least-squares Regression Line."— Presentation transcript:
Chapter 4 Describing the Relation Between Two Variables 4.3 Diagnostics on the Least-squares Regression Line
The coefficient of determination, R 2, measures the percentage of total variation in the response variable that is explained by least-squares regression line. The coefficient of determination is a number between 0 and 1, inclusive. That is, 0 < R 2 < 1. If R 2 = 0 the line has no explanatory value If R 2 = 1 means the line variable explains 100% of the variation in the response variable.
The following data are based on a study for drilling rock. The researchers wanted to determine whether the time it takes to dry drill a distance of 5 feet in rock increases with the depth at which the drilling begins. So, depth at which drilling begins is the predictor variable, x, and time (in minutes) to drill five feet is the response variable, y. Source: Penner, R., and Watts, D.G. Mining Information. The American Statistician, Vol. 45, No. 1, Feb. 1991, p. 6.
Regression Analysis The regression equation is Time = 5.53 + 0.0116 Depth Sample Statistics Mean Standard Deviation Depth126.252.2 Time6.990.781 Correlation Between Depth and Time: 0.773
Suppose we were asked to predict the time to drill an additional 5 feet, but we did not know the current depth of the drill. What would be our best guess?
ANSWER: The mean time to drill an additional 5 feet: 6.99 minutes.
Now suppose that we are asked to predict the time to drill an additional 5 feet if the current depth of the drill is 160 feet?
ANSWER: Our guess increased from 6.99 minutes to 7.39 minutes based on the knowledge that drill depth is positively associated with drill time.
The difference between the predicted drill time of 6.99 minutes and the predicted drill time of 7.39 minutes is due to the depth of the drill. In other words, the difference in our guess is explained by the depth of the drill. The difference between the predicted value of 7.39 minutes and the observed drill time of 7.92 minutes is explained by factors other than drill time.
To determine R 2 for the linear regression model simply square the value of the linear correlation coefficient.
EXAMPLE Determining the Coefficient of Determination Find and interpret the coefficient of determination for the drilling data.
EXAMPLE Determining the Coefficient of Determination Find and interpret the coefficient of determination for the drilling data. Because the linear correlation coefficient, r, is 0.773, we have that R 2 = 0.773 2 = 0.5975 = 59.75%. So, 59.75% of the variability in drilling time is explained by the least-squares regression line.
Draw a scatter diagram for each of these data sets. For each data set, the variance of y is 17.49.
Data Set A, R 2 = 100% Data Set B, R 2 = 94.7% Data Set C, R 2 = 9.4%
Residuals play an important role in determining the adequacy of the linear model. In fact, residuals can be used for the following purposes: To determine whether a linear model is appropriate to describe the relation between the predictor and response variables. To determine whether the variance of the residuals is constant. To check for outliers.
If a plot of the residuals against the predictor variable shows a discernable pattern, such as curved, then the response and predictor variable may not be linearly related.
A chemist as a 1000-gram sample of a radioactive material. She records the amount of radioactive material remaining in the sample every day for a week and obtains the following data. DayWeight (in grams) 01000.0 1897.1 2802.5 3719.8 4651.1 5583.4 6521.7 7468.3
If a plot of the residuals against the predictor variable shows the spread of the residuals increasing or decreasing as the predictor increases, then a strict requirement of the linear model is violated. This requirement is called constant error variance. The statistical term for constant error variance is homoscedasticity
As with outliers, influential observations should be removed only if there is justification to do so. When an influential observation occurs in a data set and its removal is not warranted, there are two courses of action: (1) Collect more data so that additional points near the influential observation are obtained, or (2) Use techniques that reduce the influence of the influential observation (such as a transformation or different method of estimation - e.g. minimize absolute deviations).
Chapter Four Describing the Relation Between Two Variables Section 4.4 Nonlinear Regression: Transformations
EXAMPLE Using the Definition of a Logarithm Rewrite the logarithmic expressions to an equivalent expression involving an exponent. Rewrite the exponential expressions to an equivalent logarithmic expression. (a) log 3 15 = a(b) 4 5 = z
In the following properties, M, N, and a are positive real numbers, with a 1, and r is any real number. log a (MN) = log a M + log a N log a M r = r log a M
EXAMPLESimplifying Logarithms Write the following logarithms as the sum of logarithms. Express exponents as factors. (a) log 2 x 4 (b) log 5 (a 4 b)
If a = 10 in the expression y = log a x, the resulting logarithm, y = log 10 x is called the common logarithm. It is common practice to omit the base, a, when it is equal to 10 and write the common logarithm as y = log x
EXAMPLEEvaluating Exponential and Logarithmic Expressions Evaluate the following expressions. Round your answers to three decimal places. (a) log 23(b) 10 2.6
y = ab x Exponential Model log y = log (ab x )Take the common logarithm of both sides log y = log a + log b x log y = log a + x log b Y = A + B x where b = 10 B a = 10 A
EXAMPLE 4Finding the Curve of Best Fit to an Exponential Model A chemist as a 1000- gram sample of a radioactive material. She records the amount of radioactive material remaining in the sample every day for a week and obtains the following data. DayWeight (in grams) 01000.0 1897.1 2802.5 3719.8 4651.1 5583.4 6521.7 7468.3
(a) Draw a scatter diagram of the data treating the day, x, as the predictor variable. (b) Determine Y = log y and draw a scatter diagram treating the day, x, as the predictor variable and Y = log y as the response variable. Comment on the shape of the scatter diagram. (c) Find the least-squares regression line of the transformed data. (d) Determine the exponential equation of best fit and graph it on the scatter diagram obtained in part (a). (e) Use the exponential equation of best fit to predict the amount of radioactive material is left after 8 days.
y = ax b Power Model log y = log (ax b )Take the common logarithm of both sides log y = log a + log x b log y = log a + b log x Y = A + b Xwherea = 10 A
EXAMPLE Finding the Curve of Best Fit to a Power Model Cathy wishes to measure the relation between a light bulbs intensity and the distance from some light source. She measures a 40-watt light bulbs intensity 1 meter from the bulb and at 0.1- meter intervals up to 2 meters from the bulb and obtains the following data. DistanceIntensity 1.00.0972 1.10.0804 1.20.0674 1.30.0572 1.40.0495 1.50.0433 1.60.0384 1.70.0339 1.80.0294 1.90.0268 2.00.0224
(a) Draw a scatter diagram of the data treating the distance, x, as the predictor variable. (b) Determine X = log x and Y = log y and draw a scatter diagram treating the day, X = log x, as the predictor variable and Y = log y as the response variable. Comment on the shape of the scatter diagram. (c) Find the least-squares regression line of the transformed data. (d) Determine the power equation of best fit and graph it on the scatter diagram obtained in part (a). (e) Use the power equation of best fit to predict the intensity of the light if you stand 2.3 meters away from the bulb.
Modeling is not only a science but also an art form. Selecting an appropriate model requires experience and skill in the field in which you are modeling. For example, knowledge of economics is imperative when trying to determine a model to predict unemployment. The main reason for this is that there are theories in the field that can help the modeler to select appropriate relations and variables.