Unformatted text preview:

Correlation and Regression 1 Association between Categorical Variables 2 2 Association between Quantitative Variables 3 3 Prediction 8 www apsu edu jonesmatt 1 1 Association between Categorical Variables The response or dependent variable is the outcome variable we expect to be affected by changes in the explanatory or independent variable Two variables are associated if certain values of one variable tend to occur with certain values of the other Examples Example 1 Pesticides p 95 Also contingency tables and conditional proportions www apsu edu jonesmatt 2 2 Association between Quantitative Variables Scatterplots display relationships between two quantitative variables The explanatory or independent variable is plotted on the horizontal axis The response or dependent variable is plotted on the vertical axis www apsu edu jonesmatt 3 Two variables are positively associated if above average observations of both variables occur together Two variables are negatively associated if above average observations of one variable occur with below average observations of the other and vice versa www apsu edu jonesmatt 4 Example 2 First Exam Grade vs Final Exam Grade Third Exam Grade 68 93 82 84 71 48 75 88 Final Exam Grade 63 95 89 75 85 31 91 92 Example 3 Age and Price of Corvettes Age years 6 6 6 2 2 5 4 5 1 4 Price 100 275 265 280 410 369 300 335 318 415 309 Example 4 Find variable pairs that are positively associated negatively associate and seemingly unassociated for the student data www apsu edu jonesmatt 5 Correlation Coefficient r The correlation coefficient r measures the direction and strength of the linear association between two quantitative variables r 1 X n 1 i 1 X n 1 xi x sx yi y sy zxi zyi i The correlation coefficient is always between 1 and 1 1 r 1 The sign of r indicates positive or negative correlation The magnitude of r indicates the strength of the correlation Calculating r by hand is tedious so we usually use technology www apsu edu jonesmatt 6 Example 5 Guess the r values for the scatterplots on slide 4 Example 6 Below are retail regular unleaded gasoline prices and daily high temperatures for four days By hand make a scatterplot and calculate r using the lists in your calculator Price 2 81 2 97 3 05 2 88 High Temp F 78 88 92 85 www apsu edu jonesmatt 7 3 Prediction Review of Linear Equations Linear equations in one variable have the form y b1 x b0 x is the independent or explanatory variable y is the dependent or response variable b0 is the y intercept where the line intersects the y axis b1 is the slope the change in the dependent variable divided by the change in the independent variable www apsu edu jonesmatt 8 Example 7 Graph the following equations y 2x 3 3 y 1 2x 1 2 y x 2 y 3x y 4 www apsu edu jonesmatt x 5 9 Regression Lines A regression line is the line that best fits a data set and helps approximate relationships between variables The y values on the regression line that correspond to the x values from the data set are denoted y i The error or residual associated with the data point xi yi is the quantity yi y i www apsu edu jonesmatt 10 The least squares regression line is the line that minimizes the sum of P squared errors i yi y i 2 Its equation is y b1 x b0 where sy and b0 y b1 x sx These calculations are tedious so we usually use technology b1 r Good least squares regression lines are used to predict outcomes of one quantitative variable based on observations of another A prediction of y using an x value outside the range of x value observations may not be reasonable and is called extrapolation Note that changing x by one standard deviation results in changing y by r standard deviations y always passes through the point x y www apsu edu jonesmatt 11 Example 8 The following data are observations of classroom temperatures and mean test scores for five sections of MATH 1530 Temp 69 1 72 3 73 9 74 8 76 6 Score 82 78 76 74 71 Find the least squares regression line with your calculator and Minitab Could you use the regression line to predict the mean test score when the temperature is 70o F 72 5o F www apsu edu jonesmatt 12 Outliers and Influential Observations An outlier is a data point that lies far from the regression line relative to the other points An influential observation is a data point whose removal from the set will considerably change the regression line Example 9 The following are ages in years and prices in 100 of twelve Corvettes Age 6 6 2 2 5 4 6 4 1 5 2 2 Price 275 260 402 366 290 332 265 335 406 362 385 392 Find the least squares regression line equation r and identify any outliers and influential observations Example 10 2000 Presidential Election www apsu edu jonesmatt 13 Coefficient of Determination r2 The coefficient of determination r2 is defined to be the proportion of variation in the observed values of the response variable explained by the regression line P 2 y y variance of predicted values y i 2 i P r 2 y variance of observed values y y i i It turns out that the coefficient of determination is equal to the square of the correlation coefficient This is the reason for using the notation r2 Example 11 Calculate r2 for Example 9 www apsu edu jonesmatt 14 Cautions in Analyzing Associations Using a regression model to predict values of the response variable based on observations of the explanatory variable that are outside the region of observed values is called extrapolation Outliers are data points far from the regression line Influential observations are data points whose removal would cause a dramatic change in the regression line Example Association does not imply causation Lurking variables influence the association between the variables of main interest Example Ice Cream Causes Drowning Confounding www apsu edu jonesmatt 15


View Full Document

APSU MATH 1530 - Correlation and Regression

Loading Unlocking...
Login

Join to view Correlation and Regression and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Correlation and Regression and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?