Lesson 4 - 4 Nonlinear Regression: Transformations.

Slides:



Advertisements
Similar presentations
1.5 Scatter Plots and Least Squares Lines
Advertisements

Write an exponential function
Lesson Diagnostics on the Least- Squares Regression Line.
MAT 105 SPRING 2009 Quadratic Equations
Chapter 3 Bivariate Data
4.7 Write and Apply Exponential & Power Functions
Chapter Four: More on Two- Variable Data 4.1: Transforming to Achieve Linearity 4.2: Relationships between Categorical Variables 4.3: Establishing Causation.
1 Learning Objectives for Section 1.3 Linear Regression After completing this section, you will be able to calculate slope as a rate of change. calculate.
1.5 Scatter Plots and Least-Squares Lines
P.33 #14-19, p. 34 #32-34, Lesson Scatter Plots and Least-Squares Lines.
Adapted from Walch Education A linear equation describes a situation where there is a near- constant rate of change. An exponential equation describes.
Introduction Data surrounds us in the real world. Every day, people are presented with numbers and are expected to make predictions about future events.
Linear Regression.
Transforming to Achieve Linearity
+ Hw: pg 788: 37, 39, 41, Chapter 12: More About Regression Section 12.2b Transforming using Logarithms.
Relationship of two variables
VCE Further Maths Least Square Regression using the calculator.
Lesson Transforming to Achieve Linearity. Knowledge Objectives Explain what is meant by transforming (re- expressing) data. Tell where y = log(x)
Solve Exponential and Logarithmic Inequalities. Vocabulary  An exponential inequality in one variable is an inequality that can be written in the form.
Objective: I can write linear equations that model real world data.
1.Max is a computer salesman. For each day that he works, he receives $50 plus a fixed commission amount per computer. Max is currently earning $122 for.
LOGS EQUAL THE The inverse of an exponential function is a logarithmic function. Logarithmic Function x = log a y read: “x equals log base a of y”
1 6.9 Exponential, Logarithmic & Logistic Models In this section, we will study the following topics: Classifying scatter plots Using the graphing calculator.
Scatter plots and Regression Algebra II. Linear Regression  Linear regression is the relationship between two variables when the equation is linear.
Section 4.2 Least Squares Regression. Finding Linear Equation that Relates x and y values together Based on Two Points (Algebra) 1.Pick two data points.
Transforming Relationships Chapter 4.1: Exponential Growth and Power Law Models Part A: Day 1: Exponential Growth.
Wednesday, May 13, 2015 Report at 11:30 to Prairieview.
Topic 5: Logarithmic Regression
Regression Regression relationship = trend + scatter
Exponential Regression Section Starter The city of Concord was a small town of 10,000 people in Returning war veterans and the G.I.
Relationships If we are doing a study which involves more than one variable, how can we tell if there is a relationship between two (or more) of the.
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.
2-7 Curve Fitting with Linear Models Warm Up Lesson Presentation
Logarithms 1 Converting from Logarithmic Form to Exponential Form and Back 2 Solving Logarithmic Equations & Inequalities 3 Practice Problems.
Lesson Scatter Diagrams and Correlation. Objectives Draw and interpret scatter diagrams Understand the properties of the linear correlation coefficient.
Sec. 2-4: Using Linear Models. Scatter Plots 1.Dependent Variable: The variable whose value DEPENDS on another’s value. (y) 2.Independent Variable: The.
^ y = a + bx Stats Chapter 5 - Least Squares Regression
Wednesday Today you need: Whiteboard, Marker, Eraser Calculator 1 page handout.
Simple Linear Regression The Coefficients of Correlation and Determination Two Quantitative Variables x variable – independent variable or explanatory.
1.5 Linear Models Warm-up Page 41 #53 How are linear models created to represent real-world situations?
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.
Wednesday: Need a graphing calculator today. Need a graphing calculator today.
The Line of Best Fit CHAPTER 2 LESSON 3  Observed Values- Data collected from sources such as experiments or surveys  Predicted (Expected) Values-
1.) Write an equation for the line containing the following: y-intercept of 6 and has a slope of ¼. 2.) Find the x-intercept and y-intercept of 4x + 2y.
15.7 Curve Fitting. With statistical applications, exact relationships may not exist  Often an average relationship is used Regression Analysis: a collection.
LEQ: WHAT IS THE PROCESS USED TO FIT AN APPROPRIATE MODEL TO DATA? Fitting a Model to Data Sec. 2-7 & 2-8.
12.2 TRANSFORMING TO ACHIEVE LINEARITY To use transformations involving powers, roots, and logarithms to find a power or exponential model that describes.
Ch. 8.5 Exponential and Logarithmic Equations
Sections Review.
Lesson 15-7 Curve Fitting Pg 842 #4 – 7, 9 – 12, 14, 17 – 26, 31, 38
Splash Screen.
6.1 - Logarithmic Functions
Bell Ringer Make a scatterplot for the following data.
Writing Exponential and Power Functions
Ch. 12 More about regression
Logarithmic Functions
Warm Up Please sit down and clear your desk. Do not talk. You will have until lunch to finish your quiz.
MATH 2140 Numerical Methods
^ y = a + bx Stats Chapter 5 - Least Squares Regression
5A.1 - Logarithmic Functions
Chapter 12 Review Inference for Regression
6.1 - Logarithmic Functions
Which graph best describes your excitement for …..
Chapters Important Concepts and Terms
Lesson 64 Using logarithms.
Warm Up Solve. 1. log16x = 2. logx8 = 3 3. log10,000 = x
Warm Up  .
15.7 Curve Fitting.
Regression and Correlation of Data
Presentation transcript:

