Tip:
Highlight text to annotate it
X
Let's add a trendline to some
more complicated data.
We'll do this by first inserting a new column so click on the C column.
Right-click...insert...which will push everything to the side.
And up here let's type
"New Y"
No underneath
we're going to have a formula and this is going to add some
noise to our data.
Let's type
"="
we'll grab B2 here
then add it to
parenthisis -1
to the
randbetween
1, 2. So randbetween will just pick a random
number between 1 and 2 and it's raise it to that power. So it's going to
just take the value and it's going to add some noise to it.
So let's go ahead and drag this down
and we're going to have
values that deviate a little bit from the line.
Let's go ahead and make a scatter plot with these.
Let's keep this one so we can
look at it while we do this.
Let's grab this column hold down control
and grab the New Y
insert...
scatter...
and use points.
So as you can see it's a little bit different here
It has some noise added to the line. We're going to do the same thing we're going
to add the trendline.
So let's go ahead
and click on the data right-click
add trendline.
It's going to be another linear one
and let's display the equation on the chart and we're going to display
R-squared value. what the R-squared value is
is it shows you how closely your line fits the data.
So if you have an R-squared value of 1 that means it's a perfect fit.
If it's close to 1 that means there's some points that are not quite on the
line
If it's a really low R-squared value that means you don't have a good fit
at all.
So we can go ahead and look at this. it's made a line
what I meant
and posted this equation here.
and it's added an R-sqaured value of 0.99 so it's pretty close but
you can see there's some points that don't quite fall on the line.
Now one thing we can do is we can actually change some of this data
Because it picks random values we can click in a cell, delete,
and then click another cell
it'll update the data with new random values. So you can just do this a
few times
and you'll see that you get different R-squared values, different lines
but it will remain just about the same.
Trendlines can be used for many different
kinds of data
and having these equations and R-squared values
available to you can tell you
many interesting things about the data that can be used for further calculations