Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Correlation and Regression Introduction to Correlation and Regression Ginger Holmes Rowell, Ph. D. Associate Professor of Mathematics.

Similar presentations


Presentation on theme: "Introduction to Correlation and Regression Introduction to Correlation and Regression Ginger Holmes Rowell, Ph. D. Associate Professor of Mathematics."— Presentation transcript:

1

2 Introduction to Correlation and Regression Introduction to Correlation and Regression Ginger Holmes Rowell, Ph. D. Associate Professor of Mathematics Middle Tennessee State University

3 Outline Outline Introduction Introduction Linear Correlation Linear Correlation Regression Regression Simple Linear Regression Simple Linear Regression Using the TI-83 Using the TI-83 Model/Formulas Model/Formulas

4 Outline continued Applications Applications Real-life Applications Real-life Applications Practice Problems Practice Problems Internet Resources Internet Resources Applets Applets Data Sources Data Sources

5 Correlation Correlation Correlation A measure of association between two numerical variables. A measure of association between two numerical variables. Example (positive correlation) Example (positive correlation) Typically, in the summer as the temperature increases people are thirstier. Typically, in the summer as the temperature increases people are thirstier.

6 Specific Example Specific Example For seven random summer days, a person recorded the temperature and their water consumption, during a three-hour period spent outside. For seven random summer days, a person recorded the temperature and their water consumption, during a three-hour period spent outside. Temperature (F) Water Consumption (ounces) 7516 8320 85 25 8527 9232 9748 99 48

7 How would you describe the graph?

8 How “strong” is the linear relationship?

9 Measuring the Relationship Pearson’s Sample Correlation Coefficient, r measures the direction and the strength of the linear association between two numerical paired variables. measures the direction and the strength of the linear association between two numerical paired variables.

10 Direction of Association Positive Correlation Positive CorrelationNegative Correlation

11 Strength of Linear Association r value Interpretation 1 perfect positive linear relationship 0no linear relationship perfect negative linear relationship

12 Strength of Linear Association

13 Other Strengths of Association r value Interpretation 0.9strong association 0.5moderate association 0.25weak association

14 Other Strengths of Association

15 Formula = the sum n = number of paired items x i = input variabley i = output variable x = x-bar = mean of x’s y = y-bar = mean of y’s s x = standard deviation of x’s s y = standard deviation of y’s

16 Regression Regression Regression Specific statistical methods for finding the “line of best fit” for one response (dependent) numerical variable based on one or more explanatory (independent) variables. Specific statistical methods for finding the “line of best fit” for one response (dependent) numerical variable based on one or more explanatory (independent) variables.

17 Curve Fitting vs. Regression Regression Regression Includes using statistical methods to assess the "goodness of fit" of the model. (ex. Correlation Coefficient) Includes using statistical methods to assess the "goodness of fit" of the model. (ex. Correlation Coefficient)

18 Regression: 3 Main Purposes To describe (or model) To describe (or model) To predict ( or estimate) To predict ( or estimate) To control (or administer) To control (or administer)

19 Simple Linear Regression Statistical method for finding Statistical method for finding the “line of best fit” the “line of best fit” for one response (dependent) numerical variable for one response (dependent) numerical variable based on one explanatory (independent) variable. based on one explanatory (independent) variable.

20 Least Squares Regression GOAL - minimize the sum of the square of the errors of the data points. GOAL - minimize the sum of the square of the errors of the data points. This minimizes the Mean Square Error This minimizes the Mean Square Error

21 Example Example Plan an outdoor party. Plan an outdoor party. Estimate number of soft drinks to buy per person, based on how hot the weather is. Estimate number of soft drinks to buy per person, based on how hot the weather is. Use Temperature/Water data and regression. Use Temperature/Water data and regression.

22 Steps to Reaching a Solution Draw a scatterplot of the data. Draw a scatterplot of the data.

23 Steps to Reaching a Solution Draw a scatterplot of the data. Draw a scatterplot of the data. Visually, consider the strength of the linear relationship. Visually, consider the strength of the linear relationship.

24 Steps to Reaching a Solution Draw a scatterplot of the data. Draw a scatterplot of the data. Visually, consider the strength of the linear relationship. Visually, consider the strength of the linear relationship. If the relationship appears relatively strong, find the correlation coefficient as a numerical verification. If the relationship appears relatively strong, find the correlation coefficient as a numerical verification.