Lesson Nonlinear Regression: Transformations

Objectives Change exponential expressions to logarithmic expressions and logarithmic expressions to exponential expressions Simplify expressions containing logarithms Use logarithmic transformations to linearize exponential relations Use logarithmic transformations to linearize power relations

Vocabulary Response Variable – variable whose value can be explained by the value of the explanatory or predictor variable Predictor Variable – independent variable; explains the response variable variability Lurking Variable – variable that may affect the response variable, but is excluded from the analysis Positively Associated – if predictor variable goes up, then the response variable goes up (or vice versa) Negatively Associated – if predictor variable goes up, then the response variable goes down (or vice versa)

Non-linear Scatter Diagrams Exponential Power Some relationships that are nonlinear can be modeled with exponential or power models  y = a b x (with b > 1)  y = a b x (with b < 1)  y = a x b

Exponential Data ●We would like to fit an exponential model y = a b x ●We would still like to use our least-squares linear regression techniques on this model ●If we take the logarithms of both sides, we get log y = log a + x log b because log(a b x ) = log(a) + log(b x ) = log a + x log b

Exponential to Linear Transform ●We modify this transformed equation log y = log a + x log b ●Define these new variables  Y = log y  A = log a  B = log b  X = x ●Then this equation becomes Y = A + B X

Least Squares on Exponential Model ●We started with an exponential model y = a b x ●We transformed that into a linear model Y = A + B X ●After we solve the linear model, we match up  b = 10 B  a = 10 A ●In this way, we are able to use the method of least-squares to find an exponential model

Harley Davidson Dataset Year (x) Closing Price (y) Year (x) Closing Price (y)

Exponential Example The scatter diagram below appears to be exponential (curved) and not linear A line is not an appropriate model

Fitting an Exponential Model We use Y = log y and X = x  The first observation is x = 1 and y = , thus the first observation of the transformed data is X = 1 and Y = log =  The second observation is x = 2 and y = , thus the second observation of the transformed data is X = 2 and Y = log =  We continue and take logs of all of the y values

Using your Calculator To get the scatter plot we inputted x-values into L1 and the y-values into L2 To change the y-values into logs we go to the top of L3 and hit LOG(L2) ENTER and then use LINREG to find a and b (first part of the slide after next) Or a simpler way yet, use the ExpReg calculation under STAT and CALC and get it directly without having to convert back (last line of the slide after next)

Transformed Line The scatter diagram of the transformed data (Y and X) is more linear We now calculate least-squares regression line for this data

Least Squares to Exponential ●The least squares line is Y = X  B =  A = ●This is transformed back to  b = 10 B = = and  a = 10 A = = , so y = (1.3064) x

Exponential Model We now plot y = (1.306) x, our exponential model, on the original scatter diagram This is a better fit to the data, but we need to be careful if we try to extrapolate

Part Two Power Models

Power Model Data ●We would now like to fit an power model y = a x b ●We would still like to use our least-squares linear regression techniques on this model ●If we take the logarithms of both sides, we get log y = log a + b log x because log(a x b ) = log(a) + log(x b ) = log a + b log x

Power Function to Linear Transform ●We modify this transformed equation log y = log a + x log b ●Define these new variables  Y = log y  A = log a  B = log b  X = x ●Then this equation becomes Y = A + B X

Least Squares on Power Model ●We started with a power model y = a b x ●We transformed that into a linear model Y = A + B X ●After we solve the linear model, we find that  b = B  a = 10 A ●In this way, we are able to use the method of least-squares to find a power model

Harley Davidson Dataset Year (x) Closing Price (y) Year (x) Closing Price (y)

Power Function Example The scatter diagram below appears to be exponential (curved) and not linear A line is not an appropriate model

Fitting a Power Function Model We use Y = log y and X = log x  The first observation is x = 1 and y = , thus the first observation of the transformed data is X = log 1 = 0 and Y = log =  The second observation is x = 2 and y = , thus the second observation of the transformed data is X = log 2 =.3010 and Y = log =  We continue and take logs of all of the x values and all the y values

Using your Calculator To get the scatter plot we inputted x-values into L1 and the y-values into L2 To change the x-values into logs we go to the top of L3 and hit LOG(L1) ENTER and then repeat using L4 and the y-values (L2). Then use LINREG to find a and b (first part of the slide after next) Or a simpler way yet, use the PwrReg calculation under STAT and CALC and get it directly without having to convert back (last line of the slide after next)

Transformed Line The scatter diagram of the transformed data (Y and X) is more linear We now calculate least-squares regression line for this data

Least Squares to Power ●The least squares line is Y = X –  B =  A = – ●This is transformed back to  b = B = and  a = 10 A = , so y = x

Power Model We now plot y = x , our power model, on the original scatter diagram This is a better fit to the data, but we need to be careful if we try to extrapolate

Summary and Homework Summary –Transformations can enable us to construct certain nonlinear models –Exponential models, or y = a b x, can be created using least-squares techniques after taking logarithms of both sides –Power models, or y = a x b, can also be created using least-squares techniques after taking logarithms of both sides Homework