HELLO!
Mr. Tarrou.
We are going to cover a topic that in AP Stats, a lot teachers have said... not a lot... but
I have definitely heard some teachers say that they skip.
Because, well I don't think they believe that it really shows up on the AP exam very much.
I have never been a grader.
I know it is on our topic list, and so I am going to go ahead and cover it.
But I am going to do sort of a simplified version of the log transformation.
Much simpler than our new version of our textbook make this seem.
So I am not going to totally skip log transformations, but I am going to water it down a little bit
and just talk about two types of transformations.
This video will only include one of them and the second one will be for the other.
Ok.
Log transformations, what are they?
Before we get into all of this we are going to need to remember that with scatter plots
and regression lines, that is the only type of regressions that we can do... linear regression
lines.
If that scatter plot is not approximately linear, well we are going to stuck doing nothing
more than describing what we see.
So let's...
What we are going to do with log transformations is to attempt to take a scatter plot that
is curved, whether it is curved up or down... maybe it is exponential decay, and try and
make these patterns straight.
And we will be able to do that with two types of variables with a log transformation.
Now we have learned two types of transformations.
This will be the second type of transformation we have learned so far.
We have had a linear transformation which is when you just find some new x values by
going through the process of a+bx.
And all that does is change the units of measure.
Like maybe if you want to take a variable on the x axis and change it from inches to
feet or celsius to fahrenheit.
That is a linear transformation.
So is the z score process.
The z score formula where you subtract and divide.
That is the same as adding by a negative number, and multiplying by a fraction.
A z score is a linear transformation where you are changing the units of measure from
whatever is in the problem into numbers of z scores... standard deviations away from
the mean.
So a linear transformation will change the unit of measure like inches to feet like I
just said.
But it will not change the shape of the distribution.
If you are talking about a histogram that is maybe left skewed, if you go from inches
to feet then it is still going to be a left skewed distribution.
It will move left or right on the number line and expand or contract possibly if there is
a multiplication like in the form of b.
But if it is left skewed it will be still left skewed.
If it is right skewed, it will still be right skewed.
And if we are talking about a scatter plot, here we have two time plots, or at least the
idea of them, where the time is the x axis and the vertical axis is in some form of temperature.
Well, if I have a graph... a scatter plot... that shows this downward...
Well it is actually slope, but this sort of downward concave down idea.
And it is measurement is in Celsius.
Well ok, if I take this Celsius and put through a linear transformation to change it into
Fahrenheit my graph is going to change a little bit.
Maybe the y intercept will become larger.
But it is still going to have this decreasing slope.
So it appears to change a little bit, but it is still going to have a curved pattern
it.
So this what the effect of a linear transformation is.
But what we are going to do is a Log Transformation.
And we are going to be able to take two types of curved data, exponential and power, and
through a log transformation process get a new transformed scatter plot that is straight.
That will allow us to run regression lines through it and do other calculations.
[nanananana] Ok.
So.
How was that right in the microphone.
Type one, exponential growth and decay.
If you make a scatter plot and you notice that the pattern is curved.
Now we are talking about exponential growth or decay.
So if my y values are getting larger faster with my larger x's of course that may be exponential
growth.
Well, I don't really care if my students can look at a graph and tell if it is squared,
or cubic, or cube root.
I just am concerned with them identifying the two types of variables that we can make
straight, exponential and power.
And today, or in this video, we are only going to do exponential.
If you take the log of the y values and remake the scatter plot, if it looks to be straight
and you can verify that by making a regression line and then checking it with a residual
plot... if you have curved data.. you log the y's and just the y's.. and you get a linear
pattern, then you have just proven or shown yourself that the original data was exponential
growth or decay.
So if logging the y makes the scatter plot straight, and I put this in quotation marks
because are dealing with real data.
And the idea of perfectly straight is just not going to happen.... then the original
data was exponential.
Now my notes are in the form of using TI-83 and TI-84 which is what my students use.
I will show you an example of the calculator probably will get that posted tomorrow about
doing these transformations with both a TI-NSPIRE and a TI-84.
In a TI-84 notation, you are going to have your x's and y's.
They don't have to be list one and list two, but that is just convenient.
Then in list three we are going to take the log of the y values which I have identified
in list two.
So list three equals log of list two.
We have the log of the y values.
So this scatter plot will be made by using list one and list two, and this scatter plot
with list one and list three.
And again, curved data.. log the y's.. if you notice it looks straight you will run
a regression line through that transformed data and then verify that it is straight by
making a residual plot.
I have a video showing you how to make a residual plot and I will also making more of these
on my calculator lab demonstrating log transformations if you are not how to do that.
So if you can verify that the scatter plot is approximately linear then you have verified
that the original data was exponential growth or decay.
And don't forget, when you take that equation out of your calculator you did log the y values
before you made it straight... or to make it straight.
Don't forget to write log of y hat, not just y hat.
Continuing on.
[nananananana] Ok.
So we have made our scatter plot, it looked curved, we logged the y's, it looks straight,
we ran the regression line, we made sure that it was straight using that residual plot and
seeing the horizontal band of points.
There was no clear curved pattern in the residual plot.
Then if L1 and L3 appears linear, make a regression line and then a residual plot... just writing
down what I just told you a second ago to do, and prove or show yourself the log of
y hat equals a+bx is a good fit for that transformed data.
Well, you know what a lot of people don't understand logarithms and you might not as
well.
I will show you a little review in a second.
But if you are statistician and you start giving people your results and they are in
this transformed idea... values that they don't understand, it is going to mean nothing
to them.
So we are going to talk about undoing the log.
Getting the log function out of our equation that fits the transformed linear scatter plot.
So to undo a log transformation, make an equation that models..
We are going to undo the log transformation to make an equation that models the original
data.
Something that somebody that maybe... if you are a statistician somebody gave you data
to analyze and you are giving them something back...
And you want to make something friendly for them to use.
So we want to make a model that fits the original data.
We are going to do that by making both sides of the equation an exponent of 10.
I will explain why at the end of this video you want to do that.
So let's get the log out of our equation that fits our linear transformed data.
Let's make a model that fits the original graph.
[nanananana] Enough of the sound effects.
So anyway.
We have got an equation that is the log of y hat equals a+bx.
And again, these are just notes.
An example will follow in a calculator lab.
So we have the original curved data, we logged the y's and it looks straight, we ran a regression
line through it and then checked with a residual plot that regression line showed the transformed
data was indeed linear..
Verifying the original data was exponential.
Now you are stuck with this equation that does fit well the transformed data.
Ok, so we are going to make both sides of the equation an exponent of 10.
Why?
Because I want to undo that log base of 10.
When you have a base of ten and a log base ten stacked like this, they are going to cancel
each other out.
I will show you how that works in a second.
So the log base 10 and the base 10 cancel out.
Y hat comes down and now your log is out of the function.
On the right hand side I am going to make this look like the exponential form that you
will find in your textbook.
This is 10 raised to two terms being added together.
When do you add exponents?
You add exponents when you are multiplying like bases.
Ok.
So, that means that 10 to the a plus bx is the same as 10 to the 'a' times 10 to the
bx.
Remember, when you multiply like bases you add the exponents.
Great!
Well now we got this and 10^a, you will actually have a number out of your calculator so you
can find out what this actually equals.
You will have some number times 10 to something.
This pattern you might notice will fit what you see in your textbook, and your textbook
might use different letters but exponential form is equal to y hat equals c.. this is
our initial value...
times d to the x.
And d is going to be our base, is our going to be our growth pattern.
How much are we growing every growth period.
If d is larger than one, it is growth.
If d is greater than 0 and less than 1, it is decay.
And then we have an exponent.
Well, the exponent of x is the number of growth periods.
So y hat equals c times d to the x.
Your book might have exponential form written like but with different letters, but this
is a textbook version of exponential growth.
Out of your calculator you are going to see, you know, base of tens because that is what
we are using.
Base 10 or exponents of 10 to get rid of the common log function.
And why exactly is that cancelling out all of the time?
Well,... [intercom message] So why are these cancelling out like this?
Why do we get this base ten and log base ten to cancel out?
Well, take your calculator and to the log of 100.
If you do that you will get an answer of 2.
And why is that?
Because the base of a common logarithm is base ten.
And the answer that you get is exponent of ten.
So if you want to take the log of 100 you get 2.
You can check with your calculator.
It is very simple.
And just as an example, take 10 and raise it to the second power.
Doesn't that equal 100 again.
So I logged 100 and got 2, and if I take 10 and I raise to a power of 2 I get back to
100.
So making a value an exponent of 10... the answer from a common log.. making it an exponent
of 10 will cancel out the log function and you get right back to where you started from.
So this example will show you why you want to make both sides of your equation an exponent
10.
Because those will cancel out and you will get an equation that models your original
data that someone who is not a statistician or mathematician will plug numbers into and
understand what is going on.
BAM!