1 / 35

ASSOCIATION: CONTINGENCY, CORRELATION, AND REGRESSION

ASSOCIATION: CONTINGENCY, CORRELATION, AND REGRESSION. Chapter 3. 3.1 The Association between Two Categorical Variables. Response and Explanatory Variables. Response variable (dependent, y) outcome variable Explanatory variable (independent, x) defines groups Response/Explanatory

Download Presentation

ASSOCIATION: CONTINGENCY, CORRELATION, AND REGRESSION

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ASSOCIATION: CONTINGENCY, CORRELATION, AND REGRESSION Chapter 3

  2. 3.1 The Association between Two Categorical Variables

  3. Response and Explanatory Variables • Response variable(dependent, y) outcome variable • Explanatory variable(independent, x) defines groups • Response/Explanatory • Grade on test/Amount of study time • Yield of corn/Amount of rainfall

  4. Association Association – When a value for one variable is more likely with certain values of the other variable Data analysis with two variables • Tell whether there is an association and • Describe that association

  5. Contingency Table • Displays two categorical variables • The rows list the categories of one variable; the columns list the other • Entries in the table are frequencies www1.pictures.fp.zimbio.com

  6. Contingency Table • What is the response (outcome) variable? Explanatory? • What proportion of organic foods contain pesticides?Conventionally grown? • What proportion of all sampled foods contain pesticides?

  7. Proportions & Conditional Proportions

  8. Proportions & Conditional Proportions Side by side bar charts show conditional proportions and allow for easy comparison www.vitalchoice.com

  9. Proportions & Conditional Proportions If no association, then proportions would be the same Since there isassociation, then proportions are different

  10. 3.2 The Association between Two Quantitative Variables

  11. Internet Usage & GDP Data Set www.knitwareblog.com

  12. Scatterplot Graph of two quantitative variables: • Horizontal Axis: Explanatory, x • Vertical Axis: Response, y

  13. Interpreting Scatterplots • The overall pattern includes trend, direction, and strength of the relationship • Trend: linear, curved, clusters, no pattern • Direction: positive, negative, no direction • Strength: how closely the points fit the trend • Also look for outliers from the overall trend

  14. Used-car Dealership What association would we expect between the age of the car and mileage? • Positive • Negative • No association

  15. Linear Correlation, r Measures the strength and direction of the linear association between x and y

  16. Correlation coefficient: Measuring Strength & Direction of a Linear Relationship • Positive r => positive association • Negative r => negative association • r close to +1 or -1 indicates strong linear association • r close to 0 indicates weak association

  17. 3.3 Can We Predict the Outcome of a Variable?

  18. Regression Line • Predicts y, given x: • The y-intercept and slope are a and b • Only an estimate – actual data vary • Describes relationship between x and estimated meansof y farm4.static.flickr.com

  19. Residuals www.chem.utoronto.ca • Prediction errors: vertical distance between data point and regression line • Large residual indicates unusual observation • Each residual is: • Sum of residuals is always zero • Goal: Minimize distance from data to regression line

  20. Least Squares Method • Residual sum of squares: • Least squares regression line minimizes vertical distance between points and their predictions msenux.redwoods.edu

  21. Regression Analysis Identify response and explanatory variables • Response variable is y • Explanatory variable is x

  22. Anthropologists Predict Height Using Remains? • Regression Equation: • is predicted height and x is the length of a femur, thighbone (cm) Predict height for femur length of 50 cm www.geektoysgamesandgadgets.com Bones

  23. Interpreting the y-Intercept and slope • y-intercept: y-value when x = 0 • Helps plot line • Slope: change in y for 1 unit increase in x • 1 cm increase in femur length means 2.4 cm increase in predicted height

  24. Slope Values: Positive, Negative, Zero

  25. Slope and Correlation • Correlation, r: • Describes strength • No units • Same if x and y are swapped • Slope, b: • Doesn’t tell strength • Has units • Inverts if x and y are swapped

  26. Squared Correlation, r2 • Proportional reduction in error, r2 • Variation in y-values explained by relationship of y to x • A correlation, r, of .9 means • 81% of variation in y is explained by x

  27. 3.4 What Are Some Cautions in Analyzing Associations?

  28. Extrapolation • Extrapolation: Predicting y for x-values outside range of data • Riskier the farther from the range of x • No guarantee trend holds Neil Weiss, Elementary Statistics, 7th Edition

  29. Outliers and Influential Points • Regression outlier lies far away from rest of data • Influential if both: • Low or high, compared to rest of data • Regression outlier www2.selu.edu

  30. Correlation Does Not Imply Causation Strong correlation between x and y means • Strong linear association between the variables • Does not mean x causes y Ex. 95.6% of cancer patients have eaten pickles, so do pickles cause cancer?

  31. Lurking Variables & Confounding • Ice cream sales & drowning => temperature • Reading level & shoe size => age • Confounding – two explanatory variables both associated with response variable and each other • Lurking variables – not measured in study but may confound

  32. Simpson’s Paradox Example Simpson’s Paradox: • Association between two variables reverses after third is included Probability of Death of Smoker = 139/582 = 24% Probability of Death of Nonsmoker = 230/732 = 31%

  33. Simpson’s Paradox Example Break out Data by Age

  34. Simpson’s Paradox Example Associations look quite different after adjusting for third variable

More Related