Socology 30 Bvarate Regresson II: Testng Slope and Coeffcent of Determnaton Lyng Luo 05.03 Bvarate Regresson F.ed regresson model for sample ntercept slope Learnng objec;ves Understand the basc dea of es;ma;ng regresson coeffcent Be able to nterpret and test regresson coeffcent Be able to compute and nterpret coeffcent of determna;on Calculatng Expected Values Ŷ 4.76 + 0.X Games Won Runs Scored Usng the regresson equaton we can estmate the average value of Y for a gven value of X predct an ndvdual s value of Y for a gven value of X
Usng the regresson equaton we can estmate the average value of Y for a gven value of X predct an ndvdual s value of Y for a gven value of X estmate the average value of Y for a gven value of X predct an ndvdual s value of Y for a gven value of X Calculatng Expected Values Interpretng the Regresson Equaton Interpretng the Regresson Equaton The equaton Ŷ 4.76 + 0.X means (n Englsh) that The equaton Ŷ 4.76 + 0.X 4.76 0.X means (n Englsh) that Expected Number of Wns + 0.Runs Expected Number of Wns + 0.Runs Expected Number of Wns 0.Runs How many wns would we predct a team to wn f they How many wns would we predct a team to wn f they scored scored 80 80 runs? runs? scored Expected 80 runs? Number of Wns + 0.(80) 83.35 Expected Number of Wns + 0.(80) 83.35 Expected Number of Wns + 0.(80) 83.35 Expected Number of Wns 0.(80) 83.35 What s the average number of wns among teams that What s the average number of wns among teams that What s the average number of wns among teams that score 750 runs? score 750 runs? Expected Number of Wns + 0.(750) 77.74 Expected Expected Number Number of of Wns Wns + 0.(750) 0.(750) 77.74 77.74 Socology 38 ~ 3/3/205 Socology 38 ~ 3/3/205 7 7 Worksheet 04.28 A fnancal analyst would lke to know the rela;onshp between the mutual fund fees (X, n %) and ts annual yeld (Y, n %). She regressed annual yeld on fees and found n her sample a4 and b-0... Wrte down the f.ed regresson model. 2. Interpret the es;mated ntercept and slope. 3. What s the expected return for a mutual fund chargng % fee? 5% fee? Testng Bvarate Regresson Coeffcent F.ed regresson model for sample ntercept slope Tes;ng bvarate regresson coeffcent: a ntercept: We don t usually care b slope: Is the predctor (X) related to the response (Y)?
Testng Bvarate Regresson Coeffcent Typcal null hypothess about popula;on slope β: the predctor varable X has no lnear rela;onshp wth the response varable Y. Gven the es;mated slope b wth sample data, how lkely the popula;on slope β equals to 0? Most common: two-taled test: H 0: β0 vs H : β 0 (Far) less common: one-taled test: H 0: β 0 vs H : β<0 or H 0: β 0 vs H : β>0 Testng Bvarate Regresson Coeffcent Example : An economst s nterested n the rela;onshp between annual salary (Y) and heght n nches (X). He regressed annual salary on heght and found the es;mated ntercept a30,000 and slope b350. State the null and research hypothess about the slope. Testng Bvarate Regresson Coeffcent Example 2: A crmnologst s nterested n the rela;onshp between number of homcde (Y) and medan household ncome (X) n neghborhoods. She regressed the number of homcde on medan household ncome. She found the es;mated ntercept a0. and slope b-0.5. State the null and research hypothess about the slope.
Testng Bvarate Regresson Coeffcent The Central Lmt Theorem b a sample sta;s;cs s normally dstrbuted wth meanβ and standard error (under some crcumstances of course). It means that we can use Z-sta;s;cs to test whether β s dfferent from the hypotheszed value (usually 0). However, we usually don t know so we use t-sta;s;cs nstead. and have to rely on sample nforma;on, For ths class, (standard error of b) wll be provded. Testng Bvarate Regresson Coeffcent Example A cvl engneer s nterested n whether anxety level (X, a numerc measure rangng anywhere from 0 to 20 wth 20 beng extremely anxous) s assocated wth drvng speed on the hghway (Y, n mles per hour). He regressed speed on anxety level on speed and found the es;mated ntercept a75, the es;mated slope b2., and the es;mated standard error for the slope S b.2.. Wrte down the f.ed regresson model. 2. Interpret the es;mated ntercept and slope. 3. State the null and research hypothess about the slope. 4. Decde the alpha level and cr;cal value(s). 5. Compute the test sta;s;c. 6. Compare the test sta;s;c to the cr;cal value to make a decson. 7. State a techncal decson and a substan;ve concluson. Testng Bvarate Regresson Coeffcent Example 2 A socologst s nterested n nter-genera;onal moblty defned as the rela;onshp between father educa;on and chld s educa;on. He sampled n,485 ndvduals, and below s the SP output.. Wrte down the f.ed regresson model. 2. Interpret the es;mated ntercept and slope. 3. State the null and research hypothess about the slope. 4. Decde the alpha level and cr;cal value(s). 5. Compute the test sta;s;c. 6. Compare the test sta;s;c to the cr;cal value to make a decson. 7. State a techncal decson and a substan;ve concluson.
Worksheet 05.03 A cvl engneer s nterested n whether anxety level (X, a numerc measure rangng anywhere from 0 to 20 wth 20 beng extremely anxous) s assocated wth drvng speed on the hghway (Y, n mles per hour). He regressed speed on anxety level and found the es;mated ntercept a75, and the ntercept b2., and the es;mated standard error for the slope Sb.2.. Wrte down the f.ed regresson model. 2. Interpret the es;mated ntercept and slope. 3. State the null and research hypothess about the slope. 4. Decde the alpha level and cr;cal value(s). 5. Compute the test sta;s;c. 6. Compare the test sta;s;c to the cr;cal value to make a decson. 7. State a techncal decson and a substan;ve concluson. Coeffcent of Determnaton How well does X do n es;ma;ng/predc;ng Y? A strong assoca;on/rela;onshp allows good es;ma;on/predc;on. A weak assoca;on/rela;onshp means bad es;ma;on/predc;on. To measure ths, we examne how much of the vara;on n Y can be a.rbuted to X and how much s random error. That s, we can par;;on the varance n Y nto the part a.rbutable to X and the part a.rbutable to error. Coeffcent of Determnaton Par;;on the varance/deva;on n Y nto the part a.rbutable to X and the part a.rbutable to error. Y Y ( Ŷ Y) + ( Y Ŷ ) Porton of the devaton from the mean that s attrbutable to X Porton of the devaton from the mean that s attrbutable to random error Devatons from the mean can be expressed as the sum of () devatons of the predcted value from the mean and (2) ndvdual devatons from the predcted value
Coeffcent of Determnaton If we square each sde and then sum across cases we get: n Total Sum of Squares 2 2 n n ( Y Y) ( Ŷ Y) + ( Y Ŷ ) 2 Regresson Sum of Squares REGREION + ERROR Error Sum of Squares How Well Does X Predct Y? If we square each n sde and n then 2sum n across cases we get: 2 ( ) 2 n Y Y Ŷ Y 2+ Y Ŷ When X s not related to Y, 2 n n then ( ) ( ) ( ) 2 Y Y Ŷ Y + Y Ŷ knowng X does not help es;mate or predct Y Total Regresson Error our best Sum Total guess of Squares about Sum s Regresson of, so Squares REGREION Sum 0 and of Error Squares ERROR Sum of Squares Sum of Squares Sum of Squares REGREION + ERROR If there s no assocaton between Y and X, then knowng X does not help predct Y In ths case, our best guess about Y-hat s Y-bar; thus REGREION equals zero and ERROR Coeffcent of Determnaton How Well Does X Predct Y? The coeffcent of determnaton (R 2 ) ndcates the proporton of the total varaton n Y that s determned by ts The lnear coeffcent How relatonshp Well of determnaton wth Does X (RX 2 ) Predct ndcates the Y? proporton 2 of the total varaton ERROR n Y that s determned by REGREION ts R lnear relatonshp wth X The coeffcent of determnaton (R 2 ERROR 2 ) ndcates the REGREION proporton R of the total varaton n Y that s determned by ts lnear relatonshp wth X If R 2 0, then REGREION 0, whch suggests that there s no 2 ERROR REGREION assocaton R between Y and X If If R 2 R 2, then REGREION, whch suggests that there s no 0, then error varaton REGREION 0, whch suggests that there s no and that we can perfectly predct Y assocaton between Y and X based on X If R 2, then REGREION, whch suggests that there s no error varaton and that we can perfectly predct Y based on X How Well Does X Predct Y? Coeffcent of Determnaton R 2.0 R 2.0 How Well Does X Predct Y? R 2.0 R 2.0 R 2 0.25 R 2 0.25 R 2 0.25 R 2 0.25 Socology 38 ~ 3/3/205 9
Coeffcent of Determnaton 2 For the baseball example: R 28.63 2948.967 REGREION 0.383 Games Won Runs Scored Coeffcent of Determnaton An R 2 of 0.383 means that 38.3% of the varaton n Y (Wns) s explaned by X (Runs Scored) Games Won Runs Scored Coeffcent of Determnaton 2 ERROR R REGREION Example : Calculate and nterpret REGREION 67,23 ERROR 2,86,928? R 2 for regressng church a.endance on age: Example : Calculate and nterpret REGREION,5,622 ERROR? 0,502,532 R 2 for regressng sexfreq on age: