Skip to main content

Section 7.3 How to Add a Trendline

Now, let’s return to the Excel worksheet we were working on in the previous chapter. When we left off, we had a chart with two series plotted on it (we called them Spring 1 and Spring 2).
We know that these are springs and that they should obey Hooke’s Law so we can use Excel to add a linear trendline which will effectively mathematically model these equations.
Figure 7.3.1. Load up the Excel file you saved with this chart.
The process for adding a trendline is identical regardless of the mathematical model being used. Let’s see how to add a trendline to our spring data and start with the spring 1 data. The process is also very similar to adding a legend or other chart element so this should be easy for you.
Step 0: Think! What are we mathematically modeling? What type of trendline will we need to use?

Checkpoint 7.3.2. Trendline for Hooke’s Law.

Hooke’s Law is given by \(F = kx\text{,}\) where \(F\) is force, \(x\) is displacement, and \(k\) is the spring constant.
What type of trendline should be used to fit this mathematical model?
  • Power
  • Incorrect. A power trendline is used for models of the form \(y=ax^b\text{.}\) Hooke’s Law is directly proportional to displacement.
  • Linear
  • Correct. Hooke’s Law, \(F=kx\text{,}\) is a linear relationship between force and displacement. The slope of the line is the spring constant \(k\text{.}\)
  • Exponential
  • Incorrect. Exponential trendlines are used for relationships where the rate of change increases or decreases exponentially. Hooke’s Law is linear.
Now that we have determined what trendline we need, let’s look at how to create it in Excel!
  1. Click on one of the data points for the spring 1 dataset. You can click on any of them within the graph and you should notice that they are all selected. You can tell they are selected because Excel will put little circles around all the data points in the series (Figure 7.2.3)
    Figure 7.3.3. Example of Spring 1 data series being selected.
  2. Click on our old friend the “Add Chart Element” menu and select the “Trendline” option.
  3. In the sub-menu that presents itself, you can choose the type of trendline you want, in this case, it is the “Linear” type. Select the “Linear” option and the trendline should automatically be added to the plot!
    Figure 7.3.4. What your chart should look like after you add the linear trendline to the spring 1 dataset.
  4. We have the trendline, but we are still missing the mathematical model that represents the line. To get the model, you need to double-click on the actual trendline itself. That will bring up the “Format Trendline” options (a menu should pop up similar to the one to the left in figure 7.2.5). It is here that you can change the trendline type if you need to.
  5. THINK AGAIN. We know this mathematical model should be linear so we don’t need to change that. But should we set the intercept? Does that make sense in this case? Recall: \(F=kx\) and \(y=mx+b\text{.}\) See what I am getting at here? Notice how in Hooke’s Law we are assuming that before the spring has mass added to it, we are expecting it to stretch 0 meters. Does that sound like an intercept?
    Figure 7.3.5. Format Trendline Options
  6. Yes! Check the “Set Intercept” box and make sure that the value is \(0\text{.}\) The b = 0 in Hooke’s Law so we should set the intercept = 0. Any deviation from that in our mathematical model will be from measurement errors, it would not be representing actual physical phenomena!
  7. Click the “Display Equation on the chart” and “Display R-squared value on chart” options. Then close the “Format Trendline” menu.
Now you can see the mathematical equation displayed on the graph! Notice that the equation is \(y=3.1485x\text{.}\) The equation is giving us \(k\text{,}\) the spring constant! In this case, we can say that the spring constant is: \(k \approx 3.1\)
Follow the exact same process for the spring 2 data in the Excel spreadsheet. What is the spring constant for spring 2?
Hint: make sure that you set the y-intercept = 0 so that you get the same answer I did! Also, round to 1 decimal place. It doesn’t make sense to include those non-significant figures. There is no way our measurements had that much precision.

Checkpoint 7.3.6. What about spring 2?

A quick video recap of this process is provided below.
Figure 7.3.7. How to add a trendline to an Excel data series

Checkpoint 7.3.8. Linear Model Real World Examples.

Name two other real world examples not mentioned in the book that can be mathematically modeled linearly.
What is the relationship between variables that follow a linear mathematical model? You can write your own scenario or use examples you have learned in other classes.
You have attempted of activities on this page.