1 / 15

Chapter 4 More About Relationships Between Two Variables

Chapter 4 More About Relationships Between Two Variables. 4.1 Transforming to Achieve Linearity 4.2 Relationship Between Categorical Variables 4.3 Establishing Causation. How do you determine if data is linear?. Look at the graph (is it straight?) Look at the residual plot (is it scattered?)

lydie
Télécharger la présentation

Chapter 4 More About Relationships Between Two Variables

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. Chapter 4More About Relationships Between Two Variables 4.1 Transforming to Achieve Linearity 4.2 Relationship Between Categorical Variables 4.3 Establishing Causation

  2. How do you determine if data is linear? • Look at the graph (is it straight?) • Look at the residual plot (is it scattered?) • Look at the correlation coefficient, r (is it close to -1 or 1?) If the answer to any of these questions is no, then a line is probably not a good fit and a curved function may be more appropriate.

  3. Curved Functions Tested in AP Stats Exponential Regression • (x, log y) is linear • Linear Regression on (x, log y) is • Algebraically solve for Power Regression • (log x, log y) is linear • Linear Regression on (log x, log y) is • Algebraically solve for

  4. What if the data is not linear? • Transform the data to determine whether Exponential or Power Regression is appropriate. • Run a Linear Regression on the transformed data. • Perform an inverse transformation to turn the equation into Exponential or Power.

  5. Transform the Data to Determine if Exponential or Power Regression is Appropriate • Enter data into L1 and L2. • See that it is not linear. (scatterplot is curved, residual is curved) • Transform the data into logarithms. • Enter L3 = log x and L4 = log y. • Look at (x, log y) and (log x, log y) for linearity. • If (x, log y) is linear, use exponential regression. • If (log x, log y) is linear, use power regression.

  6. Run a Linear Regression on the Transformed Data Exponential • Run Linear Regression on (x, log y) 4:LinReg L1,L4 • Write as • Define your variables as they were originally (x = ?, = predicted ?) Power • Run Linear Regression on (log x, log y) 4:LinReg L3,L4 • Write as • Define your variables as they were originally (x = ?, = predicted ?)

  7. Perform an Inverse Transformation to Turn the Equation into Exponential or Power Exponential Example Power Example

  8. Non-Linear Regression in the Calculator • Enter data into L1 and L2. • See that it is not linear. (scatterplot is curved, residual is curved) • Run 0:ExpReg L1, L2, Y1 • Run A:PwrReg L1, L2, Y1 • See which fits the data better • Look at the graph and see which curve follows the data better. • Look at r and r2 to see which line (x, log y) or (log x, log y) fits the data better. • Write out the equation from the calculator (NO LOGS) and define x = ? and = predicted ?

  9. By Hand vs. The Calculatorx = L1, y = L2, log x = L3, log y = L4 LinReg L1, L4 = ExpReg L1, L2 LinReg L3, L4 = PwrReg L1, L2

  10. Categorical Data in Two Way Tables Marginal Distribution: the distribution of only one of the variables. Find the marginal distribution of ice cream flavors.

  11. Categorical Data in Two Way Tables Conditional Distribution: the distribution of one variable given a specific condition of the other variable. Find the conditional distribution of grade level among those who prefer chocolate.

  12. What percent of students like strawberry? • What percent of seniors like vanilla? • What percent of chocolate lovers are juniors? • What percent of students are freshmen? • What percent of students are vanilla loving seniors? • What percent of upper classmen like chocolate?

  13. Simpson’s Paradox Suppose two people, Lisa and Bart, are editors for the St. Louis Post Dispatch. Answer the following questions given the data below: What percentage of articles did Lisa edit in Week 1? _________ Bart? _________ Who edited a higher percentage of articles in Week 1? ______________________ What percentage of articles did Lisa edit in Week 2? _________ Bart? _________ Who edited a higher percentage of articles in Week 2? ______________________ What percentage of articles did Lisa edit Total? _________ Bart? _________ Who edited a higher percentage of articles in Total? ______________________

  14. HOW CAN THIS BE?? In the first week, Lisa improves 60 percent of the articles she edits while Bart improves 90 percent of the articles he edits. In the second week, Lisa improves just 10 percent of the articles she edits, while Bart improves 30 percent. Both times, Bart improved a much higher percentage of articles than Lisa—yet when the two tests are combined, Lisa has improved a much higher percentage than Bart!

  15. Establishing Causation

More Related