ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I perform linear regression? (https://www.excelbanter.com/excel-discussion-misc-queries/59388-how-do-i-perform-linear-regression.html)

kunlez

How do I perform linear regression?
 
How or where do I perform linear regression - in the chart or worksheet?

jjbf22

How do I perform linear regression?
 
Do you mean simply where do you perform it, or do you mean how to do it in
general?

"kunlez" wrote:

How or where do I perform linear regression - in the chart or worksheet?


Bill Martin

How do I perform linear regression?
 
kunlez wrote:
How or where do I perform linear regression - in the chart or worksheet?


------------

Lots of possibilities, depending on what you want to get out of it.

The simplest way is to just plot your data on an X,Y chart and then ask Excel to
add the trend line to the data. Right click on the data line of the chart and
select "Add Trend line" and follow your nose through the menus. If you go
through the chart options it will even allow you to display the line equation
it's using on the chart.

The next step up is to use the built in LINEST() function in Excel to add a
column to your chart with the fit-line data and plot that along with the X,Y
data to a chart. This will produce a least squares fit. Ask your Excel help
system for details.

Or you can ask Excel to evaluate the INTERCEPT() and SLOPE() functions and use
those yourself to produce the line values.

Finally, if you want some fit other than least squares, you can write your own
equations and use Solver to find the parameters you've defined.

Good luck...

Bill


B. R.Ramachandran

How do I perform linear regression?
 
Hi,

In the chart:
Right-click on any data-point in the chart -- "Add Trendline" -- Linear
regression is the default selection; click on the "Options" Tab and check
"Display ewquation on Chart" -- "OK".

In the worksheet:
Enter the following equations in two cells.
=SLOPE(your y-range, your x-range); [ e.g., =SLOPE(B2:B101,A2:A101)]
=INTERCEPT(your y-range, your x-range); [e.g., =INTERCEPT(B2:B101,A2:A101)]

In the worksheet (if you need regression statistics too)
Select an 2 column X 5 row area, enter the following formula, and confirm
with CTRL-SHIFT-ENTER.
=LINEST(your y-range, your x-range,,1); [e.g.,
=INTERCEPT(B2:B101,A2:A101,,1)]
The formula will return the regression statistics along with the values for
the slope and the y-intercept (Look in Excel Help for details about what
those values mean).

Regards,
B. R. Ramachandran



"kunlez" wrote:

How or where do I perform linear regression - in the chart or worksheet?



All times are GMT +1. The time now is 03:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com