25 Steps to Reaching a Solution Draw a scatterplot of the data. Draw a scatterplot of the data. Visually, consider the strength of the linear relationship. Visually, consider the strength of the linear relationship. If the relationship appears relatively strong, find the correlation coefficient as a numerical verification. If the relationship appears relatively strong, find the correlation coefficient as a numerical verification. If the correlation is still relatively strong, then find the simple linear regression line. If the correlation is still relatively strong, then find the simple linear regression line.

26 Our Next Steps Learn to Use the TI-83 for Correlation and Regression. Learn to Use the TI-83 for Correlation and Regression. Interpret the Results (in the Context of the Problem). Interpret the Results (in the Context of the Problem).

27 Finding the Solution: TI-84 Using the TI- 83 graphing calculator Using the TI- 83 graphing calculator Turn on the calculator diagnostics. Turn on the calculator diagnostics. Enter the data. Enter the data. Graph a scatterplot of the data. Graph a scatterplot of the data. Find the equation of the regression line and the correlation coefficient. Find the equation of the regression line and the correlation coefficient. Graph the regression line on a graph with the scatterplot. Graph the regression line on a graph with the scatterplot.

28 Preliminary Step Turn the Diagnostics On. Turn the Diagnostics On. Press 2nd 0 (for Catalog). Press 2nd 0 (for Catalog). Scroll down to DiagnosticOn. The marker points to the right of the words. Scroll down to DiagnosticOn. The marker points to the right of the words. Press ENTER. Press ENTER again. Press ENTER. Press ENTER again. The word Done should appear on the right hand side of the screen. The word Done should appear on the right hand side of the screen.

29 Example Temperature (F) Water Consumption (ounces) 7516 8320 85 25 8527 9232 9748 99 48

30 1. Enter the Data into Lists Press STAT. Press STAT. Under EDIT, select 1: Edit. Under EDIT, select 1: Edit. Enter x-values (input) into L1 Enter x-values (input) into L1 Enter y-values (output) into L2. Enter y-values (output) into L2. After data is entered in the lists, go to 2nd MODE to quit and return to the home screen. After data is entered in the lists, go to 2nd MODE to quit and return to the home screen. Note: If you need to clear out a list, for example list 1, place the cursor on L1 then hit CLEAR and ENTER. Note: If you need to clear out a list, for example list 1, place the cursor on L1 then hit CLEAR and ENTER.

31 2. Set up the Scatterplot. Press 2nd Y= (STAT PLOTS). Press 2nd Y= (STAT PLOTS). Select 1: PLOT 1 and hit ENTER. Select 1: PLOT 1 and hit ENTER. Use the arrow keys to move the cursor down to On and hit ENTER. Use the arrow keys to move the cursor down to On and hit ENTER. Arrow down to Type: and select the first graph under Type. Arrow down to Type: and select the first graph under Type. Under Xlist: Enter L1. Under Xlist: Enter L1. Under Ylist: Enter L2. Under Ylist: Enter L2. Under Mark: select any of these. Under Mark: select any of these.

32 3. View the Scatterplot Press 2nd MODE to quit and return to the home screen. Press 2nd MODE to quit and return to the home screen. To plot the points, press ZOOM and select 9: ZoomStat. To plot the points, press ZOOM and select 9: ZoomStat. The scatterplot will then be graphed. The scatterplot will then be graphed.

33 4. Find the regression line. Press STAT. Press STAT. Press CALC. Press CALC. Select 4: LinReg(ax + b). Select 4: LinReg(ax + b). Press 2nd 1 (for List 1) Press 2nd 1 (for List 1) Press the comma key, Press the comma key, Press 2nd 2 (for List 2) Press 2nd 2 (for List 2) Press ENTER. Press ENTER.

34 5. Interpreting and Visualizing Interpreting the result: Interpreting the result: y = ax + b y = ax + b The value of a is the slope The value of a is the slope The value of b is the y-intercept The value of b is the y-intercept r is the correlation coefficient r is the correlation coefficient r 2 is the coefficient of determination r 2 is the coefficient of determination

35 5. Interpreting and Visualizing Write down the equation of the line in slope intercept form. Write down the equation of the line in slope intercept form. Press Y= and enter the equation under Y1. (Clear all other equations.) Press Y= and enter the equation under Y1. (Clear all other equations.) Press GRAPH and the line will be graphed through the data points. Press GRAPH and the line will be graphed through the data points.

