Just Call Vip call girls Palakkad Escorts ☎️9352988975 Two shot with one girl...
Regression analysis in excel
1. Lecture:
Simple Linear Regression
in MICROSOFT EXCEL
Chaudhary Awais Salman
Doctoral Researcher in Future Energy
Course instructor
School of Business, Society and Engineering
Fuuture Energy – Centre of Excellence
Email: Chaudhary.awais.salman@mdh.se
2. Regression analysis in Excel
● Three methods are described to perform the regression analysis in EXCEL
1. By formulas
2. By graph
3. By built-in data analysis tool
2
Temperature (deg F) Icecream sales, USD
52 185
58 215
60 332
62 325
64 408
66 406
68 412
72 522
74 445
74 545
74 640
76 522
77 544
80 614
82 614
84 620
85 627
88 627
90 632
Data set used for regression analysis
3. Formulas (1)
● Microsoft Excel has built-in functions such as LINEST, SLOPE, INTERCPET, and
CORREL that can help to do the linear regression.
3
The LINEST Function uses the least
squares method and determine a best
fitted straight line between studied
variables and returns an array
describing that line.
LINEST function returns an array of values (a and b), so it
must be entered as an array formula. Select two adjacent
cells in the same row, D3:F3 in this case, type the formula,
and press Ctrl + Shift + Enter to complete it.
4. Formulas (2)
● Microsoft Excel has built-in functions such as LINEST, SLOPE, INTERCPET, and
CORREL that can help to do the linear regression.
4
Otherwise, we can find the value of slope (a) and intercept
(b) directly by using the SLOPE and INTERCEPT
formulas
5. Formulas (3)
● Microsoft Excel has built-in functions such as LINEST, SLOPE, INTERCPET, and
CORREL that can help to do the linear regression.
5
Similarly correlations and R-squared between two variables can be determined by using the CORREL and
RSQ function of excel. (R-squared can also be determined by squaring the correlation)
6. By graph (1)
● Select the two columns with your data, including headers.
● On the Inset tab, in the Charts group, click the Scatter chart icon, and select
the Scatter thumbnail (the first one):
6
7. 7
● Now, a least squares regression line needs to be drawn. Right click on any point in scatter
graph and choose Add Trendline
By graph (2)
8. 8
● From Trendline options select linear as option and check the display equation and R-
squared on chart options
By graph (3)
9. On the Data tab, in the Analysis group, click the Data Analysis button.
9
Select Regression and click OK
10. ● Select the Input Y Range, which is your dependent variable. In our case, it’s (B1:B20).
● Select the Input X Range, i.e. your independent variable. In this example, it's the (A1:A20).
● Select your preffered output range, it can be new worksheet also
10
● Optionally select the
residual option
12. Explanation of Regression statistics terms
● Multiple R. It is the Correlation Coefficient
● R Square. It is the Coefficient of Determination, which is used as an indicator of the goodness
of fit. In our example, R2 is 0.87 (rounded to 2 digits), which is fairy good. It means that 87% of
our values fit the regression analysis model. Generally, R Squared of 95% or more is
considered a good fit.
● Adjusted R Square. It is the R square adjusted for the number of independent variable in the
model. You will want to use this value instead of R square for multiple regression analysis.
● Standard Error. It is another goodness-of-fit measure that shows the precision of your
regression analysis - the smaller the number, the more certain you can be about your
regression equation. While R2 represents the percentage of the dependent variables variance
that is explained by the model, Standard Error is an absolute measure that shows the average
distance that the data points fall from the regression line.
● Observations. It is simply the number of observations in your model.
12
https://www.ablebits.com/office-addins-blog/2018/08/01/linear-regression-analysis-excel/
13. Explanation of Regression output terms
● The most useful component in this section is Coefficients. It helps us to make a model.
● X variable 1 =a = slope = 12,72
● Intercept = b = -442,387
● Equation
● Y = aX + b
● Y = 12,72 X -442,387
13
https://www.ablebits.com/office-addins-blog/2018/08/01/linear-regression-analysis-excel/
14. Regression analysis output: residuals
● If you compare the estimated and actual number of sold
ice-creams corresponding to the temperature , you will
see that these numbers are slightly different:
● Estimated: 219,44 (calculated above)
● Actual: 185 (row 2 of the source data)
● Why's the difference? Because independent variables
are never perfect predictors of the dependent variables.
And the residuals can help you understand how far
away the actual values are from the predicted values:
14
https://www.ablebits.com/office-addins-blog/2018/08/01/linear-regression-analysis-excel/