Solved

Distance from linear trend

Posted on 2014-07-31
2
150 Views
Last Modified: 2014-09-15
How do I calculate the distance from a linear trend in a line chart that goes up and down but steadily increasing?
0
Comment
Question by:fitaliano
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 95

Expert Comment

by:John Hurst
ID: 40233136
There are a number of ways, all under goodness of fit (which I forgot some decades back).

The simplest way (if the numbers are positive and you have a good regression line) is to calculate the y value on the line for the x value of the point.

The vertical distance between the line is y(line) - y(point).

That is one way and that is not the only way.
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40233427
Excel has a function - TREND - which will calculate the linear trend value for any given x-value, based on a set of existing x and y values.  Using this, one can calculate the delta (distance) between any given y-value in the set and the linear trend value for the same value of x.  Here's the syntax:

=TREND((known_y's, [known_x's], [new_x's], [const]), where

known_y's is the range containing the y-values
known_x's is the range containing the x-values (optional if x is understood to be 1,2,3,4...)
new_x's is the range containing the "new" x-values to use for calculating the given linear trend point
const is TRUE is forcing the formula to intercept at y=0

In your case, you'll use your existing data for all the x and y values, then use each individual value of x to produce the linear trend value.  From there you just substract that value from the original y-value to get the delta (distance).

See this example of how you'd do it:
TREND exampleNote the formula entered in cell C2 (and copied down)
=TREND($B$2:$B$11,$A$2:$A$11,A2,TRUE)

You can see from the chart and linear trend on it the the deltas agree with what's seen visually.  Example file attached.,

Regards,
-Glenn


Microsoft Reference: TREND function
EE-TrendExample.xlsx
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question