36 Questions ???

37 Interpretation in Context Regression Equation: Regression Equation: y=1.5*x - 96.9 y=1.5*x - 96.9 Water Consumption = 1.5*Temperature - 96.9 1.5*Temperature - 96.9

38 Interpretation in Context Slope = 1.5 (ounces)/(degrees F) Slope = 1.5 (ounces)/(degrees F) for each 1 degree F increase in temperature, you expect an increase of 1.5 ounces of water drank. for each 1 degree F increase in temperature, you expect an increase of 1.5 ounces of water drank.

39 Interpretation in Context y-intercept = -96.9 y-intercept = -96.9 For this example, when the temperature is 0 degrees F, then a person would drink about -97 ounces of water. For this example, when the temperature is 0 degrees F, then a person would drink about -97 ounces of water. That does not make any sense! That does not make any sense! Our model is not applicable for x=0. Our model is not applicable for x=0.

40 Prediction Example Predict the amount of water a person would drink when the temperature is 95 degrees F. Predict the amount of water a person would drink when the temperature is 95 degrees F. Solution: Substitute the value of x=95 (degrees F) into the regression equation and solve for y (water consumption). If x=95, y=1.5*95 - 96.9 = 45.6 ounces. Solution: Substitute the value of x=95 (degrees F) into the regression equation and solve for y (water consumption). If x=95, y=1.5*95 - 96.9 = 45.6 ounces.

41 Strength of the Association: r 2 Coefficient of Determination – r 2 Coefficient of Determination – r 2 General Interpretation: The coefficient of determination tells the percent of the variation in the response variable that is explained (determined) by the model and the explanatory variable. General Interpretation: The coefficient of determination tells the percent of the variation in the response variable that is explained (determined) by the model and the explanatory variable.

42 Interpretation of r 2 Example: r 2 =92.7%. Example: r 2 =92.7%. Interpretation: Interpretation: Almost 93% of the variability in the amount of water consumed is explained by outside temperature using this model. Almost 93% of the variability in the amount of water consumed is explained by outside temperature using this model. Note: Therefore 7% of the variation in the amount of water consumed is not explained by this model using temperature. Note: Therefore 7% of the variation in the amount of water consumed is not explained by this model using temperature.

43 Questions ???

44 Simple Linear Regression Model The model for simple linear regression is There are mathematical assumptions behind the concepts that we are covering today. we are covering today.

45 Formulas Prediction Equation:

46 Real Life Applications Cost Estimating for Future Space Flight Vehicles (Multiple Regression)

47 Nonlinear Application Predicting when Solar Maximum Will Occur http://science.msfc.nasa.gov/ssl/pad/ solar/predict.htm solar/predict.htm

48 Real Life Applications Estimating Seasonal Sales for Department Stores (Periodic) Estimating Seasonal Sales for Department Stores (Periodic)

49 Real Life Applications Predicting Student Grades Based on Time Spent Studying Predicting Student Grades Based on Time Spent Studying

50 Real Life Applications...... What ideas can you think of? What ideas can you think of? What ideas can you think of that your students will relate to? What ideas can you think of that your students will relate to?

51 Practice Problems Measure Height vs. Arm Span Measure Height vs. Arm Span Find line of best fit for height. Find line of best fit for height. Predict height for one student not in data set. Check predictability of model. Predict height for one student not in data set. Check predictability of model.

52 Practice Problems Is there any correlation between shoe size and height? Is there any correlation between shoe size and height? Does gender make a difference in this analysis? Does gender make a difference in this analysis?

53 Practice Problems Can the number of points scored in a basketball game be predicted by Can the number of points scored in a basketball game be predicted by The time a player plays in the game? The time a player plays in the game? By the player’s height? By the player’s height? Idea modified from Steven King, Aiken, SC. NCTM presentation 1997.) Idea modified from Steven King, Aiken, SC. NCTM presentation 1997.)

54 Resources Data Analysis and Statistics. Curriculum and Evaluation Standards for School Mathematics. Addenda Series, Grades 9-12. NCTM. 1992. Data Analysis and Statistics. Curriculum and Evaluation Standards for School Mathematics. Addenda Series, Grades 9-12. NCTM. 1992. Data and Story Library. Internet Website. http://lib.stat.cmu.edu/D ASL/ 2001. Data and Story Library. Internet Website. http://lib.stat.cmu.edu/D ASL/ 2001. http://lib.stat.cmu.edu/D ASL/http://lib.stat.cmu.edu/D ASL/

