Ch. 12 More about regression

Slides:



Advertisements
Similar presentations
Section 10-3 Regression.
Advertisements

4.1: Linearizing Data.
Chapter 4 More About Relationships Between Two Variables 4.1 Transforming to Achieve Linearity 4.2 Relationship Between Categorical Variables 4.3 Establishing.
1-4 curve fitting with linear functions
Chapter Four: More on Two- Variable Data 4.1: Transforming to Achieve Linearity 4.2: Relationships between Categorical Variables 4.3: Establishing Causation.
Lesson Quiz: Part I 1. Change 6 4 = 1296 to logarithmic form. log = 4 2. Change log 27 9 = to exponential form = log 100,000 4.
Lesson Nonlinear Regression: Transformations.
CH. 8.6 Natural Logarithms. Write 2 ln 12 – ln 9 as a single natural logarithm. 2 ln 12 – ln 9 = ln 12 2 – ln 9Power Property = lnQuotient Property 12.
+ Hw: pg 788: 37, 39, 41, Chapter 12: More About Regression Section 12.2b Transforming using Logarithms.
Transformations to Achieve Linearity
Residuals and Residual Plots Most likely a linear regression will not fit the data perfectly. The residual (e) for each data point is the ________________________.
Transforming to achieve linearity
Chapter 4: More on Two-Variable (Bivariate) Data.
Correlation with a Non - Linear Emphasis Day 2.  Correlation measures the strength of the linear association between 2 quantitative variables.  Before.
Objective: I can write linear equations that model real world data.
Transforming Relationships
Warm up 8/26 Write the equation of the transformation you see Potatoes cost a chef $18 a box, and carrots cost $12 a box. The chef want to spend.
Correlation & Regression – Non Linear Emphasis Section 3.3.
Exponential Regression Section Starter The city of Concord was a small town of 10,000 people in Returning war veterans and the G.I.
“Numbers are like people… torture them long enough and they’ll tell you anything...” Linear transformation.
Nonlinear Regression Problem 4.14 Heart Weights of Mammals.
Transforming Data.  P ,4  P ,7,9  Make a scatterplot of data  Note non-linear form  Think of a “common-sense” relationship.
Transformations.  Although linear regression might produce a ‘good’ fit (high r value) to a set of data, the data set may still be non-linear. To remove.
CHAPTER curve fitting with linear functions.
5.4 Line of Best Fit Given the following scatter plots, draw in your line of best fit and classify the type of relationship: Strong Positive Linear Strong.
2.5 Using Linear Models A scatter plot is a graph that relates two sets of data by plotting the data as ordered pairs. You can use a scatter plot to determine.
 Chapter 3! 1. UNIT 7 VOCABULARY – CHAPTERS 3 & 14 2.
AP Statistics HW: p. 165 #42, 44, 45 Obj: to understand the meaning of r 2 and to use residual plots Do Now: On your calculator select: 2 ND ; 0; DIAGNOSTIC.
Warm-up O Turn in HW – Ch 8 Worksheet O Complete the warm-up that you picked up by the door. (you have 10 minutes)
AP Statistics Section 4.1 A Transforming to Achieve Linearity.
Exponential Functions. When do we use them? Exponential functions are best used for population, interest, growth/decay and other changes that involve.
Fall Looking Back In Chapters 7 & 8, we worked with LINEAR REGRESSION We learned how to: Create a scatterplot Describe a scatterplot Determine the.
1.5 Linear Models Warm-up Page 41 #53 How are linear models created to represent real-world situations?
4.1 Warm Up Describe a monotonic function. Enter the given data in L1 and L2 Create a scatter plot for the data. Determine if a linear model is a good.
Welcome to Algebra 2! Get out your homework Get out catalogs Get out writing utensils Put bags on the floor Be quiet!!! 3/2/ : Curve Fitting with.
Chapters 8 Linear Regression. Correlation and Regression Correlation = linear relationship between two variables. Summarize relationship with line. Called.
Chapter 10 Notes AP Statistics. Re-expressing Data We cannot use a linear model unless the relationship between the two variables is linear. If the relationship.
A little VOCAB.  Causation is the "causal relationship between conduct and result". That is to say that causation provides a means of connecting conduct.
Scatter Plots & Lines of Best Fit To graph and interpret pts on a scatter plot To draw & write equations of best fit lines.
1.6 Modeling Real-World Data with Linear Functions Objectives Draw and analyze scatter plots. Write a predication equation and draw best-fit lines. Use.
Chapter 4 More on Two-Variable Data. Four Corners Play a game of four corners, selecting the corner each time by rolling a die Collect the data in a table.
12.2 TRANSFORMING TO ACHIEVE LINEARITY To use transformations involving powers, roots, and logarithms to find a power or exponential model that describes.
Thursday, May 12, 2016 Report at 11:30 to Prairieview
7.7A Write Exponential Functions
Unit 4 LSRL.
Sections Review.
Transforming to Achieve Linearity (C10 BVD)
distance prediction observed y value predicted value zero
Transforming Relationships
Is this data truly linear?
A little VOCAB.
Section 3.2: Least Squares Regression
Chapter 5 LSRL.
Bell Ringer Make a scatterplot for the following data.
Suppose the maximum number of hours of study among students in your sample is 6. If you used the equation to predict the test score of a student who studied.
Day 13 Agenda: DG minutes.
Investigating Relationships
2-7 Curve Fitting with Linear Models Holt Algebra 2.
Scatter Plots and Best-Fit Lines
Advanced Placement Statistics Section 4
Transforming Relationships
Chapter 5 LSRL.
Transformations to Achieve Linearity
Section 4.1 Exponential Modeling
Ch 4 : More on Two-Variable Data
Day 68 Agenda: 30 minute workday on Hypothesis Test --- you have 9 worksheets to use as practice Begin Ch 15 (last topic)
Section 3.2: Least Squares Regressions
Homework: pg. 266 #3 A. The relationship is strong, negative, and slightly curved. B. Yes. The scatterplot for the transformed data shows a clear linear.
Homework: pg. 276 #5, 6 5.) A. The relationship is strong, negative, and curved. The ratios are all Since the ratios are all the same, the exponential.
Chapters Important Concepts and Terms
Presentation transcript:

