Sunteți pe pagina 1din 13

09 ME [126,127,129,X-06 &

X-94]

Presentation On Least Square


Linear Regression

Concerned Teacher: Sir


Zeeshan Ali Memon

LEAST SQUARE LINEAR REGRESSION


LINEAR REGRESSION GRAPHICAL REPRESENTATION LEAST SQUARE METHOD LEAST SQUARE REGRESSION ANALYSIS EXAMPLE APPLICATIONS

LINEAR REGRESSION
In statistics, linear regression is an approach
to modeling the relationship between a scalar variable y and one or more variables denoted by X. Note that one variable is dependent on the other.

In linear regression, data is modeled using linear


functions, and unknown model parameters are estimated from the data. Such models are called linear models .

GRAPHICAL REPRESENTATION

The red line in the graph


is known as regression line joining the points which are best fit for the data given.

Taking a simple example, Y=aX is a simple linear equation


where Y is dependent on X. By using given values of X, putting them in the equation ,getting different values of Y, we get different points in the graph. Of them the best fit points are those which make a straight line as shown in the graph above.

LEAST SQUARE METHOD


The least-squares method was first described by
Carl Friedrich Gauss around 1794. The method of least squares is a standard approach to the approximate solution of over determined systems, i.e. sets of equations in which there are more equations than unknowns.

The most important application is in data fitting.


It is often used for regression analysis.

LEAST SQUARE REGRESSION ANALYSIS


Consider a straight line equation y = a + bx. Where a and b
are coefficients representing the intercept and the slope respectively.

From above equation a = y bx .....(i) b = (n xy - x y) [n x2 (x)2]. This is a least


square linear equation for a straight line.

Then using the value of b in (i) we get a. Finally using a and b in the main equation we get the least
squares fit.

EXAMPLE
The following data was obtained in a Physics
experiment and plotted. Determine if a straight line is a good model for this data and if so, determine the line of best fit. Time (s)
1 3 5 7 9

Distance (cm)
2 5 8 11 15

When this data is plotted as a graph, it appears that a


straight line is the best model:

The next step is to calculate 'a' and 'b', which are

calculated to be a= 1.6 s and b=0.2 cm by least square equations.

Therefore, the equation of the line of best fit is d=1.6t+0.2.

APPLICATIONS
If the goal is prediction, or forecasting, linear regression
can be used to fit a predictive model to an observed data set of y and X values. After developing such a model, if an additional value of X is then given without its accompanying value of y, the fitted model can be used to make a prediction of the value of y.

Given a variable y and a number of variables X1, ... ,

Xp that may be related to y, linear regression analysis can be applied to quantify the strength of the relationship between y and the Xj, to assess which Xj may have no relationship with y at all.

THE END Thanks for your concentration.