55 Internet Resources Correlation Correlation Guessing Correlations - An interactive site that allows you to try to match correlation coefficients to scatterplots. University of Illinois, Urbanna Champaign Statistics Program. http://www.stat.uiuc.edu/~stat100/j ava/guess/GCApplet.html Guessing Correlations - An interactive site that allows you to try to match correlation coefficients to scatterplots. University of Illinois, Urbanna Champaign Statistics Program. http://www.stat.uiuc.edu/~stat100/j ava/guess/GCApplet.html http://www.stat.uiuc.edu/~stat100/j ava/guess/GCApplet.html http://www.stat.uiuc.edu/~stat100/j ava/guess/GCApplet.html

56 Internet Resources Regression Regression Effects of adding an Outlier. Effects of adding an Outlier. W. West, University of South Carolina. W. West, University of South Carolina. http://www.stat.sc.edu/~west/ javahtml/Regression.html http://www.stat.sc.edu/~west/ javahtml/Regression.html http://www.stat.sc.edu/~west/ javahtml/Regression.html http://www.stat.sc.edu/~west/ javahtml/Regression.html

57 Internet Resources Regression Regression Estimate the Regression Line. Compare the mean square error from different regression lines. Can you find the minimum mean square error? Rice University Virtual Statistics Lab. http://www.ruf.rice.edu/~lane/stat_si m/reg_by_eye/index.html Estimate the Regression Line. Compare the mean square error from different regression lines. Can you find the minimum mean square error? Rice University Virtual Statistics Lab. http://www.ruf.rice.edu/~lane/stat_si m/reg_by_eye/index.html http://www.ruf.rice.edu/~lane/stat_si m/reg_by_eye/index.html http://www.ruf.rice.edu/~lane/stat_si m/reg_by_eye/index.html

58 Internet Resources: Data Sets Data and Story Library. Data and Story Library. Excellent source for small data sets. Search for specific statistical methods (e.g. boxplots, regression) or for data concerning a specific field of interest (e.g. health, environment, sports). http://lib.stat.cmu.edu/DASL/ Excellent source for small data sets. Search for specific statistical methods (e.g. boxplots, regression) or for data concerning a specific field of interest (e.g. health, environment, sports). http://lib.stat.cmu.edu/DASL/ http://lib.stat.cmu.edu/DASL/

59 Internet Resources: Data Sets FEDSTATS. "The gateway to statistics from over 100 U.S. Federal agencies" http://www.fedstats.gov/ FEDSTATS. "The gateway to statistics from over 100 U.S. Federal agencies" http://www.fedstats.gov/http://www.fedstats.gov/ "Kid's Pages." (not all related to statistics) http://www.fedstats.gov/kids.html "Kid's Pages." (not all related to statistics) http://www.fedstats.gov/kids.html http://www.fedstats.gov/kids.html

60 Internet Resources Other Other Statistics Applets. Using Web Applets to Assist in Statistics Instruction. Robin Lock, St. Lawrence University. http://it.stlawu.edu/~rlock/maa99/ Statistics Applets. Using Web Applets to Assist in Statistics Instruction. Robin Lock, St. Lawrence University. http://it.stlawu.edu/~rlock/maa99/ http://it.stlawu.edu/~rlock/maa99/

61 Internet Resources Other Other Ten Websites Every Statistics Instructor Should Bookmark. Robin Lock, St. Lawrence University. http://it.stlawu.edu/~rlock/10site s.html Ten Websites Every Statistics Instructor Should Bookmark. Robin Lock, St. Lawrence University. http://it.stlawu.edu/~rlock/10site s.html http://it.stlawu.edu/~rlock/10site s.html http://it.stlawu.edu/~rlock/10site s.html

62 For More Information… On-line version of this presentation http://www.mtsu.edu/~stats /corregpres/index.html More information about regression Visit STATS @ MTSU web site http://www.mtsu.edu/~stats


Download ppt "Introduction to Correlation and Regression Introduction to Correlation and Regression Ginger Holmes Rowell, Ph. D. Associate Professor of Mathematics."

Similar presentations


Ads by Google