Saturday, April 20, 2013

Regression Analysis Example


In statistics, regression analysis includes any techniques for modeling and analyzing several variables, when the focus is on the relationship between a dependent variable and one or more independent variables. More specifically, regression analysis helps us understand how the typical value of the dependent variable changes when any one of the independent variables is varied, while the other independent variables are held fixed. Most commonly, regression analysis estimates the conditional expectation of the dependent variable given the independent variables — that is, the average value of the dependent variable when the independent variables are held fixed.

Source: Wikipedia.


Formulas for regression:

It is the process of finding the relationship between two variables. It is a statistical analysis which is used for the assessing the association between the two variables.

Formula for Regression:

Regression Equation:

y = a + bx

Slope:

b = (NΣXY - (ΣX) (ΣY)) / (NΣX2 - (ΣX) 2)

Intercept:

a = (ΣY - b (ΣX)) / N


Where
x and y are the variables.
b = the slope of the regression line
a = the intercept point of the regression line and the y-axis.
N = Number of values or elements
X = First Score
Y = Second Score
ΣXY = Sum of the product of first and Second Scores
ΣX = Sum of First Scores
ΣY = Sum of Second Scores
ΣX2 = Sum of square First Scores.

Using this regression formula, Find the Refression equation for the given example problem.

Example problem for regression analysis:

Some example problems for regression analysis

Example 1:

For the given set of x and y values, determine the Linear Regression and also find the slope and intercept and use this in a regression equation.
X Values Y Values
60   2.5
61   2.7
62   2.9
63   3.2
65   3.5


Solution:

Let us count the number of values.
N = 5
Determine the values for XY, X2
X Values Y Values X * Y X * X
60  2.5 150 3600
61  2.7 164.7 3721
62  2.9 179.8 3844
63  3.2 201.6 3969
65  3.5 227.5

4225

Determine the following values ΣX, ΣY, ΣXY, ΣX2.
ΣX = 311
ΣY = 14.8
ΣXY = 923.6
ΣX2 = 19359

Substitute values in the slope formula
Slope (b) = (NΣXY - (ΣX) (ΣY)) / (NΣX2 - (ΣX) 2)
= ((5)*(923.6) - (311)*(14.8)) / ((5)*(19359) - (311)2)
= (4618 – 4602.8)/ (96795 - 96721)
= 15.2 / 74
= 0.20

Substitute the values in the intercept formula given.
Intercept (a) = (ΣY - b (ΣX)) / N
= (14.8 - 0.20 (311))/5
= (14.8 – 62.2)/5
= -47.4 /5
= -9.48

Substitute Slope and intercept values in the regression equation
Regression Equation(y) = a + bx
= -9.48 + 0.20x.

Algebra is widely used in day to day activities watch out for my forthcoming posts on How to Create a Stem and Leaf Plot and Chain Rule Second Derivative. I am sure they will be helpful.

Determine the approximate value for y:

When x = 64

Substitute the x value into the regression equation

Regression Equation(y) = a + bx
= -9.48 + 0.20x.

= -9.48 + 0.20(64)

= -9.48 + 12.28
y = 3. 32.

No comments:

Post a Comment