In this video, we will discuss how to fit a trendline to your data.
We will talk about how to choose a trendline, how to use the r-squared value, and what minimum
and maximum lines are.
Your trendline is evaluated under the analysis criterion.
It might be nonlinear or linear.
Students often think that the trendline must be linear.
This is not true.
If your trendline is clearly nonlinear, please do not try to force a linear fit.
Finally, your trendline should pass through all error bars.
Let's see how I chose my trendline in the example IA.
I am using the numbers program on a MacBook Air to fit different trendlines.
It is clear from my data points that my trendline will not be linear.
This is confirmed when I try to fit a linear trendline.
The trendline clearly does not go through all error bars, and the r-squared value, 0.799,
is relatively low.
When I tried a logarithmic or exponential fit, I did not get a trendline.
Next I tried different polynomial fits, in other words x-squared, x-cubed, and x to the
power of four type of functions.
This is what I got for x-squared, for x-cubed, and for x to the power of four.
Based on the r-squared value, all three seem to be good fits.
In the end, I chose the function with x to the power of four, in other words, a polynomial
of order four, because visually it seems to pass through all the error bars, and it also
has the highest r-squared value.
On the graph in my IA, I will not show the equation and the r-squared value, but I will
briefly come back to them later.
So this is how the final graph looks like in the example IA.
The r-squared value, as we said, basically shows how well a trendline fits your data.
The closer r-squared is to one, the better the fit.
Finally, there is no need to calculate r-squared by hand.
Just use the graphing program to do this.
If your trendline is linear, you should find the minimum and maximum lines.
In this case, you should show three lines on your graph.
The best fit line, the line with the lowest, and the line with the highest gradient.
Finally, in some cases, when your trendline is not linear, you might have to linearize
your graph.
We will discuss this in a separate video.
This completes step six, action three.
Now you know how to fit a trendline to your data.
In the next video, we will discuss how to interpret your data.