Chapter 4: More on Two-Variable (Bivariate) Data.

Slides:



Advertisements
Similar presentations
Copyright © 2010 Pearson Education, Inc. Slide A least squares regression line was fitted to the weights (in pounds) versus age (in months) of a.
Advertisements

Chapter 12: More About Regression
4.1: Linearizing Data.
Copyright © 2011 Pearson Education, Inc. Curved Patterns Chapter 20.
Copyright © 2014, 2011 Pearson Education, Inc. 1 Chapter 20 Curved Patterns.
Chapter 10: Re-Expressing Data: Get it Straight
Chapter 10 Re-Expressing data: Get it Straight
Chapter Four: More on Two- Variable Data 4.1: Transforming to Achieve Linearity 4.2: Relationships between Categorical Variables 4.3: Establishing Causation.
AP Statistics Chapters 3 & 4 Measuring Relationships Between 2 Variables.
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.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 10 Re-expressing Data: Get it Straight!
Chapter 10 Re-expressing the data
Re-expressing the Data: Get It Straight!
S ECTION 4.1 – T RANSFORMING R ELATIONSHIPS Linear regression using the LSRL is not the only model for describing data. Some data are not best described.
+ Hw: pg 764: 21 – 26; pg 786: 33, 35 Chapter 12: More About Regression Section 12.2a Transforming to Achieve Linearity.
Lectures 4a,4b: Exponential & Logarithmic Functions 1.(4.1) Exponential & Logarithmic Functions in Biology 2.(4.2) Exponential & Logarithmic Functions:
Transforming to Achieve Linearity
+ Hw: pg 788: 37, 39, 41, Chapter 12: More About Regression Section 12.2b Transforming using Logarithms.
More about Relationships Between Two Variables
Transforming to achieve linearity
Transforming Relationships
+ Chapter 12 Section 2 Transforming to Achieve Linearity.
Bivariate Data When two variables are measured on a single experimental unit, the resulting data are called bivariate data. You can describe each variable.
Chapter 10: Re-Expressing Data: Get it Straight AP Statistics.
M25- Growth & Transformations 1  Department of ISM, University of Alabama, Lesson Objectives: Recognize exponential growth or decay. Use log(Y.
Chapter 4 More on Two-Variable Data YMS 4.1 Transforming Relationships.
Chapter 10 Re-expressing the data
Fitting Curves to Data 1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 5: Fitting Curves to Data Terry Dielman Applied Regression.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Chapter 10 Re-expressing Data: Get It Straight!. Slide Straight to the Point We cannot use a linear model unless the relationship between the two.
4.1 Transforming Relationships. Transforming (reexpressing) -Applying a function such as the logarithmic or square root to a quantitative variable -Because.
Lecture 6 Re-expressing Data: It’s Easier Than You Think.
Copyright © 2010 Pearson Education, Inc. Slide A least squares regression line was fitted to the weights (in pounds) versus age (in months) of a.
AP Statistics Section 4.1 A Transforming to Achieve Linearity.
Section 4.1 Transforming Relationships AP Statistics.
If the scatter is curved, we can straighten it Then use a linear model Types of transformations for x, y, or both: 1.Square 2.Square root 3.Log 4.Negative.
Chapter 5 Lesson 5.4 Summarizing Bivariate Data 5.4: Nonlinear Relationships and Transformations.
Copyright © 2010 Pearson Education, Inc. Chapter 10 Re-expressing Data: Get it Straight!
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 10 Re-expressing Data: Get it Straight!
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.
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.
Statistics 10 Re-Expressing Data Get it Straight.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 10 Re-expressing Data: Get it Straight!
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 12 More About Regression 12.2 Transforming.
 Understand why re-expressing data is useful  Recognize when the pattern of the data indicates that no re- expression will improve it  Be able to reverse.
Chapter 12.2A More About Regression—Transforming to Achieve Linearity
WARM UP: Use the Reciprocal Model to predict the y for an x = 8
Chapter 10: Re-Expression of Curved Relationships
Transforming Relationships
Is this data truly linear?
Re-expressing the Data: Get It Straight!
Bell Ringer Make a scatterplot for the following data.
Chapter 10 Re-Expressing data: Get it Straight
Re-expressing Data: Get it Straight!
Re-expressing the Data: Get It Straight!
Ch. 12 More about regression
Re-expressing the Data: Get It Straight!
So how do we know what type of re-expression to use?
CHAPTER 12 More About Regression
Transforming Relationships
Ch 4 : More on Two-Variable Data
Lecture 6 Re-expressing Data: It’s Easier Than You Think
CHAPTER 12 More About Regression
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
More on Two-Variable Data
CHAPTER 12 More About Regression
Re-expressing Data: Get it Straight!
Presentation transcript:

Chapter 4: More on Two-Variable (Bivariate) Data

4.1 Transforming Relationships  Animal’s Brain Weight vs. Weight of Body Outliers r=.86

Logarithm r=.50 Drop Outliers

Plot Logarithm vs. Logarithm r=.96 The vertical spread about the LSRL is similar everywhere, so the predictions of brain weight from body weight will be pretty precise (high r 2 ) – in LOG SCALE

  Working with a function of our original measurements can greatly simplify statistical analysis.   Transforming- How?

Recall…   Chapter 1 we did Linear Transformations   Took a set of data and transformed it linearly   Called: SHIFTING C to F Meters to Miles

  A Linear Transformation CANNOT make a curved relationship between 2 variables “straight”   Resort to common non-linear functions like the logarithm, positive & negative powers   We can transform either one of the explanatory/response variables OR BOTH   when we do we will call the variable “t”

Real World Example: We measure fuel consumption of a car in miles per gallon Engineers measure it in gallons per mile (how many gallons of fuel the car needs to travel 1 mile) Reciprocal Transformation: 1/f(t) My Car- 25 miles per gallon 1/25=.04 gallons per mile

Monotonic Function  A monotonic function f(t) moves in one direction as its argument “t” increases  Monotonic Increasing  Monotonic Decreasing

Monotonic Increasing: Positive “t” a + bt slope b>0

Monotonic Decreasing: Positive “t” a + bt slope b<0

  Nonlinear monotonic transformations change data enough to change form or relations between 2 variables, yet preserve order and allow recovery of original data.

Strategy: 1.If the variable that you want to transform has values that are 0 or negative apply linear transformation (add a constant) to get all positive. 2.Choose power or logarithmic transformation that approximately straightens the scatterplot.

Ladder of Power Transformations: Power Function: t P

Power Functions:   Monotonic Power Function For t > 0…. 1. Positive p – are monotonic increasing 2. Negative p – are monotonic decreasing

  Monotonic Decreasing- Hard to interpret because reversed order of original data point   We want to make all t P therefore monotonic increasing. We can apply a LINEAR TRANSFORMATION

Original Data (t) Power Function Linear Trans: 0 undefined undefinedUndefined Linear Transformation:

This is log t This is a line

Concavity of Power Functions: P is greater than 1 = - Push out right tail & pull in left tail - Gets stronger as power p moves up away from 1 P is less than 1 = - Push out left tail & pull in right tail - Gets stronger as power p moves down away from 1

Country’s GDB vs. Life Expectancy

P=

Use

How do you know what transformation will make the scatterplot straight? ** DO NOT just push buttons!! **   We will develop methods of selection 1. Logarithmic Transformation 2. Power Transformation

1. Logarithmic Transformations

Exponential Growth A variable grows… Linearly: Exponentially:

The King’s Chess Board… King’s Offer: 1,000,000 grains - 30 days Wise Man: 1 grain per day and double for 30 days

Cell Phone Growth

Suspect Exponential Growth… 1.Calculate Ratios of Consecutive Terms - IF approximately the same… continue

Suspect Exponential Growth… 2. Apply a Transformation that: a. Transforms exponential growth into linear growth b. Transforms non-exponential growth into non-linear growth

Logarithm Review… 1.log(AB)= 2.log(A/B)= 3.logX p =

The Transformation… We hypothesize an exponential model of the form y=ab x To gain linearity, use the (x, log(y)) transformation Form? –

When our data is growing exponentially… if we plot the log of y versus x, we should observe a straight line for the transformed data!

LOG (Y) = (year) R-sq = 98.2%

Eliminate first 4 years & perform regression

LOG (New Y) = (New X) R-sq = 99.99%

Predictions in Exponential Growth Model  Regression is often used for predictions  In exponential growth, ________ rather than actual values follow a linear pattern  To make a prediction of Exp. Growth we must thus “undo” the logarithmic transformation.   The inverse operation of a logarithm is _____________________

LOG (New Y) = (New X) R-sq = 99.99% Predict the number of cell phone users in 2000.

If a variable grows exponentially… its ___________ grow linearly! In other words… if (x, y) is exponential, then (x, log(y)) is linear!

Read and do Technology Toolbox- Page on your own!!

2. Power Transformations

Example: Pizza Shop- order pizza by diameter 10 inch12 inch14 inch Amount you get depends on the area of the pizza Area circle = pi times the square of the radius Power Law Model

Power Laws  We expect area to go up with the square of dimension  We expect volume to go up with the cube of a dimension Real Examples: Many Characteristics of Living Things Kleiber’s Law- The rate at which animals use energy goes up as the ¾ power of their body weight (works from bacteria to whales). Kleiber’s Law- The rate at which animals use energy goes up as the ¾ power of their body weight (works from bacteria to whales).

Power Laws Become Linear  Exponential growth becomes linear when we apply the logarithm to the response variable (y).  Power Laws become linear when we apply the logarithm transformation to BOTH variables.

To Achieve Linearity… 1. 1.The power law model is 2. 2.Take the logarithm of both sides of equation (this straightens scatterplot) 3. 3.Power p in the power law becomes the slope of the straight line that links log(y) to log(x) 4. 4.Undo transformation to make prediction

Fish Example… Read Example 4.9 page 216 Model: weight = a x length 3

  Log (weight) = log a + [3x log(length)]   Yes appears very linear- perform LSRL on [log(length), log(weight)]

LSRL: log(weight)= log(length) r =.9926r 2 =.9985

log(weight)= log(length) = log(length) This is the final power equation for the original data (note- look at p-value)!

Prediction… Why did we do this? weight = x length Predict the weight of a 36cm fish

Summary- Order of Checking…  1. Look to see if there is a ___________________if so use LSRL  2. If points are ____________plot (x, log y) or (x, ln y) to gain linearity  3. If there is a _________ relationship (power model) plot (logx, logy)  4. If the scatterplot looks ________ plot (logx, y)