Ch. 12 More about regression Ch. 12-2 Transforming to Achieve Linearity Ch. 12 More about regression

L1 → Length L2 → Weight LinReg for L1 and L2 𝑤𝑒𝑖𝑔ℎ𝑡 =−299.04+25.2(𝐿𝑒𝑛𝑔𝑡ℎ) 𝑤𝑒𝑖𝑔ℎ𝑡 =−299.04+25.2 24 =305.82 grams Look at the data, is this a good prediction? No

Resid (Obs − Exp): L4 → L2 − L3 Pred: L3 → −299.04+25.2(L1) Res Resid (Obs − Exp): L4 → L2 − L3 Resid Plot: stat plot → L1 vs L4 Length curved not linear transform powers roots logarithms Weight is related to volume. weight = a ⋅ (length)3 Volume is usually proportional to (length)3.

L3 → L1 3 stat plot → L3 vs L2 𝑤𝑒𝑖𝑔ℎ𝑡 =4.07+.0147 𝑙𝑒𝑛𝑔𝑡ℎ 3 Weight stat plot → L3 vs L2 (Length)3 𝑤𝑒𝑖𝑔ℎ𝑡 =4.07+.0147 𝑙𝑒𝑛𝑔𝑡ℎ 3 LinReg for L3 and L2

Much better prediction 𝑤𝑒𝑖𝑔ℎ𝑡 =4.07+.0147 24 3 =207.3 grams 𝑤𝑒𝑖𝑔ℎ𝑡 =4.07+.0147 24 3 =207.3 grams 𝑟=.997 What does this mean? correlation coefficient Strong positive relationship for predicted weight and (length)3. Pred: L4 → 4.07+.0147(L3) Res Resid (Obs − Exp): L5 → L2 − L4 (Length)3 Resid Plot: stat plot → L3 vs L5 Random scatter = good!

Now use LinRegTTest to check each value 𝑤𝑒𝑖𝑔ℎ𝑡 =4.07+.0147 𝐿𝑒𝑛𝑔𝑡ℎ 3 use (length)3 list 𝑏−𝛽 S E 𝑏 = .0147−0 .00024 𝑠 𝑠 𝑥 𝑛−1 𝑠 𝑥 =17983.9 4.07 .563 always two-sided .0147 .00024 61.07 18.84 99.52% 𝑡cdf .59, 9999, 18 ×2 𝑟𝑒𝑠𝑖 𝑑 2 𝑛−2 𝑟 2 𝑡cdf(61.07, 9999, 18)×2 Now use LinRegTTest to check each value

Same for ln (natural log) Linear function. Already in linear form. Logarithmic function. Already in linear form. Exponential function. Power function. log 𝑦 = log (𝑎 𝑏 𝑥 ) log 𝑦 = log (𝑎 𝑥 𝑏 ) log 𝑦 = log 𝑎 + log 𝑏 𝑥 log 𝑦 = log 𝑎 + log 𝑥 𝑏 log 𝑦 = log 𝑎 + 𝑥log 𝑏 log 𝑦 = log 𝑎 + 𝑏log 𝑥 linear form linear form

