Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Practice Norm Alcohol X 6 Nose Touches Y 5 Cliff 8 1 Sam 4 4 Woody 2 9 Practice Norm Cliff Sam Woody Alch Nose X Y 6 5 8 1 4 4 2 9 X 2 Y 2 XY Practice Norm Cliff Sam Woody Alch Nose X Y 6 5 8 1 4 4 2 9 20 19 X 2 36 64 16 4 120 Y 2 25 1 16 81 123 XY 30 8 16 18 72 Practice (4) 72 20 r= (4) 120 20 19 (4)123 X = 20 X2 = 120 Y = 19 Y2 = 123 XY = 72 N=4 19 Practice -9220 r= (4) 120 20 19 (4)123 X = 20 X2 = 120 Y = 19 Y2 = 123 XY = 72 N=4 19 Practice -9220 r= 80 19 131 X = 20 X2 = 120 Y = 19 Y2 = 123 XY = 72 N=4 Practice -9220 -.90 = 80 102.37 19 131 X = 20 X2 = 120 Y = 19 Y2 = 123 XY = 72 N=4 Remember this: Statistics Needed • Need to find the best place to draw the regression line on a scatter plot • Need to quantify the cluster of scores around this regression line (i.e., the correlation coefficient) Regression allows us to predict! 12 Happiness 10 8 . 6 4 . . . . 2 0 2 4 6 Hours Slept 8 10 Straight Line Y = mX + b Where: Y and X are variables representing scores m = slope of the line (constant) b = intercept of the line with the Y axis (constant) Excel Example That’s nice but. . . . • How do you figure out the best values to use for m and b ? • First lets move into the language of regression Straight Line Y = mX + b Where: Y and X are variables representing scores m = slope of the line (constant) b = intercept of the line with the Y axis (constant) Regression Equation Y = a + bX Where: Y = value predicted from a particular X value a = point at which the regression line intersects the Y axis b = slope of the regression line X = X value for which you wish to predict a Y Practice • Y = -7 + 2X • What is the slope and the Y-intercept? • Determine the value of Y for each X: • X = 1, X = 3, X = 5, X = 10 Practice • Y = -7 + 2X • What is the slope and the Y-intercept? • Determine the value of Y for each X: • X = 1, X = 3, X = 5, X = 10 • Y = -5, Y = -1, Y = 3, Y = 13 Finding a and b • Uses the least squares method • Minimizes Error Error = Y - Y (Y - Y)2 is minimized . 12 10 Smile 8 6 4 2 . . . . 0 1 2 3 Talk 4 5 Error = Y - Y (Y - Y)2 is minimized 12 10 Error = 1 Smile 8 6 4 2 . Error = .5 . Error = 0 . Error = -.5 . . Error = -1 0 1 2 3 Talk 4 5 Finding a and b • Ingredients • r value between the two variables • Sy and Sx • Mean of Y and X b b= r = correlation between X and Y SY = standard deviation of Y SX = standard deviation of X a a = Y - bX Y = mean of the Y scores b = regression coefficient computed previously X = mean of the X scores Mean Y = 4.6; SY = 2.41 Mean X = 3.0; SX = 1.41 r = .88 Jerry Smile Y 9 Talk X 5 Elan 2 1 George 5 3 Newman 4 4 Kramer 3 2 Mean Y = 4.6; SY = 2.41 Mean X = 3.0; SX = 1.41 r = .88 . 12 10 Smile 8 6 4 2 . . . . 0 1 2 3 Talk 4 5 Mean Y = 4.6; SY = 2.41 Mean X = 3.0; SX = 1.41 b= r = .88 Mean Y = 4.6; SY = 2.41 Mean X = 3.0; SX = 1.41 2.41 1.50 b = .88 1.41 r = .88 Mean Y = 4.6; SY = 2.41 Mean X = 3.0; SX = 1.41 r = .88 b = 1.5 a = Y - bX Mean Y = 4.6; SY = 2.41 Mean X = 3.0; SX = 1.41 r = .88 b = 1.5 0.1 = 4.6 - (1.50)3.0 Regression Equation Y = a + bX Y = 0.1 + (1.5)X Y = 0.1 + (1.5)X . 12 10 Smile 8 6 4 2 . . . . 0 1 2 3 Talk 4 5 Y = 0.1 + (1.5)X X = 1; Y = 1.6 . 12 10 Smile 8 6 4 2 .. . . . 0 1 2 3 Talk 4 5 Y = 0.1 + (1.5)X X = 5; Y = 7.60 . . 12 10 Smile 8 6 4 2 .. . . . 0 1 2 3 Talk 4 5 Y = 0.1 + (1.5)X . . 12 10 Smile 8 6 4 2 .. . . . 0 1 2 3 Talk 4 5 Practice Mean Y = 14.50; Sy = 4.43 Mean X = 6.00; Sx= 2.16 r = -.57 Aggression Happiness Y X Mr. Blond 10 9 Mr. Blue 20 4 Mr. Brown 12 5 Mr. Pink 16 6 Mean Y = 14.50; Sy = 4.43 Mean X = 6.00; Sx= 2.16 b= r = -.57 Mean Y = 14.50; Sy = 4.43 Mean X = 6.00; Sx= 2.16 4.43 -1.17 b =-.57 2.16 r = -.57 Mean Y = 14.50; Sy = 4.43 Mean X = 6.00; Sx= 2.16 a = Y - bX b = -1.17 Mean Y = 14.50; Sy = 4.43 Mean X = 6.00; Sx= 2.16 21.52= 14.50 - (-1.17)6.0 b = -1.17 Regression Equation Y = a + bX Y = 21.52 + (-1.17)X Y = 21.52 + (-1.17)X . 22 12 20 Aggression 10 . 18 8 16 6 . 14 4 12 2 . 10 0 1 2 3 4 5 6 Happiness 7 8 9 10 Y = 21.52 + (-1.17)X 22 12 20 Aggression 10 . . . 18 8 16 6 . 14 4 12 2 . 10 0 1 2 3 4 5 6 Happiness 7 8 9 10 Y = 21.52 + (-1.17)X 22 12 20 Aggression 10 . . . 18 8 16 6 . 14 4 12 2 . . 10 0 1 2 3 4 5 6 Happiness 7 8 9 10 Y = 21.52 + (-1.17)X 22 12 20 Aggression 10 . . . 18 8 16 6 . 14 4 12 2 . . 10 0 1 2 3 4 5 6 Happiness 7 8 9 10