File size: 53,488 Bytes
50deadf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 |
1
00:00:11,020 --> 00:00:13,920
The last chapter we are going to talk in this
2
00:00:13,920 --> 00:00:17,820
semester is correlation and simple linearization.
3
00:00:18,380 --> 00:00:23,300
So we are going to explain two types in chapter
4
00:00:23,300 --> 00:00:29,280
12. One is called correlation. And the other type
5
00:00:29,280 --> 00:00:33,500
is simple linear regression. Maybe this chapter
6
00:00:33,500 --> 00:00:40,020
I'm going to spend about two lectures in order to
7
00:00:40,020 --> 00:00:45,000
cover these objectives. The first objective is to
8
00:00:45,000 --> 00:00:48,810
calculate the coefficient of correlation. The
9
00:00:48,810 --> 00:00:51,210
second objective, the meaning of the regression
10
00:00:51,210 --> 00:00:55,590
coefficients beta 0 and beta 1. And the last
11
00:00:55,590 --> 00:00:58,710
objective is how to use regression analysis to
12
00:00:58,710 --> 00:01:03,030
predict the value of dependent variable based on
13
00:01:03,030 --> 00:01:06,010
an independent variable. It looks like that we
14
00:01:06,010 --> 00:01:10,590
have discussed objective number one in chapter
15
00:01:10,590 --> 00:01:16,470
three. So calculation of the correlation
16
00:01:16,470 --> 00:01:20,740
coefficient is done in chapter three, but here
17
00:01:20,740 --> 00:01:26,060
we'll give some details about correlation also. A
18
00:01:26,060 --> 00:01:28,480
scatter plot can be used to show the relationship
19
00:01:28,480 --> 00:01:31,540
between two variables. For example, imagine that
20
00:01:31,540 --> 00:01:35,400
we have a random sample of 10 children.
21
00:01:37,800 --> 00:01:47,940
And we have data on their weights and ages. And we
22
00:01:47,940 --> 00:01:51,640
are interested to examine the relationship between
23
00:01:51,640 --> 00:01:58,400
weights and age. For example, suppose child number
24
00:01:58,400 --> 00:02:06,260
one, his
25
00:02:06,260 --> 00:02:12,060
or her age is two years with weight, for example,
26
00:02:12,200 --> 00:02:12,880
eight kilograms.
27
00:02:17,680 --> 00:02:21,880
His weight or her weight is four years, and his or
28
00:02:21,880 --> 00:02:24,500
her weight is, for example, 15 kilograms, and so
29
00:02:24,500 --> 00:02:29,680
on. And again, we are interested to examine the
30
00:02:29,680 --> 00:02:32,640
relationship between age and weight. Maybe they
31
00:02:32,640 --> 00:02:37,400
exist sometimes. positive relationship between the
32
00:02:37,400 --> 00:02:41,100
two variables that means if one variable increases
33
00:02:41,100 --> 00:02:45,260
the other one also increase if one variable
34
00:02:45,260 --> 00:02:47,980
increases the other will also decrease so they
35
00:02:47,980 --> 00:02:52,980
have the same direction either up or down so we
36
00:02:52,980 --> 00:02:58,140
have to know number one the form of the
37
00:02:58,140 --> 00:03:02,140
relationship this one could be linear here we
38
00:03:02,140 --> 00:03:06,890
focus just on linear relationship between X and Y.
39
00:03:08,050 --> 00:03:13,730
The second, we have to know the direction of the
40
00:03:13,730 --> 00:03:21,270
relationship. This direction might be positive or
41
00:03:21,270 --> 00:03:22,350
negative relationship.
42
00:03:25,150 --> 00:03:27,990
In addition to that, we have to know the strength
43
00:03:27,990 --> 00:03:33,760
of the relationship between the two variables of
44
00:03:33,760 --> 00:03:37,320
interest the strength can be classified into three
45
00:03:37,320 --> 00:03:46,480
categories either strong, moderate or there exists
46
00:03:46,480 --> 00:03:50,580
a weak relationship so it could be positive
47
00:03:50,580 --> 00:03:53,320
-strong, positive-moderate or positive-weak, the
48
00:03:53,320 --> 00:03:58,360
same for negative so by using scatter plot we can
49
00:03:58,360 --> 00:04:02,530
determine the form either linear or non-linear,
50
00:04:02,690 --> 00:04:06,130
but here we are focusing on just linear
51
00:04:06,130 --> 00:04:10,310
relationship. Also, we can determine the direction
52
00:04:10,310 --> 00:04:12,870
of the relationship. We can say there exists
53
00:04:12,870 --> 00:04:15,910
positive or negative based on the scatter plot.
54
00:04:16,710 --> 00:04:19,530
Also, we can know the strength of the
55
00:04:19,530 --> 00:04:23,130
relationship, either strong, moderate or weak. For
56
00:04:23,130 --> 00:04:29,810
example, suppose we have again weights and ages.
57
00:04:30,390 --> 00:04:33,590
And we know that there are two types of variables
58
00:04:33,590 --> 00:04:36,710
in this case. One is called dependent and the
59
00:04:36,710 --> 00:04:41,330
other is independent. So if we, as we explained
60
00:04:41,330 --> 00:04:47,890
before, is the dependent variable and A is
61
00:04:47,890 --> 00:04:48,710
independent variable.
62
00:04:52,690 --> 00:04:57,270
Always dependent
63
00:04:57,270 --> 00:04:57,750
variable
64
00:05:00,400 --> 00:05:05,560
is denoted by Y and always on the vertical axis so
65
00:05:05,560 --> 00:05:11,300
here we have weight and independent variable is
66
00:05:11,300 --> 00:05:17,760
denoted by X and X is in the X axis or horizontal
67
00:05:17,760 --> 00:05:26,300
axis now scatter plot for example here child with
68
00:05:26,300 --> 00:05:30,820
age 2 years his weight is 8 So two years, for
69
00:05:30,820 --> 00:05:36,760
example, this is eight. So this star represents
70
00:05:36,760 --> 00:05:42,320
the first pair of observation, age of two and
71
00:05:42,320 --> 00:05:46,820
weight of eight. The other child, his weight is
72
00:05:46,820 --> 00:05:52,860
four years, and the corresponding weight is 15.
73
00:05:53,700 --> 00:05:58,970
For example, this value is 15. The same for the
74
00:05:58,970 --> 00:06:02,430
other points. Here we can know the direction.
75
00:06:04,910 --> 00:06:10,060
In this case they exist. Positive. Form is linear.
76
00:06:12,100 --> 00:06:16,860
Strong or weak or moderate depends on how these
77
00:06:16,860 --> 00:06:20,260
values are close to the straight line. Closer
78
00:06:20,260 --> 00:06:24,380
means stronger. So if the points are closer to the
79
00:06:24,380 --> 00:06:26,620
straight line, it means there exists stronger
80
00:06:26,620 --> 00:06:30,800
relationship between the two variables. So closer
81
00:06:30,800 --> 00:06:34,480
means stronger, either positive or negative. In
82
00:06:34,480 --> 00:06:37,580
this case, there exists positive. Now for the
83
00:06:37,580 --> 00:06:42,360
negative association or relationship, we have the
84
00:06:42,360 --> 00:06:46,060
other direction, it could be this one. So in this
85
00:06:46,060 --> 00:06:49,460
case there exists linear but negative
86
00:06:49,460 --> 00:06:51,900
relationship, and this negative could be positive
87
00:06:51,900 --> 00:06:56,100
or negative, it depends on the points. So it's
88
00:06:56,100 --> 00:07:02,660
positive relationship. The other direction is
89
00:07:02,660 --> 00:07:06,460
negative. So the points, if the points are closed,
90
00:07:06,820 --> 00:07:10,160
then we can say there exists strong negative
91
00:07:10,160 --> 00:07:14,440
relationship. So by using scatter plot, we can
92
00:07:14,440 --> 00:07:17,280
determine all of these.
93
00:07:20,840 --> 00:07:24,460
and direction and strength now here the two
94
00:07:24,460 --> 00:07:27,060
variables we are talking about are numerical
95
00:07:27,060 --> 00:07:30,480
variables so the two variables here are numerical
96
00:07:30,480 --> 00:07:35,220
variables so we are talking about quantitative
97
00:07:35,220 --> 00:07:39,850
variables but remember in chapter 11 We talked
98
00:07:39,850 --> 00:07:43,150
about the relationship between two qualitative
99
00:07:43,150 --> 00:07:47,450
variables. So we use chi-square test. Here we are
100
00:07:47,450 --> 00:07:49,630
talking about something different. We are talking
101
00:07:49,630 --> 00:07:52,890
about numerical variables. So we can use scatter
102
00:07:52,890 --> 00:07:58,510
plot, number one. Next correlation analysis is
103
00:07:58,510 --> 00:08:02,090
used to measure the strength of the association
104
00:08:02,090 --> 00:08:05,190
between two variables. And here again, we are just
105
00:08:05,190 --> 00:08:09,560
talking about linear relationship. So this chapter
106
00:08:09,560 --> 00:08:13,340
just covers the linear relationship between the
107
00:08:13,340 --> 00:08:17,040
two variables. Because sometimes there exists non
108
00:08:17,040 --> 00:08:23,180
-linear relationship between the two variables. So
109
00:08:23,180 --> 00:08:26,120
correlation is only concerned with the strength of
110
00:08:26,120 --> 00:08:30,500
the relationship. No causal effect is implied with
111
00:08:30,500 --> 00:08:35,220
correlation. We just say that X affects Y, or X
112
00:08:35,220 --> 00:08:39,580
explains the variation in Y. Scatter plots were
113
00:08:39,580 --> 00:08:43,720
first presented in Chapter 2, and we skipped, if
114
00:08:43,720 --> 00:08:48,480
you remember, Chapter 2. And it's easy to make
115
00:08:48,480 --> 00:08:52,620
scatter plots for Y versus X. In Chapter 3, we
116
00:08:52,620 --> 00:08:56,440
talked about correlation, so correlation was first
117
00:08:56,440 --> 00:09:00,060
presented in Chapter 3. But here I will give just
118
00:09:00,060 --> 00:09:07,240
a review for computation about correlation
119
00:09:07,240 --> 00:09:11,460
coefficient or coefficient of correlation. First,
120
00:09:12,800 --> 00:09:15,680
coefficient of correlation measures the relative
121
00:09:15,680 --> 00:09:19,920
strength of the linear relationship between two
122
00:09:19,920 --> 00:09:23,740
numerical variables. So here, we are talking about
123
00:09:23,740 --> 00:09:28,080
numerical variables. Sample correlation
124
00:09:28,080 --> 00:09:31,500
coefficient is given by this equation. which is
125
00:09:31,500 --> 00:09:36,180
sum of the product of xi minus x bar, yi minus y
126
00:09:36,180 --> 00:09:41,100
bar, divided by n minus 1 times standard deviation
127
00:09:41,100 --> 00:09:44,960
of x times standard deviation of y. We know that x
128
00:09:44,960 --> 00:09:47,240
bar and y bar are the means of x and y
129
00:09:47,240 --> 00:09:51,360
respectively. And Sx, Sy are the standard
130
00:09:51,360 --> 00:09:55,540
deviations of x and y values. And we know this
131
00:09:55,540 --> 00:09:58,460
equation before. But there is another equation
132
00:09:58,460 --> 00:10:05,330
that one can be used For computation, which is
133
00:10:05,330 --> 00:10:09,290
called shortcut formula, which is just sum of xy
134
00:10:09,290 --> 00:10:15,310
minus n times x bar y bar divided by square root
135
00:10:15,310 --> 00:10:18,690
of this quantity. And we know this equation from
136
00:10:18,690 --> 00:10:23,650
chapter three. Now again, x bar and y bar are the
137
00:10:23,650 --> 00:10:30,060
means. Now the question is, Do outliers affect the
138
00:10:30,060 --> 00:10:36,440
correlation? For sure, yes. Because this formula
139
00:10:36,440 --> 00:10:39,940
actually based on the means and the standard
140
00:10:39,940 --> 00:10:44,300
deviations, and these two measures are affected by
141
00:10:44,300 --> 00:10:47,880
outliers. So since R is a function of these two
142
00:10:47,880 --> 00:10:51,340
statistics, the means and standard deviations,
143
00:10:51,940 --> 00:10:54,280
then outliers will affect the value of the
144
00:10:54,280 --> 00:10:55,940
correlation coefficient.
145
00:10:57,890 --> 00:11:01,170
Some features about the coefficient of
146
00:11:01,170 --> 00:11:09,570
correlation. Here rho is the population
147
00:11:09,570 --> 00:11:13,210
coefficient of correlation, and R is the sample
148
00:11:13,210 --> 00:11:17,730
coefficient of correlation. Either rho or R have
149
00:11:17,730 --> 00:11:21,390
the following features. Number one, unity free. It
150
00:11:21,390 --> 00:11:24,890
means R has no units. For example, here we are
151
00:11:24,890 --> 00:11:28,820
talking about whales. And weight in kilograms,
152
00:11:29,300 --> 00:11:33,700
ages in years. And for example, suppose the
153
00:11:33,700 --> 00:11:37,080
correlation between these two variables is 0.8.
154
00:11:38,620 --> 00:11:41,760
It's unity free, so it's just 0.8. So there is no
155
00:11:41,760 --> 00:11:45,640
unit. You cannot say 0.8 kilogram per year or
156
00:11:45,640 --> 00:11:51,040
whatever it is. So just 0.8. So the first feature
157
00:11:51,040 --> 00:11:53,360
of the correlation coefficient is unity-free.
158
00:11:54,180 --> 00:11:56,340
Number two ranges between negative one and plus
159
00:11:56,340 --> 00:12:00,380
one. So R is always, or rho, is always between
160
00:12:00,380 --> 00:12:04,560
minus one and plus one. So minus one smaller than
161
00:12:04,560 --> 00:12:07,340
or equal to R smaller than or equal to plus one.
162
00:12:07,420 --> 00:12:11,420
So R is always in this range. So R cannot be
163
00:12:11,420 --> 00:12:15,260
smaller than negative one or greater than plus
164
00:12:15,260 --> 00:12:20,310
one. The closer to minus one or negative one, the
165
00:12:20,310 --> 00:12:23,130
stronger negative relationship between or linear
166
00:12:23,130 --> 00:12:26,770
relationship between x and y. So, for example, if
167
00:12:26,770 --> 00:12:33,370
R is negative 0.85 or R is negative 0.8. Now, this
168
00:12:33,370 --> 00:12:39,690
value is closer to minus one than negative 0.8. So
169
00:12:39,690 --> 00:12:43,230
negative 0.85 is stronger than negative 0.8.
170
00:12:44,590 --> 00:12:48,470
Because we are looking for closer to minus 1.
171
00:12:49,570 --> 00:12:55,310
Minus 0.8, the value itself is greater than minus
172
00:12:55,310 --> 00:12:59,610
0.85. But this value is closer to minus 1 than
173
00:12:59,610 --> 00:13:03,790
minus 0.8. So we can say that this relationship is
174
00:13:03,790 --> 00:13:05,070
stronger than the other one.
175
00:13:07,870 --> 00:13:11,730
Also, the closer to plus 1, the stronger the
176
00:13:11,730 --> 00:13:16,040
positive linear relationship. Here, suppose R is 0
177
00:13:16,040 --> 00:13:22,740
.7 and another R is 0.8. 0.8 is closer to plus one
178
00:13:22,740 --> 00:13:26,740
than 0.7, so 0.8 is stronger. This one makes
179
00:13:26,740 --> 00:13:31,800
sense. The closer to zero, the weaker relationship
180
00:13:31,800 --> 00:13:35,420
between the two variables. For example, suppose R
181
00:13:35,420 --> 00:13:40,720
is plus or minus 0.05. This value is very close to
182
00:13:40,720 --> 00:13:44,420
zero. It means there exists weak. relationship.
183
00:13:44,980 --> 00:13:47,960
Sometimes we can say that there exists moderate
184
00:13:47,960 --> 00:13:57,080
relationship if R is close to 0.5. So it could be
185
00:13:57,080 --> 00:14:01,360
classified into these groups closer to minus 1,
186
00:14:01,500 --> 00:14:06,220
closer to 1, 0.5 or 0. So we can know the
187
00:14:06,220 --> 00:14:11,680
direction by the sign of R negative it means
188
00:14:11,680 --> 00:14:14,320
because here our ranges as we mentioned between
189
00:14:14,320 --> 00:14:19,520
minus one and plus one here zero so this these
190
00:14:19,520 --> 00:14:24,560
values it means there exists negative above zero
191
00:14:24,560 --> 00:14:26,760
all the way up to one it means there exists
192
00:14:26,760 --> 00:14:31,020
positive relationship between the two variables so
193
00:14:31,020 --> 00:14:35,520
the sign gives the direction of the relationship
194
00:14:36,720 --> 00:14:40,840
The absolute value gives the strength of the
195
00:14:40,840 --> 00:14:43,500
relationship between the two variables. So the
196
00:14:43,500 --> 00:14:49,260
same as we had discussed before. Now, some types
197
00:14:49,260 --> 00:14:51,880
of scatter plots for different types of
198
00:14:51,880 --> 00:14:54,740
relationship between the two variables is
199
00:14:54,740 --> 00:14:59,100
presented in this slide. For example, if you look
200
00:14:59,100 --> 00:15:03,940
carefully at figure one here, sharp one, this one,
201
00:15:04,720 --> 00:15:13,020
and the other one, In each one, all points are
202
00:15:13,020 --> 00:15:15,820
on the straight line, it means they exist perfect.
203
00:15:16,840 --> 00:15:21,720
So if all points fall exactly on the straight
204
00:15:21,720 --> 00:15:24,220
line, it means they exist perfect.
205
00:15:31,400 --> 00:15:35,160
Here there exists perfect negative. So this is
206
00:15:35,160 --> 00:15:37,740
perfect negative relationship. The other one
207
00:15:37,740 --> 00:15:41,240
perfect positive relationship. In reality you will
208
00:15:41,240 --> 00:15:45,680
never see something
209
00:15:45,680 --> 00:15:49,380
like perfect positive or perfect negative. Maybe
210
00:15:49,380 --> 00:15:53,270
in real situation. In real situation, most of the
211
00:15:53,270 --> 00:15:56,730
time, R is close to 0.9 or 0.85 or something like
212
00:15:56,730 --> 00:16:02,070
that, but it's not exactly equal one. Because
213
00:16:02,070 --> 00:16:05,330
equal one, it means if you know the value of a
214
00:16:05,330 --> 00:16:08,630
child's age, then you can predict the exact
215
00:16:08,630 --> 00:16:13,510
weight. And that never happened. If the data looks
216
00:16:13,510 --> 00:16:18,770
like this table, for example. Suppose here we have
217
00:16:18,770 --> 00:16:25,750
age and weight. H1 for example 3, 5, 7 weight for
218
00:16:25,750 --> 00:16:32,450
example 10, 12, 14, 16 in this case they exist
219
00:16:32,450 --> 00:16:37,610
perfect because x increases by 2 units also
220
00:16:37,610 --> 00:16:41,910
weights increases by 2 units or maybe weights for
221
00:16:41,910 --> 00:16:50,180
example 9, 12, 15, 18 and so on So X or A is
222
00:16:50,180 --> 00:16:53,260
increased by two units for each value for each
223
00:16:53,260 --> 00:16:58,860
individual and also weights are increased by three
224
00:16:58,860 --> 00:17:03,080
units for each person. In this case there exists
225
00:17:03,080 --> 00:17:06,820
perfect relationship but that never happened in
226
00:17:06,820 --> 00:17:13,300
real life. So perfect means all points are lie on
227
00:17:13,300 --> 00:17:16,260
the straight line otherwise if the points are
228
00:17:16,260 --> 00:17:21,230
close Then we can say there exists strong. Here if
229
00:17:21,230 --> 00:17:24,750
you look carefully at these points corresponding
230
00:17:24,750 --> 00:17:30,150
to this regression line, it looks like not strong
231
00:17:30,150 --> 00:17:32,630
because some of the points are not closed, so you
232
00:17:32,630 --> 00:17:35,450
can say there exists maybe moderate negative
233
00:17:35,450 --> 00:17:39,530
relationship. This one, most of the points are
234
00:17:39,530 --> 00:17:42,390
scattered away from the straight line, so there
235
00:17:42,390 --> 00:17:46,930
exists weak relationship. So by just looking at
236
00:17:46,930 --> 00:17:50,290
the scatter path, sometimes you can, sometimes
237
00:17:50,290 --> 00:17:53,290
it's hard to tell, but most of the time you can
238
00:17:53,290 --> 00:17:58,250
tell at least the direction, positive or negative,
239
00:17:59,410 --> 00:18:04,150
the form, linear or non-linear, or the strength of
240
00:18:04,150 --> 00:18:09,100
the relationship. The last one here, now x
241
00:18:09,100 --> 00:18:13,800
increases, y remains the same. For example,
242
00:18:13,880 --> 00:18:18,580
suppose x is 1, y is 10. x increases to 2, y still
243
00:18:18,580 --> 00:18:22,220
is 10. So as x increases, y stays the same
244
00:18:22,220 --> 00:18:26,140
position, it means there is no linear relationship
245
00:18:26,140 --> 00:18:28,900
between the two variables. So based on the scatter
246
00:18:28,900 --> 00:18:33,240
plot you can have an idea about the relationship
247
00:18:33,240 --> 00:18:37,800
between the two variables. Here I will give a
248
00:18:37,800 --> 00:18:41,120
simple example in order to determine the
249
00:18:41,120 --> 00:18:45,160
correlation coefficient. A real estate agent
250
00:18:45,160 --> 00:18:50,380
wishes to examine the relationship between selling
251
00:18:50,380 --> 00:18:54,580
the price of a home and its size measured in
252
00:18:54,580 --> 00:18:57,140
square feet. So in this case, there are two
253
00:18:57,140 --> 00:19:02,400
variables of interest. One is called selling price
254
00:19:02,400 --> 00:19:13,720
of a home. So here, selling price of a home and
255
00:19:13,720 --> 00:19:18,020
its size. Now, selling price in $1,000.
256
00:19:25,360 --> 00:19:29,380
And size in feet squared. Here we have to
257
00:19:29,380 --> 00:19:35,640
distinguish between dependent and independent. So
258
00:19:35,640 --> 00:19:39,740
your dependent variable is house price, sometimes
259
00:19:39,740 --> 00:19:41,620
called response variable.
260
00:19:45,750 --> 00:19:49,490
The independent variable is the size, which is in
261
00:19:49,490 --> 00:19:54,570
square feet, sometimes called sub-planetary
262
00:19:54,570 --> 00:19:54,850
variable.
263
00:19:59,570 --> 00:20:06,370
So my Y is ceiling rise, and size is square feet,
264
00:20:07,530 --> 00:20:12,910
or size of the house. In this case, there are 10.
265
00:20:14,290 --> 00:20:17,890
It's sample size is 10. So the first house with
266
00:20:17,890 --> 00:20:26,850
size 1,400 square feet, it's selling price is 245
267
00:20:26,850 --> 00:20:31,670
multiplied by 1,000. Because these values are in
268
00:20:31,670 --> 00:20:37,950
$1,000. Now based on this data, you can first plot
269
00:20:37,950 --> 00:20:46,590
the scatterplot of house price In Y direction, the
270
00:20:46,590 --> 00:20:51,870
vertical direction. So here is house. And rise.
271
00:20:54,230 --> 00:21:01,470
And size in the X axis. You will get this scatter
272
00:21:01,470 --> 00:21:07,370
plot. Now, the data here is just 10 points, so
273
00:21:07,370 --> 00:21:12,590
sometimes it's hard to tell. the relationship
274
00:21:12,590 --> 00:21:15,510
between the two variables if your data is small.
275
00:21:16,510 --> 00:21:21,170
But just this example for illustration. But at
276
00:21:21,170 --> 00:21:25,370
least you can determine that there exists linear
277
00:21:25,370 --> 00:21:28,810
relationship between the two variables. It is
278
00:21:28,810 --> 00:21:35,490
positive. So the form is linear. Direction is
279
00:21:35,490 --> 00:21:41,880
positive. Weak or strong or moderate. Sometimes
280
00:21:41,880 --> 00:21:45,620
it's not easy to tell if it is strong or moderate.
281
00:21:47,720 --> 00:21:50,120
Now if you look at these points, some of them are
282
00:21:50,120 --> 00:21:53,700
close to the straight line and others are away
283
00:21:53,700 --> 00:21:56,700
from the straight line. So maybe there exists
284
00:21:56,700 --> 00:22:02,720
moderate for example, but you cannot say strong.
285
00:22:03,930 --> 00:22:08,210
Here, strong it means the points are close to the
286
00:22:08,210 --> 00:22:11,890
straight line. Sometimes it's hard to tell the
287
00:22:11,890 --> 00:22:15,230
strength of the relationship, but you can know the
288
00:22:15,230 --> 00:22:20,990
form or the direction. But to measure the exact
289
00:22:20,990 --> 00:22:24,130
strength, you have to measure the correlation
290
00:22:24,130 --> 00:22:29,810
coefficient, R. Now, by looking at the data, you
291
00:22:29,810 --> 00:22:31,430
can compute
292
00:22:33,850 --> 00:22:42,470
The sum of x values, y values, sum of x squared,
293
00:22:43,290 --> 00:22:48,170
sum of y squared, also sum of xy. Now plug these
294
00:22:48,170 --> 00:22:50,610
values into the formula we have for the shortcut
295
00:22:50,610 --> 00:22:58,210
formula. You will get R to be 0.76 around 76.
296
00:23:04,050 --> 00:23:10,170
So there exists positive, moderate relationship
297
00:23:10,170 --> 00:23:13,770
between selling
298
00:23:13,770 --> 00:23:19,850
price of a home and its size. So that means if the
299
00:23:19,850 --> 00:23:24,670
size increases, the selling price also increases.
300
00:23:25,310 --> 00:23:29,550
So there exists positive relationship between the
301
00:23:29,550 --> 00:23:30,310
two variables.
302
00:23:35,800 --> 00:23:40,300
Strong it means close to 1, 0.8, 0.85, 0.9, you
303
00:23:40,300 --> 00:23:44,400
can say there exists strong. But fields is not
304
00:23:44,400 --> 00:23:47,960
strong relationship, you can say it's moderate
305
00:23:47,960 --> 00:23:53,440
relationship. Because it's close if now if you
306
00:23:53,440 --> 00:23:57,080
just compare this value and other data gives 9%.
307
00:23:58,830 --> 00:24:03,790
Other one gives 85%. So these values are much
308
00:24:03,790 --> 00:24:08,550
closer to 1 than 0.7, but still this value is
309
00:24:08,550 --> 00:24:09,570
considered to be high.
310
00:24:15,710 --> 00:24:16,810
Any question?
311
00:24:19,850 --> 00:24:22,810
Next, I will give some introduction to regression
312
00:24:22,810 --> 00:24:23,390
analysis.
313
00:24:26,970 --> 00:24:32,210
regression analysis used to number one, predict
314
00:24:32,210 --> 00:24:35,050
the value of a dependent variable based on the
315
00:24:35,050 --> 00:24:39,250
value of at least one independent variable. So by
316
00:24:39,250 --> 00:24:42,490
using the data we have for selling price of a home
317
00:24:42,490 --> 00:24:48,370
and size, you can predict the selling price by
318
00:24:48,370 --> 00:24:51,510
knowing the value of its size. So suppose for
319
00:24:51,510 --> 00:24:54,870
example, You know that the size of a house is
320
00:24:54,870 --> 00:25:03,510
1450, 1450 square feet. What do you predict its
321
00:25:03,510 --> 00:25:10,190
size, its sale or price? So by using this value,
322
00:25:10,310 --> 00:25:16,510
we can predict the selling price. Next, explain
323
00:25:16,510 --> 00:25:19,890
the impact of changes in independent variable on
324
00:25:19,890 --> 00:25:23,270
the dependent variable. You can say, for example,
325
00:25:23,510 --> 00:25:30,650
90% of the variability in the dependent variable
326
00:25:30,650 --> 00:25:36,790
in selling price is explained by its size. So we
327
00:25:36,790 --> 00:25:39,410
can predict the value of dependent variable based
328
00:25:39,410 --> 00:25:42,890
on a value of one independent variable at least.
329
00:25:43,870 --> 00:25:47,090
Or also explain the impact of changes in
330
00:25:47,090 --> 00:25:49,550
independent variable on the dependent variable.
331
00:25:51,420 --> 00:25:53,920
Sometimes there exists more than one independent
332
00:25:53,920 --> 00:25:59,680
variable. For example, maybe there are more than
333
00:25:59,680 --> 00:26:04,500
one variable that affects a price, a selling
334
00:26:04,500 --> 00:26:10,300
price. For example, beside selling
335
00:26:10,300 --> 00:26:16,280
price, beside size, maybe location.
336
00:26:19,480 --> 00:26:23,580
Maybe location is also another factor that affects
337
00:26:23,580 --> 00:26:27,360
the selling price. So in this case there are two
338
00:26:27,360 --> 00:26:32,240
variables. If there exists more than one variable,
339
00:26:32,640 --> 00:26:36,080
in this case we have something called multiple
340
00:26:36,080 --> 00:26:38,680
linear regression.
341
00:26:42,030 --> 00:26:46,710
Here, we just talk about one independent variable.
342
00:26:47,030 --> 00:26:51,610
There is only, in this chapter, there is only one
343
00:26:51,610 --> 00:26:58,330
x. So it's called simple linear
344
00:26:58,330 --> 00:26:59,330
regression.
345
00:27:02,190 --> 00:27:07,930
The calculations for multiple takes time. So we
346
00:27:07,930 --> 00:27:11,430
are going just to cover one independent variable.
347
00:27:11,930 --> 00:27:14,290
But if there exists more than one, in this case
348
00:27:14,290 --> 00:27:18,250
you have to use some statistical software as SPSS.
349
00:27:18,470 --> 00:27:23,390
Because in that case you can just select a
350
00:27:23,390 --> 00:27:25,970
regression analysis from SPSS, then you can run
351
00:27:25,970 --> 00:27:28,590
the multiple regression without doing any
352
00:27:28,590 --> 00:27:34,190
computations. But here we just covered one
353
00:27:34,190 --> 00:27:36,820
independent variable. In this case, it's called
354
00:27:36,820 --> 00:27:41,980
simple linear regression. Again, the dependent
355
00:27:41,980 --> 00:27:44,600
variable is the variable we wish to predict or
356
00:27:44,600 --> 00:27:50,020
explain, the same as weight. Independent variable,
357
00:27:50,180 --> 00:27:52,440
the variable used to predict or explain the
358
00:27:52,440 --> 00:27:54,000
dependent variable.
359
00:27:57,400 --> 00:28:00,540
For simple linear regression model, there is only
360
00:28:00,540 --> 00:28:01,800
one independent variable.
361
00:28:04,830 --> 00:28:08,450
Another example for simple linear regression.
362
00:28:08,770 --> 00:28:11,590
Suppose we are talking about your scores.
363
00:28:14,210 --> 00:28:17,770
Scores is the dependent variable can be affected
364
00:28:17,770 --> 00:28:21,050
by number of hours.
365
00:28:25,130 --> 00:28:31,030
Hour of study. Number of studying hours.
366
00:28:36,910 --> 00:28:39,810
Maybe as number of studying hour increases, your
367
00:28:39,810 --> 00:28:43,390
scores also increase. In this case, if there is
368
00:28:43,390 --> 00:28:46,330
only one X, one independent variable, it's called
369
00:28:46,330 --> 00:28:51,110
simple linear regression. Maybe another variable,
370
00:28:52,270 --> 00:28:59,730
number of missing classes or
371
00:28:59,730 --> 00:29:03,160
attendance. As number of missing classes
372
00:29:03,160 --> 00:29:06,380
increases, your score goes down. That means there
373
00:29:06,380 --> 00:29:09,400
exists negative relationship between missing
374
00:29:09,400 --> 00:29:13,540
classes and your score. So sometimes, maybe there
375
00:29:13,540 --> 00:29:16,580
exists positive or negative. It depends on the
376
00:29:16,580 --> 00:29:20,040
variable itself. In this case, if there are more
377
00:29:20,040 --> 00:29:23,180
than one variable, then we are talking about
378
00:29:23,180 --> 00:29:28,300
multiple linear regression model. But here, we
379
00:29:28,300 --> 00:29:33,630
have only one independent variable. In addition to
380
00:29:33,630 --> 00:29:37,230
that, a relationship between x and y is described
381
00:29:37,230 --> 00:29:40,850
by a linear function. So there exists a straight
382
00:29:40,850 --> 00:29:46,270
line between the two variables. The changes in y
383
00:29:46,270 --> 00:29:50,210
are assumed to be related to changes in x only. So
384
00:29:50,210 --> 00:29:54,270
any change in y is related only to changes in x.
385
00:29:54,730 --> 00:29:57,810
So that's the simple case we have for regression,
386
00:29:58,890 --> 00:30:01,170
that we have only one independent
387
00:30:03,890 --> 00:30:07,070
Variable. Types of relationships, as we mentioned,
388
00:30:07,210 --> 00:30:12,190
maybe there exist linear, it means there exist
389
00:30:12,190 --> 00:30:16,490
straight line between X and Y, either linear
390
00:30:16,490 --> 00:30:22,050
positive or negative, or sometimes there exist non
391
00:30:22,050 --> 00:30:25,830
-linear relationship, it's called curved linear
392
00:30:25,830 --> 00:30:29,290
relationship. The same as this one, it's parabola.
393
00:30:32,570 --> 00:30:35,150
Now in this case there is no linear relationship
394
00:30:35,150 --> 00:30:39,690
but there exists curved linear or something like
395
00:30:39,690 --> 00:30:45,910
this one. So these types of non-linear
396
00:30:45,910 --> 00:30:49,530
relationship between the two variables. Here we
397
00:30:49,530 --> 00:30:54,070
are covering just the linear relationship between
398
00:30:54,070 --> 00:30:56,570
the two variables. So based on the scatter plot
399
00:30:56,570 --> 00:31:00,620
you can determine the direction. The form, the
400
00:31:00,620 --> 00:31:03,860
strength. Here, the form we are talking about is
401
00:31:03,860 --> 00:31:04,720
just linear.
402
00:31:08,700 --> 00:31:13,260
Now, another type of relationship, the strength of
403
00:31:13,260 --> 00:31:16,940
the relationship. Here, the points, either for
404
00:31:16,940 --> 00:31:20,570
this graph or the other one, These points are
405
00:31:20,570 --> 00:31:24,570
close to the straight line, it means there exists
406
00:31:24,570 --> 00:31:28,210
strong positive relationship or strong negative
407
00:31:28,210 --> 00:31:31,230
relationship. So it depends on the direction. So
408
00:31:31,230 --> 00:31:35,710
strong either positive or strong negative. Here
409
00:31:35,710 --> 00:31:38,850
the points are scattered away from the regression
410
00:31:38,850 --> 00:31:41,790
line, so you can say there exists weak
411
00:31:41,790 --> 00:31:45,090
relationship, either weak positive or weak
412
00:31:45,090 --> 00:31:49,650
negative. It depends on the direction of the
413
00:31:49,650 --> 00:31:54,270
relationship between the two variables. Sometimes
414
00:31:54,270 --> 00:31:59,680
there is no relationship or actually there is no
415
00:31:59,680 --> 00:32:02,340
linear relationship between the two variables. If
416
00:32:02,340 --> 00:32:05,660
the points are scattered away from the regression
417
00:32:05,660 --> 00:32:09,800
line, I mean you cannot determine if it is
418
00:32:09,800 --> 00:32:13,160
positive or negative, then there is no
419
00:32:13,160 --> 00:32:16,220
relationship between the two variables, the same
420
00:32:16,220 --> 00:32:20,580
as this one. X increases, Y stays nearly in the
421
00:32:20,580 --> 00:32:24,540
same position, then there exists no relationship
422
00:32:24,540 --> 00:32:29,280
between the two variables. So, a relationship
423
00:32:29,280 --> 00:32:32,740
could be linear or curvilinear. It could be
424
00:32:32,740 --> 00:32:37,280
positive or negative, strong or weak, or sometimes
425
00:32:37,280 --> 00:32:41,680
there is no relationship between the two
426
00:32:41,680 --> 00:32:49,200
variables. Now the question is, how can we write
427
00:32:51,250 --> 00:32:55,290
Or how can we find the best regression line that
428
00:32:55,290 --> 00:32:59,570
fits the data you have? We know the regression is
429
00:32:59,570 --> 00:33:06,270
the straight line equation is given by this one. Y
430
00:33:06,270 --> 00:33:20,130
equals beta 0 plus beta 1x plus epsilon. This can
431
00:33:20,130 --> 00:33:21,670
be pronounced as epsilon.
432
00:33:24,790 --> 00:33:29,270
It's a great letter, the same as alpha, beta, mu,
433
00:33:29,570 --> 00:33:35,150
sigma, and so on. So it's epsilon. I, it means
434
00:33:35,150 --> 00:33:39,250
observation number I. I 1, 2, 3, up to 10, for
435
00:33:39,250 --> 00:33:42,710
example, is the same for selling price of a home.
436
00:33:43,030 --> 00:33:46,970
So I 1, 2, 3, all the way up to the sample size.
437
00:33:48,370 --> 00:33:54,830
Now, Y is your dependent variable. Beta 0 is
438
00:33:54,830 --> 00:33:59,810
population Y intercept. For example, if we have
439
00:33:59,810 --> 00:34:00,730
this scatter plot.
440
00:34:04,010 --> 00:34:10,190
Now, beta 0 is
441
00:34:10,190 --> 00:34:15,370
this one. So this is your beta 0. So this segment
442
00:34:15,370 --> 00:34:21,550
is beta 0. it could be above the x-axis I mean
443
00:34:21,550 --> 00:34:34,890
beta zero could be positive might be negative now
444
00:34:34,890 --> 00:34:40,270
this beta zero fall below the x-axis so beta zero
445
00:34:40,270 --> 00:34:43,850
could be negative or
446
00:34:46,490 --> 00:34:49,350
Maybe the straight line passes through the origin
447
00:34:49,350 --> 00:34:56,990
point. So in this case, beta zero equals zero. So
448
00:34:56,990 --> 00:34:59,890
it could be positive and negative or equal zero,
449
00:35:00,430 --> 00:35:05,510
but still we have positive relationship. That
450
00:35:05,510 --> 00:35:09,970
means The value of beta zero, the sign of beta
451
00:35:09,970 --> 00:35:13,310
zero does not affect the relationship between Y
452
00:35:13,310 --> 00:35:17,850
and X. Because here in the three cases, there
453
00:35:17,850 --> 00:35:22,390
exists positive relationship, but beta zero could
454
00:35:22,390 --> 00:35:25,370
be positive or negative or equal zero, but still
455
00:35:25,370 --> 00:35:31,720
we have positive relationship. I mean, you cannot
456
00:35:31,720 --> 00:35:35,060
determine by looking at beta 0, you cannot
457
00:35:35,060 --> 00:35:37,940
determine if there is a positive or negative
458
00:35:37,940 --> 00:35:41,720
relationship. The other term is beta 1. Beta 1 is
459
00:35:41,720 --> 00:35:46,900
the population slope coefficient. Now, the sign of
460
00:35:46,900 --> 00:35:50,010
the slope determines the direction of the
461
00:35:50,010 --> 00:35:54,090
relationship. That means if the slope has positive
462
00:35:54,090 --> 00:35:56,570
sign, it means there exists positive relationship.
463
00:35:57,330 --> 00:35:59,370
Otherwise if it is negative, then there is
464
00:35:59,370 --> 00:36:01,390
negative relationship between the two variables.
465
00:36:02,130 --> 00:36:05,310
So the sign of the slope determines the direction.
466
00:36:06,090 --> 00:36:11,290
But the sign of beta zero has no meaning about the
467
00:36:11,290 --> 00:36:15,470
relationship between Y and X. X is your
468
00:36:15,470 --> 00:36:19,630
independent variable, Y is your independent
469
00:36:19,630 --> 00:36:19,650
your independent variable, Y is your independent
470
00:36:19,650 --> 00:36:21,250
variable, Y is your independent variable, Y is
471
00:36:21,250 --> 00:36:24,370
variable, Y is your independent variable, Y is
472
00:36:24,370 --> 00:36:24,430
variable, Y is your independent variable, Y is
473
00:36:24,430 --> 00:36:24,770
your independent variable, Y is your independent
474
00:36:24,770 --> 00:36:27,490
variable, Y is your independent variable, Y is
475
00:36:27,490 --> 00:36:30,110
your independent variable, Y is your It means
476
00:36:30,110 --> 00:36:32,450
there are some errors you don't know about it
477
00:36:32,450 --> 00:36:36,130
because you ignore some other variables that may
478
00:36:36,130 --> 00:36:39,410
affect the selling price. Maybe you select a
479
00:36:39,410 --> 00:36:42,490
random sample, that sample is small. Maybe there
480
00:36:42,490 --> 00:36:46,270
is a random, I'm sorry, there is sampling error.
481
00:36:47,070 --> 00:36:52,980
So all of these are called random error term. So
482
00:36:52,980 --> 00:36:57,420
all of them are in this term. So epsilon I means
483
00:36:57,420 --> 00:37:00,340
something you don't include in your regression
484
00:37:00,340 --> 00:37:03,280
modeling. For example, you don't include all the
485
00:37:03,280 --> 00:37:06,180
independent variables that affect Y, or your
486
00:37:06,180 --> 00:37:09,700
sample size is not large enough. So all of these
487
00:37:09,700 --> 00:37:14,260
measured in random error term. So epsilon I is
488
00:37:14,260 --> 00:37:18,840
random error component, beta 0 plus beta 1X is
489
00:37:18,840 --> 00:37:25,070
called linear component. So that's the simple
490
00:37:25,070 --> 00:37:31,430
linear regression model. Now, the data you have,
491
00:37:32,850 --> 00:37:38,210
the blue circles represent the observed value. So
492
00:37:38,210 --> 00:37:47,410
these blue circles are the observed values. So we
493
00:37:47,410 --> 00:37:49,370
have observed.
494
00:37:52,980 --> 00:37:57,940
Y observed value of Y for each value X. The
495
00:37:57,940 --> 00:38:03,360
regression line is the blue, the red one. It's
496
00:38:03,360 --> 00:38:07,560
called the predicted values. Predicted Y.
497
00:38:08,180 --> 00:38:14,760
Predicted Y is denoted always by Y hat. Now the
498
00:38:14,760 --> 00:38:19,740
difference between Y and Y hat. It's called the
499
00:38:19,740 --> 00:38:20,200
error term.
500
00:38:24,680 --> 00:38:28,000
It's actually the difference between the observed
501
00:38:28,000 --> 00:38:31,600
value and its predicted value. Now, the predicted
502
00:38:31,600 --> 00:38:34,720
value can be determined by using the regression
503
00:38:34,720 --> 00:38:39,180
line. So this line is the predicted value of Y for
504
00:38:39,180 --> 00:38:44,480
XR. Again, beta zero is the intercept. As we
505
00:38:44,480 --> 00:38:46,260
mentioned before, it could be positive or negative
506
00:38:46,260 --> 00:38:52,600
or even equal zero. The slope is changing Y.
507
00:38:55,140 --> 00:38:57,580
Divide by change of x.
508
00:39:01,840 --> 00:39:07,140
So these are the components for the simple linear
509
00:39:07,140 --> 00:39:10,840
regression model. Y again represents the
510
00:39:10,840 --> 00:39:14,960
independent variable. Beta 0 y intercept. Beta 1
511
00:39:14,960 --> 00:39:17,960
is your slope. And the slope determines the
512
00:39:17,960 --> 00:39:20,900
direction of the relationship. X independent
513
00:39:20,900 --> 00:39:25,270
variable epsilon i is the random error term. Any
514
00:39:25,270 --> 00:39:25,650
question?
515
00:39:31,750 --> 00:39:36,610
The relationship may be positive or negative. It
516
00:39:36,610 --> 00:39:37,190
could be negative.
517
00:39:40,950 --> 00:39:42,710
Now, for negative relationship,
518
00:39:57,000 --> 00:40:04,460
Or negative, where beta zero is negative.
519
00:40:04,520 --> 00:40:08,700
Or beta
520
00:40:08,700 --> 00:40:09,740
zero equals zero.
521
00:40:16,680 --> 00:40:20,620
So here there exists negative relationship, but
522
00:40:20,620 --> 00:40:22,060
beta zero may be positive.
523
00:40:25,870 --> 00:40:30,210
So again, the sign of beta 0 also does not affect
524
00:40:30,210 --> 00:40:31,990
the relationship between the two variables.
525
00:40:36,230 --> 00:40:40,590
Now, we don't actually know the values of beta 0
526
00:40:40,590 --> 00:40:44,510
and beta 1. We are going to estimate these values
527
00:40:44,510 --> 00:40:48,110
from the sample we have. So the simple linear
528
00:40:48,110 --> 00:40:50,970
regression equation provides an estimate of the
529
00:40:50,970 --> 00:40:55,270
population regression line. So here we have Yi hat
530
00:40:55,270 --> 00:41:00,010
is the estimated or predicted Y value for
531
00:41:00,010 --> 00:41:00,850
observation I.
532
00:41:03,530 --> 00:41:08,220
The estimate of the regression intercept P0. The
533
00:41:08,220 --> 00:41:11,360
estimate of the regression slope is b1, and this
534
00:41:11,360 --> 00:41:16,680
is your x, all independent variable. So here is
535
00:41:16,680 --> 00:41:20,340
the regression equation. Simple linear regression
536
00:41:20,340 --> 00:41:24,400
equation is given by y hat, the predicted value of
537
00:41:24,400 --> 00:41:29,380
y equals b0 plus b1 times x1.
538
00:41:31,240 --> 00:41:35,960
Now these coefficients, b0 and b1 can be computed
539
00:41:37,900 --> 00:41:43,040
by the following equations. So the regression
540
00:41:43,040 --> 00:41:52,920
equation is
541
00:41:52,920 --> 00:41:57,260
given by y hat equals b0 plus b1x.
542
00:41:59,940 --> 00:42:06,140
Now the slope, b1, is r times standard deviation
543
00:42:06,140 --> 00:42:10,540
of y Times standard deviation of x. This is the
544
00:42:10,540 --> 00:42:13,820
simplest equation to determine the value of the
545
00:42:13,820 --> 00:42:18,980
star. B1r, r is the correlation coefficient. Sy is
546
00:42:18,980 --> 00:42:25,080
xr, the standard deviations of y and x. Where b0,
547
00:42:25,520 --> 00:42:30,880
which is y intercept, is y bar minus b x bar, or
548
00:42:30,880 --> 00:42:38,100
b1 x bar. Sx, as we know, is the sum of x minus y
549
00:42:38,100 --> 00:42:40,460
squared divided by n minus 1 under square root,
550
00:42:40,900 --> 00:42:47,060
similarly for y values. So this, how can we, these
551
00:42:47,060 --> 00:42:52,380
formulas compute the values of b0 and b1. So we
552
00:42:52,380 --> 00:42:54,600
are going to use these equations in order to
553
00:42:54,600 --> 00:42:58,960
determine the values of b0 and b1.
554
00:43:04,670 --> 00:43:07,710
Now, what's your interpretation about the slope
555
00:43:07,710 --> 00:43:13,130
and the intercept? For example, suppose we are
556
00:43:13,130 --> 00:43:18,610
talking about your score Y and
557
00:43:18,610 --> 00:43:22,110
X number of missing classes.
558
00:43:29,210 --> 00:43:35,460
And suppose, for example, Y hat Equal 95 minus 5x.
559
00:43:37,780 --> 00:43:41,420
Now let's see what's the interpretation of B0.
560
00:43:42,300 --> 00:43:45,060
This is B0. So B0 is 95.
561
00:43:47,660 --> 00:43:51,960
And B1 is 5. Now what's your interpretation about
562
00:43:51,960 --> 00:43:57,740
B0 and B1? B0 is the estimated mean value of Y
563
00:43:57,740 --> 00:44:02,560
when the value of X is 0. that means if the
564
00:44:02,560 --> 00:44:08,500
student does not miss any class that means x
565
00:44:08,500 --> 00:44:13,260
equals zero in this case we predict or we estimate
566
00:44:13,260 --> 00:44:19,880
the mean value of his score or her score is 95 so
567
00:44:19,880 --> 00:44:27,500
95 it means when x is zero if x is zero then we
568
00:44:27,500 --> 00:44:35,350
expect his or Here, the score is 95. So that means
569
00:44:35,350 --> 00:44:39,830
B0 is the estimated mean value of Y when the value
570
00:44:39,830 --> 00:44:40,630
of X is 0.
571
00:44:43,370 --> 00:44:46,590
Now, what's the meaning of the slope? The slope in
572
00:44:46,590 --> 00:44:51,290
this case is negative Y. B1, which is the slope,
573
00:44:51,590 --> 00:44:57,610
is the estimated change in the mean of Y. as a
574
00:44:57,610 --> 00:45:03,050
result of a one unit change in x for example let's
575
00:45:03,050 --> 00:45:07,070
compute y for different values of x suppose x is
576
00:45:07,070 --> 00:45:15,510
one now we predict his score to be 95 minus 5
577
00:45:15,510 --> 00:45:25,470
times 1 which is 90 when x is 2 for example Y hat
578
00:45:25,470 --> 00:45:28,570
is 95 minus 5 times 2, so that's 85.
579
00:45:31,950 --> 00:45:39,970
So for each one unit, there is a drop by five
580
00:45:39,970 --> 00:45:43,750
units in his score. That means if number of
581
00:45:43,750 --> 00:45:47,550
missing classes increases by one unit, then his or
582
00:45:47,550 --> 00:45:51,790
her weight is expected to be reduced by five units
583
00:45:51,790 --> 00:45:56,150
because the sign is negative. another example
584
00:45:56,150 --> 00:46:05,910
suppose again we are interested in whales and
585
00:46:05,910 --> 00:46:16,170
angels and imagine that just
586
00:46:16,170 --> 00:46:21,670
for example y equal y hat equals three plus four x
587
00:46:21,670 --> 00:46:29,830
now y hat equals 3 if x equals zero. That has no
588
00:46:29,830 --> 00:46:34,510
meaning because you cannot say age of zero. So
589
00:46:34,510 --> 00:46:40,450
sometimes the meaning of y intercept does not make
590
00:46:40,450 --> 00:46:46,150
sense because you cannot say x equals zero. Now
591
00:46:46,150 --> 00:46:50,690
for the stock of four, that means as his or her
592
00:46:50,690 --> 00:46:55,550
weight increases by one year, Then we expect his
593
00:46:55,550 --> 00:47:00,470
weight to increase by four kilograms. So as one
594
00:47:00,470 --> 00:47:05,130
unit increase in x, y is our, his weight is
595
00:47:05,130 --> 00:47:10,150
expected to increase by four units. So again,
596
00:47:10,370 --> 00:47:16,950
sometimes we can interpret the y intercept, but in
597
00:47:16,950 --> 00:47:18,670
some cases it has no meaning.
598
00:47:24,970 --> 00:47:27,190
Now for the previous example, for the selling
599
00:47:27,190 --> 00:47:32,930
price of a home and its size, B1rSy divided by Sx,
600
00:47:33,790 --> 00:47:43,550
r is computed, r is found to be 76%, 76%Sy divided
601
00:47:43,550 --> 00:47:49,990
by Sx, that will give 0.109. B0y bar minus B1x
602
00:47:49,990 --> 00:47:50,670
bar,
603
00:47:53,610 --> 00:48:00,150
Y bar for this data is 286 minus D1. So we have to
604
00:48:00,150 --> 00:48:03,490
compute first D1 because we use it in order to
605
00:48:03,490 --> 00:48:08,590
determine D0. And calculation gives 98. So that
606
00:48:08,590 --> 00:48:16,450
means based on these equations, Y hat equals 0
607
00:48:16,450 --> 00:48:22,990
.10977 plus 98.248.
608
00:48:24,790 --> 00:48:29,370
times X. X is the size.
609
00:48:32,890 --> 00:48:39,830
0.1 B1
610
00:48:39,830 --> 00:48:45,310
is
611
00:48:45,310 --> 00:48:56,650
0.1, B0 is 98, so 98.248 plus B1. So this is your
612
00:48:56,650 --> 00:49:03,730
regression equation. So again, the intercept is
613
00:49:03,730 --> 00:49:09,750
98. So this amount, the segment is 98. Now the
614
00:49:09,750 --> 00:49:14,790
slope is 0.109. So house price, the expected value
615
00:49:14,790 --> 00:49:21,270
of house price equals B098 plus 0.109 square feet.
616
00:49:23,150 --> 00:49:27,630
So that's the prediction line for the house price.
617
00:49:28,510 --> 00:49:34,370
So again, house price equal B0 98 plus 0.10977
618
00:49:34,370 --> 00:49:36,930
times square root. Now, what's your interpretation
619
00:49:36,930 --> 00:49:41,950
about B0 and B1? B0 is the estimated mean value of
620
00:49:41,950 --> 00:49:46,430
Y when the value of X is 0. So if X is 0, this
621
00:49:46,430 --> 00:49:52,980
range of X observed X values and you have a home
622
00:49:52,980 --> 00:49:57,860
or a house of size zero. So that means this value
623
00:49:57,860 --> 00:50:02,680
has no meaning. Because a house cannot have a
624
00:50:02,680 --> 00:50:06,400
square footage of zero. So B0 has no practical
625
00:50:06,400 --> 00:50:10,040
application in this case. So sometimes it makes
626
00:50:10,040 --> 00:50:17,620
sense, in other cases it doesn't have that. So for
627
00:50:17,620 --> 00:50:21,790
this specific example, B0 has no practical
628
00:50:21,790 --> 00:50:28,210
application in this case. But B1 which is 0.1097,
629
00:50:28,930 --> 00:50:33,050
B1 estimates the change in the mean value of Y as
630
00:50:33,050 --> 00:50:36,730
a result of one unit increasing X. So for this
631
00:50:36,730 --> 00:50:41,640
value which is 0.109, it means This fellow tells
632
00:50:41,640 --> 00:50:46,420
us that the mean value of a house can increase by
633
00:50:46,420 --> 00:50:52,280
this amount, increase by 0.1097, but we have to
634
00:50:52,280 --> 00:50:55,700
multiply this value by a thousand because the data
635
00:50:55,700 --> 00:51:01,280
was in thousand dollars, so around 109, on average
636
00:51:01,280 --> 00:51:05,160
for each additional one square foot of a size. So
637
00:51:05,160 --> 00:51:09,990
that means if a house So if house size increased
638
00:51:09,990 --> 00:51:14,630
by one square foot, then the price increased by
639
00:51:14,630 --> 00:51:19,530
around 109 dollars. So for each one unit increased
640
00:51:19,530 --> 00:51:22,990
in the size, the selling price of a home increased
641
00:51:22,990 --> 00:51:29,590
by 109. So that means if the size increased by
642
00:51:29,590 --> 00:51:35,860
tenth, It means the selling price increased by
643
00:51:35,860 --> 00:51:39,400
1097
644
00:51:39,400 --> 00:51:46,600
.7. Make sense? So for each one unit increase in
645
00:51:46,600 --> 00:51:50,300
its size, the house selling price increased by
646
00:51:50,300 --> 00:51:55,540
109. So we have to multiply this value by the unit
647
00:51:55,540 --> 00:52:02,280
we have. Because Y was 8000 dollars. Here if you
648
00:52:02,280 --> 00:52:06,600
go back to the previous data we have, the data was
649
00:52:06,600 --> 00:52:11,120
house price wasn't thousand dollars, so we have to
650
00:52:11,120 --> 00:52:15,840
multiply the slope by a thousand.
651
00:52:19,480 --> 00:52:23,720
Now we
652
00:52:23,720 --> 00:52:30,380
can use also the regression equation line to make
653
00:52:30,380 --> 00:52:35,390
some prediction. For example, we can predict the
654
00:52:35,390 --> 00:52:42,290
price of a house with 2000 square feet. You just
655
00:52:42,290 --> 00:52:43,590
plug this value.
656
00:52:46,310 --> 00:52:52,210
So we have 98.25 plus 0.109 times 2000. That will
657
00:52:52,210 --> 00:53:01,600
give the house price. for 2,000 square feet. So
658
00:53:01,600 --> 00:53:05,920
that means the predicted price for a house with 2
659
00:53:05,920 --> 00:53:10,180
,000 square feet is this amount multiplied by 1
660
00:53:10,180 --> 00:53:18,260
,000. So that will give $317,850. So that's how
661
00:53:18,260 --> 00:53:24,240
can we make predictions for why I mean for house
662
00:53:24,240 --> 00:53:29,360
price at any given value of its size. So for this
663
00:53:29,360 --> 00:53:36,020
data, we have a house with 2000 square feet. So we
664
00:53:36,020 --> 00:53:43,180
predict its price to be around 317,850.
665
00:53:44,220 --> 00:53:50,920
I will stop at coefficient of correlation. I will
666
00:53:50,920 --> 00:53:54,190
stop at coefficient of determination for next time
667
00:53:54,190 --> 00:53:57,770
that's
668
00:53:57,770 --> 00:53:57,990
all
|