Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9624

Linear regression with 2 standard deviations?

$
0
0

I have a series of data, and I would like to determine the line of best fit (linear regression) over various numbers of datapoints, along with 2 standard deviations above and below that line.

I'm using Google Sheets, and it seems like the built-in Chart feature doesn't have any standard deviation built in, although it can do the regression portion. But it is limited (AFAIK) to a hardcoded dataset, and I want to be able to for example determine the regression for the last N datapoints.

Here is an example of what I get currently with some sample data:

example of line of best fit

So that's fine, but how can I get it to display 2 standard deviations on either side of the best fit line, and for a variable portion of the total dataset?


Viewing all articles
Browse latest Browse all 9624

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>