Uploaded by toss.john100

4.1 Using Logarithmic Transformations to Achieve Linearity

advertisement
SECTION 4.1
CREATING LINEARITY BY USING
TRANSFORMATIONS
ACTIVITY 4) MODELLING CANCER IN BODY
Get into groups of 4 or 5
 Only one person begins to roll – each roll
represents a year
 1,2,3,4,6  Number of cancer cells to add
 5  a new cancer cell is created, another person
is added for the number of rolls per year
 Record your data on the grid
 Is the pattern linear or curved?
 What mathematical model would best describe
the pattern of points?

Exponential
 Cubic?

Logarithms?
Root Functions?
INTRODUCTION
In this section we will develop models for two-variable data
that shows a non-linear relationship
 Use “transformations” of data to ‘straighten’ out non-linear
patterns
3
Ex: Suppose we have data from a cubic function: y  0.5 x  2

The graph of y=0.5x^3+2 is a cubic function that is curved
To linearize the function, apply the inverse function to
the “y” variable (Cube root y-variable)
Now graph “x” vs “cube root of y”
ADVANTAGES OF TRANSFORMING NON-LINEAR DATA:

Many two-variable datas have a non-linear relationship






Ie: Brain mass vs Body mass
Height vs Body Mass
Length vs Volume
Applying the inverse function to “y”, ie: “Logarithm” for
exponential functions, “Square Root” for quadratic equations
straighten non-linear patterns
When the data is “straighten” we can use a LSRL to predict
the response variables “y”
Note: Logarithms are used in Math 12 to find the exponent of a
base 10 number
log  a  b   log  a   log  b 
log  a  b   log  a   log  b 
log  a b   b  log  a 
Review of
Logarithms
Section 2.3
Data were collect on two variables “x” and “y” to create a
model to predict “y” from “x”. The following scatter plot
was created. Which of the following transformations would
be most appropriate for creating linearity between the
variables?
y
a) Take the cube of “Y”
b) Take the cube root of “Y”
c) Take the Square root of “Y”
d) Take the log of “Y”
d) Take the log of both “Y”
and “x”
x


The Ti-83 can perform other Non linear regressions
Quadratic Regr.
y  ax  bx  c
2
x
y

ab
 Exponential Regr.

Logarithmic Regr.

Power Regr. y


 ax
y  a  b ln x
b
Logistic Regression – useful for data
that increases exponentially and
then plateaus to an upper limit
c
y
1  ae  bx
In this course, we use only Linear Regressions
EX: THE NUMBER OF CELL PHONE SUBSCRIBERS IN THE US
1990-1999
a) Use your Ti-83 to make a scatterplot
b) Find the LSRL, slope, r, and r2. Explain
whether if the LSRL is a good model or not
c) Create a residual plot to justify your answer
Contin...
# of Subscribers
a) Plug the data into L1 and L2
Year after 1990
b) Perform a Linear Regression on the data
An r2 of 0.93 indicate that the
LSRL is a good model for the
data. However, a residual plot
may be needed for further
determination
c) Create a residual plot:
The residual plot shows
a curved pattern. This
indicates that a straight
line is a poor model
d) Does the data resemble a exponential curve. Take
the logarithm of all Y-values and create a scatter plot
of Log(y) vs (x)
e) Find the LSRL of Log(y) vs (x). Find the slope, r, and
r2. What information does “r” give us?
Rewrite the equation using “Number of Subscribers”
as a function of “Years after 1990”
f) Use the equation from part “e” to predict the number
of subscribers in 2001 and 2010
d) Create a scatterplot of Log(y) vs (x)
e) Find the LSRL for Log(y) vs (x)
The LSRL intersects almost all the
points. An r2 of 0.982 indicate that an
exponential regression is a strong model
for the data.
log y  3.7956  0.13417 x
log
#  3.7956  0.13417 year after
ofPredicted
 1990 
Subscribers 
f) Using the regression line, predict the number of
subscribers for 2001 (x= 11) and 2010 (x= 20)
log y  3.7956  0.13417 x
log y  3.7956  0.13417 11
log y  5.271505033
11
log
y

3.7956

0.13417
y  6246.424 1.362  x
log y  3.7956  0.13417  20 
y  6246.424  29.9139 
log y  6.479
y  105.27505033
y  186855
6.479
y  186855
You get the same answer with an
y  3,013,006
exponential
regression
y  10
Do the same thing but with
a Exponential Regression
y  6246.424 1.362 
x
RECOGNIZING EXPONENTIAL PATTERNS:


