6

I have the following scatter plot in Google Sheets and I would like to add a line that averages all my points.

Plot example

Can I do that and if yes, how?

1
  • 1
    Have you seen my answer? Does it answer your question? If no, can please give me some feedback on how to answer your question more properly?
    – Jacob Jan
    Commented Dec 11, 2012 at 21:00

1 Answer 1

6

First, calculate the linear regression factors: y=ax+b with the following formula:

=LINEST(B2:B21;A2:A21)

Then add another column next to the y-axis and name it calculated y-axis. Build the following formula to calc. the y-axis and copy that for all x-values.:

=$D$3*A2+$E$3

Next is a piece of cake. Add the calculated y-axis to the existing data range or add it seperately.

UPDATE: I've added the calculated mean value as well, in order to be absolutely sure to have answered your question properly, see plot: Plot with mean and linear regression

See example file for more details: plot regression example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.