Section 3.3-3.4

# Section 3.3-3.4 - 3 3 Fitting a Line to Bivariate Data In...

This preview shows pages 1–5. Sign up to view the full content.

3. 3 Fitting a Line to Bivariate Data In this section, we discuss the following: (a) Fitting a straight line (b) Principle of Least squares (c) Regression; Residuals (d) Coefficient of determination 2 ( ) r 1. Fitting a straight line Often, one is interested in not only studying the relationship, but also in predicting the value of the dependent variable y based on independent (predictor or explanatory variable) x . When scatter plot suggests a linear relationship, it is natural to find a straight line which is as close as possible to the points. The equation of straight line is bx a y + = . A particular equation is 5 y x = + . Here . 1 and 5 = = b a To draw a line, we need two quantities namely intercept (with y - axis) term a and the slope b . Given the data 1 1 ( , )...,( , ) n n x y x y on ( , ) x y . Aim: To find the straight line y ax b = + which fits the data well. 2. Method of Least Squares Here x= explanatory (predictor) variable y= response variable. Let ( ) i i i y a bx ε = - + = error= deviation from the line. 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Then 2 2 1 1 ( ) n n i i i i y a bx ε = = - - = sums of squares of errors. Principle of least squares says choose the line (or find a and b ) such that 2 i is minimum. The resulting equation is called “Sample Regression Line”. 3. The Derivation Let 2 1 ) ( ) , ( = - - = n i i i bx a y b a f (*) For fixed b and treating as a function of a, we have 0 ) 1 ( ) ( 0 1 = - - - = n i i bx a y a f 0 = - - x nb na y n ) ( ˆ say a x b y a = - = . Also, substituting a ˆ in (*) and treating as a function of b, 0 ) ( ) ˆ ( 0 1 = - - - = i n i i x bx a y b f 0 ˆ 1 2 1 = - - n i n i i x b x a n y x 0 ) ( 1 2 1 = - - - n i n i i x b x x b y n y x (substituting a ˆ ) Solving now for b, we obtain 2
) ( ˆ 1 2 2 1 say b S S x n x y x n y x b xx xy n i n i i = = - - = Then the line x b a ˆ ˆ y ˆ + = is called the fitted least-squares (regression) line . The slope of the least squers (regression) line is ; xy xx S b S = \$ The intercept of the line is = \$ a y bx = - . Therefore, the (sample) regression line is \$ y a bx = + \$ . The value \$ \$ i i y a bx = + \$ is called the fitted value of y and i y is called the observed value of y . The quantities \$ ( ) i i i e y y = - is called the residual. If, i e > 0, the model under estimate data value; If i e < 0, the model over estimate data value. Example 1. The following data gives the mean height of a group of children in Kalama, an Egyptian village, that was the study of nutrition in developing countries. The data were obtained on 161 children each month from 18 to 29 months of age. 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Here, x = age (in months) = explanatory variable; y = height (in cm) = response variable. x
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 07/25/2008 for the course STT 351 taught by Professor Palaniappan during the Summer '08 term at Michigan State University.

### Page1 / 17

Section 3.3-3.4 - 3 3 Fitting a Line to Bivariate Data In...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online