Sorry, but what I'd like to know is if there is a method that takes as input an Array of values and outputs a coefficient that tell me how close that array is to be a linear set of values.
That linear regression page is for building and indicator that doesnn't show me what I asked...
That linear regression page is for building and indicator that doesnn't show me what I asked...
Ignore the green linear regression link, as that is generated automatically by the website and is not a link provided by the posters. Instead pay attention the words and details provided by the posters and do some research on "Linear Regression" and study the various metrics associated with it, like for example Root Mean Square Error (RMSE).
I think Kaufman's Efficiency Ratio might be one solution.
The less deviations within a trend, the higher the efficiency.
The output is 0 for most inefficient to 1 perfectly efficient.
Kaufman's Efficiency Ratio has nothing to do with this. It does not measure how "linear" data is. You are mixing apples and oranges.
Ratio estimation works best if the data are well fit by a 'straight line' through the origin.
Efficiency Ratio = Direction / Noise
'Direction' is the current sum of plot XY useful as a linear estimator. Ordinary Least Squares is another estimator. Direction represents the line of best fit though not calculated in the same way as least squares.
'Noise' is the sum of absolute changes from one data point to the next. Noise in statistics can also be calculated as standard deviations from the mean.
I can make juice from both fruit.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everybody,
I'm dealing with hundreds of series that have approximately the same % of increase in a given time, but they all differ in terms of linearity.
To make it clear, I attached an image here. The blue line represents the ideal series, the green line the worst, the red line the average.
I would like to know if there is a built-in method (or similar) that, given as input a series, tells me how close it is to be a linear series. (ie: output from 0 to 1, where 1 is the perfect linear series)
I hope I explained myself.
Thank you...