The terms of an exponential function increases/decreases
by a common ratio/fixed percentage
To determine whether if a data set is increasing
exponentially, take the response value of one variable
and divide it by the previous year
# subscribers 1997 55,312
 1.25586

# subscribers 1996 44, 043
69, 209
# subscribers 1998
 1.2512

55,312
# subscribers 1997
# subscribers 1999 86, 047

 1.24329
# subscribers 1998 69, 209
If these ratios are very
close or equal, then it
suggests an
exponential growth for
the data
TRANSFORMING EXPONENTIAL PATTERNS WITH LOGARITHMS


An exponential regression is in the form:
y  a  xb 
To create a linear relationship, take the logarithm
of both sides
y  a b
x

x
x


log y  log  aa
log
b 
b




log y  log a  x  log b 
Y-intercept


Slope
An linear relationship is determined between
log  y  and x
A LSRL would be used to predict Log(y) when we
have “x”

To solve for “y” when we have Log(y), use anti-log or convert
it back to an exponent with base 10
log y  x log 3
log y  0.55
log y  log 3x
log10 y  0.55
y  100.55

y3
x
Ex: Convert the following equations to exponential form:
a)log y  log  0.73  x log  0.5
log y  log  0.73  log  0.5 x 
log y  log  0.73  0.5
y  0.73  0.5x
x

b)2log y  x log  0.49  log  0.36
log y  0.5x log  0.49  0.5 log  0.36
log y  log  0.490.5 x   log  0.360.5 
log y  log  0.7 x   log  0.6 
x x
log yy  log
 0.7
0.60.6
0.7

POWER LAW MODEL:


3D solids or 2D solids, Mass vs Growth Rate
 Mass vs Rate of Reproduction, Size vs Life Expectancy
 Metabolism vs Body Mass of Animals



 
The Power Law Model uses a regression in the form: y  A  x B
Common in geometry and Biology
Commonly used when two Quantitative variables have
different exponents
2
4
3
2
Weight

BMI
Height


V    R 
SA  4    R 
3
3


4
Metabolism  a Weight 
Height  1D
Radius  1D


Weigh
t

3
D
Volume  3D
SA  2D
Data is neither “Linear/Exponential” when there is a
“Dimensional Relationship”

Transform the equation of a Power Model by using the
Logarithmic Function
y  A xB 
B
B

log y  log  A  
log  x 
x


 
log y  log A  B  log x 
Y-intercept

Slope
An linear relationship now exist between log  y  and log  x 
EX: USE THE TABLE TO ANSWER THE FOLLOWING QUESTIONS
a) Perform both a LinReg and ExpReg test on Weight vs
Length. Explain if either a linear or exponential
regression would be a good model
b) Perform a Power Regr. and determine whether if it would
fit the data
c) Make a scatterplot for Log(x) vs Log(y). Find the LSRL
a) Linear and Exponential Regression:
Linear Regression Plot
y  25.202  x   299.0423
Length (cm)
Length (cm)
Residual
Residual
LOG (Weight)
Weight (lbs)
Create a scatter plot of Log(y) vs (x)
For an exponential regression
Residual Plot reveals a curved
pattern. This suggest that a
linear model would be a poor model
The Residual Plot for an exponential
regression also reveals a curved pattern.
This suggest that this model would be a
poor model
b) Power Regression:
Log (Weight)
Create a scatter plot of Log(y) vs Log(x)
for an power regression
The graph shows a very
strong linear correlation
Residual
Log (Length)
The residual plot doesn’t
Show any pattern. Therefore
A power regression is a good model
d) Rewrite the equation with “Predicted Weight” as a
function of “Length”
y  0.0126067399  x 

3.049417866

Predicted  0.0126067399 Length 3.049417866


Weight
e) Use your equation from (d) to predict the weight of a
rockfish that is 15 cm long
Weight   0.0126067399 15
Weight   48.64g
3.049417866
EX: A SCATTER PLOT SHOWING THE REACTION TIME OF A
CERTAIN CHEMICAL WITH THE LSRL IS SHOWN:
Q: Does a linear model fit these
data? Justify your answer:
Although r2 is pretty high, the residual plot
shows a curved pattern so a straight line is
not necessarily the best model for this data
A SCATTERPLOT WITH AN EXPONENTIAL AND POWER
REGRESSION IS DISPLAYED. WHICH IS A BETTER
REGRESSION. EXPLAIN WHY. (3 MARKS)
Exponential Regression

Power Regression
The Exponential Regression would be a better model
because:
Points on the scatterplot are closer to the LSRL
 Although the residual plot isn’t perfect, the residuals are
smaller
 The correlations is also better. r = 0.990 and
r2 = 0.954


Homework:
Download