Use your calculator and do LinReg for log 𝑥 and log 𝑦 lists length weight log(L1) log(L2) 𝑥 𝑦 log⁡(𝑥) log⁡(𝑦) no no no yes! power 𝑦=𝑎 𝑥 𝑏 log 𝑤𝑒𝑖𝑔ℎ𝑡 =−1.899+3.05 log 𝑙𝑒𝑛𝑔𝑡ℎ Use your calculator and do LinReg for log 𝑥 and log 𝑦 lists Yes! Random scatter means there’s a linear relationship. Pred: L5 → −1.899+3.04(L3) Res Resid (Obs − Exp): L6 → L4 − L5 log(length) Resid Plot: stat plot → L3 vs L6

log 𝑤𝑒𝑖𝑔ℎ𝑡 =−1.899+3.04 log 𝑙𝑒𝑛𝑔𝑡ℎ 𝑤𝑒𝑖𝑔ℎ𝑡 =0.0126⋅ 𝑙𝑒𝑛𝑔𝑡ℎ 3.04 𝑦=𝑎 𝑥 𝑏 weight LSRL On your calculator, put this equation into Y1 and graph it with the original scatterplot (𝑥 vs 𝑦). length On the AP Exam, you don’t need to know the algebraic properties of logs. However, you should know how to use calculations to transform data using logs and how to make predictions using the LSRL.

𝑦 =𝑎+𝑏𝑥 𝑦 =2.3+4.1𝑥 𝑥 vs 𝑦 𝑦 =𝑎+𝑏𝑙𝑜𝑔 𝑥 𝑦 =2.3+4.1𝑙𝑜𝑔 𝑥 log(𝑥) vs 𝑦 ln⁡(𝑥) 𝑦 =𝑎+𝑏𝑙𝑜𝑔 𝑥 𝑦 =2.3+4.1𝑙𝑜𝑔 𝑥 log(𝑥) vs 𝑦 ln⁡(𝑦) 𝑦 =𝑎 𝑏 𝑥 𝑦 =2.3 4.1 𝑥 𝑥 vs log 𝑦 ln⁡(𝑥) ln⁡(𝑦) 𝑦 =𝑎 𝑥 𝑏 𝑦 =2.3 𝑥 4.1 log 𝑥 vs log 𝑦

However, this is the incorrect line of best fit. L1 → X L2 → Y Nope! Looks exponential 𝑡𝑟𝑎𝑛𝑠 =−437897523.2+39306478.98(𝑦𝑒𝑎𝑟𝑠) 𝑟=0.669 However, this is the incorrect line of best fit. We need to transform the data.

Since we plot 𝑥 vs ln⁡(𝑦), we use the form ln 𝑦 =𝑎+𝑏𝑥. Yes! ln(transistors) years since 1970 LinReg for L1 and LNY Since we plot 𝑥 vs ln⁡(𝑦), we use the form ln 𝑦 =𝑎+𝑏𝑥. ln⁡( 𝑡𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟𝑠 )=7.065+0.366(𝑦𝑒𝑎𝑟𝑠 𝑠𝑖𝑛𝑐𝑒 1970) 𝑟=0.994 much better!

ln⁡( 𝑡𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟𝑠 )=7.065+0.366(𝑦𝑒𝑎𝑟𝑠 𝑠𝑖𝑛𝑐𝑒 1970) 2045−1970=75 ln⁡( 𝑡𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟𝑠 )=34.515 𝑒 ln⁡( 𝑡𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟𝑠 ) = 𝑒 34.515 𝑡𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟𝑠 =9.77× 10 14 977 trillion What do we need to be careful about? Extrapolation!

Residual Plot (𝒙 vs resid): stat plot → L1 vs L4 𝑡= 𝑏−𝛽 S E 𝑏 Constant 7.065 # yrs since 1970 0.366 34.91 5.14× 10 −15 0.544 98.86% 𝑡cdf(34.91, 9999, 14)×2 𝑟𝑒𝑠𝑖 𝑑 2 𝑛−2 𝑟 2 Predicted values: L3 →7.065+0.366(L1) Res Residuals (Obs − Exp): years since 1970 L4 → LNY − L3 Residual Plot (𝒙 vs resid): stat plot → L1 vs L4

Make a list called LOGY → log(L1) Yes! Make a list called LOGY → log(L1) Plot L1 vs LOGY log⁡⁡( 𝑡𝑟𝑎𝑛𝑠 )=3.068+0.159(𝑦𝑒𝑎𝑟𝑠) LinReg → L1 and LOGY log⁡⁡( 𝑡𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟𝑠 )=3.068+0.159(𝑦𝑒𝑎𝑟𝑠 𝑠𝑖𝑛𝑐𝑒 1970) log⁡⁡( 𝑡𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟𝑠 )=3.068+0.159(75) log⁡⁡( 𝑡𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟𝑠 )=14.993 10 log 𝑡𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟𝑠 = 10 14.993 𝑡𝑟𝑎𝑛𝑠𝑖𝑠𝑡𝑜𝑟𝑠 =9.84× 10 14 984 trillion Very close to the prediction when using natural log