Question: Q: How do I get the trendline equation and R2 value for other functions beside linear to show up I went to my chem lab today and the professor showed us how to do all of it on excel. I do not currently have the money to purchase excel until the end of the week but the project is due in 2 days so I have no choice but to use numbers.
![]()
Excel provides a robust toolset for illustrating trends. You can do this by plotting trendlines in your Excel charts to offer a visual of your data. Here, you discover how to plot logarithmic trendlines, power trend lines, and polynomial trend lines in Excel.
![]() Plotting a logarithmic trend line in Excel
A logarithmic trend is one in which the data rises or falls very quickly at the beginning but then slows down and levels off over time. An example of a logarithmic trend is the sales pattern of a highly anticipated new product, which typically sells in large quantities for a short time and then levels off.
To visualize such a trend, you can plot a logarithmic trend line. This is a curved line through the data points where the differences between the points on one side of the line and those on the other side of the line cancel each other out.
Here are the steps to follow to plot a logarithmic trend line in Excel:
Excel displays the regression equation and the R2 value. This image shows a chart with the plotted exponential trend line, the regression equation, and the R2 value.
When the best-fit trend line is a logarithmic curve, the regression equation takes the following general form:
y is the dependent variable; x is the independent variable; b and m are constants; and ln is the natural logarithm, for which you can use the Excel function LN.
Excel doesn’t have a function that calculates the values of
b and m directly. However, you can use the LINEST function if you “straighten out” the logarithmic curve by using a logarithmic scale for the independent values:
Plotting a power trend line in Excel
In many cases of regression analysis, the best fit is provided by a power trend, in which the data increases or decreases steadily. Such a trend is clearly not exponential or logarithmic, both of which imply extreme behavior, either at the end of the trend (in the case of exponential) or at the beginning of the trend (in the case of logarithmic). Examples of power trends include revenues, profits, and margins in successful companies, all of which show steady increases in the rate of growth year after year.
A power trend sounds linear, but plotting the power trend line shows a curved best-fit line through the data points. In your analysis of such data, it’s usually best to try a linear trend line first. If that doesn’t give a good fit, switch to a power trend line.
Follow these steps to plot a power trend line in Excel:
Excel displays the regression equation and the R2 value (described below). The following image shows a chart with the plotted power trend line, the regression equation, and the R2 value.
When the best-fit trend line is a power curve, the regression equation takes the following general form:
y is the dependent variable; x is the independent variable; and b and m are constants.
There’s no worksheet function available to directly calculate the values of
b and m . However, you can use the LINEST function if you “straighten out” the power curve by applying a logarithmic scale to the dependent and independent values:
Plotting a polynomial trend line in Excel
In many real-world scenarios, the relationship between the dependent and independent variables doesn’t move in a single direction. That would be too easy. For example, rather than constantly rising — uniformly, as in a linear trend, sharply, as in an exponential or logarithmic trend, or steadily, as in a power trend — data such as unit sales, profits, and costs might move up and down.
To visualize such a trend, you can plot a polynomial trend line, which is a best-fit line of multiple curves derived using an equation that uses multiple powers of x. The number of powers of x is the order of the polynomial equation. Generally, the higher the order, the tighter the curve fits your existing data, but the more unpredictable your forecasted values are.
If you have a chart already, follow these steps to add a polynomial trend line in Excel:
Excel displays the regression equation and the R2 value. The image below shows a chart with the plotted polynomial trend line, the regression equation, and the R2 value.
When the best-fit trend line is a polynomial curve, the regression equation takes the following form:
y = mnxn + … + m2x2 + m1x + b
y is the dependent variable; x is the independent variable; and b and mn through m1 are constants.
To calculate the values
b and mn through m1 , you can use LINEST if you raise the known_xs values to the powers from 1 to n for an nth-order polynomial:
![]()
Alternatively, you can use the TREND function:
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |