SIMPLE LINEAR REGRESSION Regression – it is a test used to possibly approximate or predict value of one variable in terms of the other variable. Equation of the Regression Line: ypred = mx + b where ypred = the predicted value of y b= Y – mX m = [n∑(xy) – ∑x ∑y] / [n∑x2 –(∑x)2] Example: Below are the data of 10 out of school youth who took the placement examination offered by the Department of Education (DepEd) to those school drop outs who desire to go back to school. The data show the number of school years the students had attended and the corresponding placement examination percentile rank each student had attained. Solution: Students No. of Yrs. Percentile Rank x^2 xy x y 1 4 58 16 232 2 5 79 25 395 3 5 73 25 365 4 3 59 9 177 5 6 90 36 540 6 4 64 16 256 7 5 76 25 380 8 6 85 36 510 9 4 76 16 304 10 3 49 9 147 TOTAL 45 709 213 3306 X= ∑x / n = 45/10 = 4.5 Y = ∑y /n = 709/10 = 70.9 m= [n∑(xy) – ∑x ∑y] / [n∑x2 –(∑x)2] =[10(3306) – 45 (709)] / [10(213) – 452) = m= (33060 – 31905) / (2130 – 2025) 11 b= Y – mX = 70.9 – 11(4.5) b = 21.4 Therefore the equation of the regression line for the given data is: ypred = mx + b = 11x + 21.4 *** Use the equation of the regression line to check whether the visually approximated value of y = 44 when x = 2 is accurate or nearly accurate. ypred = 11x + 21.4 = 11 (2) + 21.4 = 43.4 *** What is the approximate percentile rank of a student who attended 3 ½ years in high school? ypred = 11x + 21.4 = 11 (3.5) + 21.4 = 59.9 STANDARD EROR OF ESTIMATE (Se) it is a measure of the amount of spread of the sample points about the regression line is shows how the sample points deviate from their regression line. Se = √( ∑y2 – b ∑y – m ∑xy) / (n-2) Example: Compute the Se for the set of paired data of the 10 out-of-school youth who took the DepEd placement examination. Student 1 2 3 4 5 6 7 8 9 10 Total No. of Yrs. x 4 5 5 3 6 4 5 6 4 3 45 Percentile Rank Y 58 79 73 59 90 64 76 85 76 49 709 y2 xy 3364 6241 5329 3481 8100 4096 5776 7225 5776 2401 51789 232 395 365 177 540 256 380 510 304 147 3306 Se = = √( ∑y2 – b ∑y – m ∑xy) / (n-2) √ [51789 – 21.4 (709) – 11(3,306)] / (10-2) = = = √ (51789 – 15, 192.6 – 36,366) / 8 √ 31.3 5.59