YouTube2Text

YouTube transcript (Qa2APhWjQPc) — Transcript

4,595 words · 634 segments · language en · Watch on YouTube

Full transcript

  1. 0:02[Music]
  2. 0:17hello thanks for watching and welcome to
  3. 0:20the next video in my series on basic
  4. 0:22statistics now as usual a few things
  5. 0:25before we get started number one if
  6. 0:27you're watching this video because you
  7. 0:28are struggling in a class right now I
  8. 0:31want you to stay positive and keep your
  9. 0:33head up if you're watching this it means
  10. 0:35you've accomplished quite a bit already
  11. 0:37you're very smart and talented but you
  12. 0:39may have just hit a temporary rough
  13. 0:41patch now I know with the right amount
  14. 0:43of hard work practice and patience you
  15. 0:46can work through it I have faith in you
  16. 0:49many other people around you have faith
  17. 0:51in you so so should you number two
  18. 0:55please feel free to follow me here on
  19. 0:57YouTube on Twitter on Google+ or on
  20. 1:01LinkedIn that way when I upload a new
  21. 1:03video you know about it and it's always
  22. 1:06nice to connect with my viewers online I
  23. 1:08feel that life is much too short and the
  24. 1:10world is much too large for us to miss
  25. 1:12the chance to connect when we can number
  26. 1:16three if you like the video please give
  27. 1:18it a thumbs up share it with classmates
  28. 1:21or colleagues or put it on a playlist
  29. 1:23that does encourage me to keep making
  30. 1:25them for you on the flip side if you
  31. 1:27think there's something I can do better
  32. 1:29please leave a con instructive comment
  33. 1:30below the video and I will take those
  34. 1:32ideas into account when I make new ones
  35. 1:36and finally just keep in mind that these
  36. 1:37videos are meant for individuals who are
  37. 1:40relatively new to Stats so I'm just
  38. 1:42going over basic concepts and I will be
  39. 1:45doing so in a slow deliberate manner not
  40. 1:49only do I want you to know what is going
  41. 1:51on but also why and how to apply it so
  42. 1:56all that being said let's go ahead and
  43. 1:58get started
  44. 2:02so this video is the next in our series
  45. 2:03about simple linear regression in our
  46. 2:06last two videos we talked about the very
  47. 2:08basics of regression and introduced
  48. 2:10other basic concepts like the algebra of
  49. 2:12lines and general patterns to look for
  50. 2:14on a scatter plot in this video we're
  51. 2:17going to learn about the fundamental
  52. 2:19Concept in linear regression the least
  53. 2:21squares method we will talk about how
  54. 2:24the least squares method relates to
  55. 2:26previous Concepts we have learned and
  56. 2:28then we will actually use the meth
  57. 2:29method to calculate the least squares
  58. 2:32line or the regression line this video
  59. 2:35will involve formulas and simple
  60. 2:38calculations while you may not have to
  61. 2:39find a simple regression line by hand
  62. 2:41very often it's not that difficult to do
  63. 2:44and this video will at least show you
  64. 2:46how it's done so you understand the
  65. 2:48underlying mechanics so if you are new
  66. 2:51to regression or are still trying to
  67. 2:53figure out exactly what it even is this
  68. 2:55video is for you so sit back relax and
  69. 2:59let's go ahead and get to
  70. 3:03work so in this video we will continue
  71. 3:06to use the previous problem we have used
  72. 3:08in other videos so I'll review it very
  73. 3:11quickly let's assume that you're a small
  74. 3:13restaurant owner or a very
  75. 3:15business-minded server or waiter at a
  76. 3:17nice restaurant here in the US and
  77. 3:20elsewhere tips are a very important part
  78. 3:23of a waiters pay most of the time the
  79. 3:26dollar amount of the tip is related to
  80. 3:29the amount of the total bill so there's
  81. 3:33dependency there as the waiter or owner
  82. 3:36you would like to develop a model that
  83. 3:38will allow you to make a prediction
  84. 3:40about what amount of tip to expect based
  85. 3:43on the bill therefore one evening you
  86. 3:46collect data for six
  87. 3:51meals now in the last video you only had
  88. 3:55the tip data but now you were able to go
  89. 3:58back and get the actual build data as
  90. 4:00well so now you are working with two
  91. 4:03variables that are matched pairs so you
  92. 4:06can see we have six meals over here on
  93. 4:08the right so on the left column we have
  94. 4:10the total bill and then on the right we
  95. 4:13have the tip so for our first meal or
  96. 4:16first table or whatever it was the total
  97. 4:18bill was
  98. 4:18$34 and the tip that went along with it
  99. 4:21was $5 and then the next meal the total
  100. 4:24was
  101. 4:25$18 and then the tip amount was $17 and
  102. 4:28so on and so
  103. 4:30forth now you want to know to what
  104. 4:33degree can the tip amount be predicted
  105. 4:37by the bill amount so in this case the
  106. 4:40tip is the dependent variable so we're
  107. 4:44sort of making a logical claim that the
  108. 4:47tip amount is dependent on the total
  109. 4:51bill amount and it's important to set up
  110. 4:54your variables this way it would not
  111. 4:56make sense to say the total bill amount
  112. 4:59is dependent on the tip amount that's
  113. 5:02reverse so we want to say what's
  114. 5:04actually true sort of in real life that
  115. 5:06the tip amount is dependent on the total
  116. 5:09bill amount so the tip amount is the
  117. 5:11dependent variable and the bill amount
  118. 5:14is the independent
  119. 5:18variable now in a previous video we
  120. 5:20looked at that situation where we only
  121. 5:22had the tip data and what we determined
  122. 5:25in that case where we only have the one
  123. 5:27variable the tip data
  124. 5:30all we could do was use its mean as the
  125. 5:33best predicted value So based on that
  126. 5:36data we found that the mean of the tips
  127. 5:38was
  128. 5:39$10 therefore our best prediction for
  129. 5:43the seventh meal would be $10 that's the
  130. 5:47best we could do so we went ahead and
  131. 5:50plotted our points and we noticed that
  132. 5:52we have a horizontal line of the tip
  133. 5:54amount of $10 that's the black dotted
  134. 5:57line and then we put all of our tips
  135. 5:59tips in relation to that line then we
  136. 6:02found the difference or the distance
  137. 6:04between the line and the tip then we
  138. 6:07squared that difference and then we
  139. 6:09added up all those differences and what
  140. 6:12that gave us are the squared residuals
  141. 6:15or the squared error and then we edit
  142. 6:18them up so the sum of the squared errors
  143. 6:20or the sum of the squared residuals was
  144. 6:23120 now when conducting simple linear
  145. 6:25regression with two variables we will
  146. 6:28determine how good the regression line
  147. 6:30fits the data by comparing it to this
  148. 6:33type literally in this case in this
  149. 6:36problem we're going to compare our
  150. 6:37regression solution to this line where
  151. 6:41we pretend the second variable doesn't
  152. 6:43even exist so remember beta sub one is
  153. 6:46our slope a horizontal line has a slope
  154. 6:50of zero so in this case the line we're
  155. 6:52looking at here our beta sub 1 is zero
  156. 6:56but the whole idea is that when we do
  157. 6:59Reg ression we're going to compare that
  158. 7:01model to this model and hopefully it's
  159. 7:05better and we'll talk about exactly what
  160. 7:07better means as we
  161. 7:09go so what exactly is the least squares
  162. 7:12method well it depends on this general
  163. 7:14idea called the least squares Criterion
  164. 7:16and it looks like this now it's kind of
  165. 7:19an ugly expression there but I'm going
  166. 7:20to pick it apart so we can understand
  167. 7:21exactly what each thing means now let
  168. 7:24start at the left what does Min n mean
  169. 7:28well it means minimum or
  170. 7:30minimization then we have the summation
  171. 7:32symbol there in the middle now we look
  172. 7:35over further to the right now we notice
  173. 7:36that we have two values in parentheses
  174. 7:38that we are subtracting so we're going
  175. 7:40to find the difference of two something
  176. 7:43we don't know yet and then we're going
  177. 7:45to square that difference so just put it
  178. 7:47all together we're going to find the
  179. 7:49difference of two things we're going to
  180. 7:51square that difference and then we're
  181. 7:54going to add them all together that's
  182. 7:55the summation and the goal is to
  183. 7:58minimize
  184. 7:59that
  185. 8:01sum so y sub I is the actual observed
  186. 8:05value of the dependent variable in this
  187. 8:08case it's the actual tip amount that
  188. 8:10occurred in the restaurant that's why
  189. 8:12it's the observed
  190. 8:15value now y hat sub I is the estimated
  191. 8:19or the predicted value of the dependent
  192. 8:21variable so this is the predicted tip
  193. 8:23amount based on our regression model so
  194. 8:28what are we going to do here we're going
  195. 8:29to have two values for every X on the
  196. 8:32graph we're going to have the actual
  197. 8:34observed tip and then we're going to
  198. 8:36have the tip the model predicted now
  199. 8:39those are not going to usually be the
  200. 8:41same there's going to be some difference
  201. 8:42between the two so we're going to find
  202. 8:44the difference between those two things
  203. 8:46we're going to square the difference and
  204. 8:47then add up all the differences and we
  205. 8:50want that sum to be as little as
  206. 8:52possible so in plain English the goal is
  207. 8:55to minimize the sum of the squared
  208. 8:58differences
  209. 9:00between the observed value for the
  210. 9:02dependent variable so the actual tip in
  211. 9:04the restaurant and the estimated or
  212. 9:06predicted value of the dependent
  213. 9:08variable that is provided by the
  214. 9:10regression line so think about this
  215. 9:13that's so we have a bill I don't know
  216. 9:17that's
  217. 9:18$50 and the patron at the restaurant
  218. 9:21left a tip of
  219. 9:24$5 but our regression line predicted a
  220. 9:27tip amount of $7
  221. 9:30.50 so we have a difference there our
  222. 9:32observed value was $5 our predicted
  223. 9:35value was
  224. 9:37$7.50 so we find the difference between
  225. 9:39those two and then we'll square the
  226. 9:41difference and then we'll do that for
  227. 9:43every point along the regression
  228. 9:47line now not only that but the sum of
  229. 9:49the squared residuals should be much
  230. 9:52smaller than when we use just the
  231. 9:54dependent variable alone so remember in
  232. 9:56that case the slope of the line was Zero
  233. 9:59the the predicted value for every point
  234. 10:00of X was $10 cuz we only had the tip
  235. 10:03data and that sum of squared residuals
  236. 10:06or sum of squared errors was
  237. 10:08120 so when we actually find these
  238. 10:11squared residuals using the regression
  239. 10:13line it should be a lot smaller than
  240. 10:18120 so let's walk through this step by
  241. 10:21step so step one is to do a scatter plot
  242. 10:24now it seems obvious but a lot of people
  243. 10:25just go in and do the math and don't
  244. 10:27actually look at the data so do a
  245. 10:29scatter plot of your data you can look
  246. 10:30at the general pattern you can look for
  247. 10:32any outliers anything that seems odd now
  248. 10:35you also want to make sure that your
  249. 10:36graph is scaled correctly so you can see
  250. 10:38down here on the bill amount I started
  251. 10:40at $20 that's because our smallest bill
  252. 10:43was $34 so if I went all the way down to
  253. 10:47zero that wouldn't make a whole lot of
  254. 10:48sense so I went ahead and did the scale
  255. 10:50from 20 to 120 same thing for the tip
  256. 10:53amount our smallest tip was $5 so I
  257. 10:57started that axis at four
  258. 10:59so you always want to make sure that
  259. 11:01your graph is set up proportionally so
  260. 11:04the scatter plot is not
  261. 11:08distorted so step two look for a visual
  262. 11:12line for a rough visual line now does
  263. 11:16this data seem to fall along a
  264. 11:20line well yes it does so we don't know
  265. 11:24if any one of these lines here is the
  266. 11:26actual regression line but in general
  267. 11:29the data points do fall along a line now
  268. 11:32what if they don't well if the data
  269. 11:34points are all scattered all over the
  270. 11:36place if they're like a Big Blob or if
  271. 11:39you ever seen sort of a shotgun blast
  272. 11:41against a Target the shot is everywhere
  273. 11:45then there would be no linear pattern
  274. 11:47you would actually stop in your
  275. 11:49regression there's not going to be a
  276. 11:51linear pattern in a blob of data points
  277. 11:54now some people will go ahead and do it
  278. 11:56because with computers it's very easy to
  279. 11:57do anyway but really it's a waste of
  280. 12:00time and it's technically not an
  281. 12:01appropriate test or appropriate
  282. 12:03technique to use when the data are just
  283. 12:06sort of randomly all over the
  284. 12:09place now step three correlation I would
  285. 12:12consider optional but I think it's a
  286. 12:15good thing to do because the correlation
  287. 12:18coefficient is involved in other things
  288. 12:20later in regression and also in multiple
  289. 12:22regression so you might as well go ahead
  290. 12:24and do it anyway so what is the
  291. 12:26correlation coefficient for our data
  292. 12:28here
  293. 12:30well in this case it's
  294. 12:320.866 now you obviously have to know
  295. 12:35what that means so in this case is
  296. 12:38relationship strong well yes it is a
  297. 12:42correlation coefficient of 866 indicates
  298. 12:45a strong positive linear relationship so
  299. 12:50it sort of gives evidence to our
  300. 12:51conclusion earlier that in fact there is
  301. 12:53a linear relationship between data
  302. 12:56points step four descriptive statis ICS
  303. 12:59and the centroid so over here on the
  304. 13:01right we can see that we have the bill
  305. 13:03column and the tip column the first
  306. 13:05thing we want to do is find the mean of
  307. 13:07each variable so our average bill amount
  308. 13:10or a mean bill amount was
  309. 13:12$74 for the tips it was $10 now what we
  310. 13:16can do is actually graph this on the
  311. 13:19graph so we'll take our mean of the
  312. 13:21bills of
  313. 13:22$74 then we'll take the mean of the tips
  314. 13:25which was $10 and we'll actually graph a
  315. 13:28point there now this point is very
  316. 13:31important and it's called the centroid
  317. 13:33and here's why it's important the best
  318. 13:36fit or the least squares regression line
  319. 13:39will or must pass through the centroid
  320. 13:44so whatever our regression line happens
  321. 13:46to be it has to go through the centroid
  322. 13:50which is comprised of the mean of the X
  323. 13:52variable and the mean of the Y variable
  324. 13:55and remember it takes two points to make
  325. 13:58a line so the centroid automatically
  326. 14:00gives you a point to work with and
  327. 14:02that's important as we go forward but
  328. 14:05always find the mean of each variable
  329. 14:07then we can plot the centroid on the
  330. 14:08graph knowing that our regression line
  331. 14:11must go through that
  332. 14:14point so let's go ahead and walk through
  333. 14:16the calculations now remember the
  334. 14:18general model so y hat sub i = b Sub 0
  335. 14:22plus b sub1 x sub I that's a lot of
  336. 14:26variables in there but all that means is
  337. 14:28this it's comprised of two parts so B
  338. 14:31sub one is the slope now the formula to
  339. 14:34find the slope is this over here on the
  340. 14:37right now that looks very complex but
  341. 14:41it's not as you can see we have things
  342. 14:43in there like xbar well that's the mean
  343. 14:45of the X variable we have Y Bar that's
  344. 14:47the mean of the Y variable so on and so
  345. 14:50forth it's not that hard to do it just
  346. 14:52takes a few steps and we'll walk through
  347. 14:54them but that's how we find the B sub1
  348. 14:57which is the slope of our regression
  349. 15:00line so in this case xar is the mean of
  350. 15:03the independent variable in this case
  351. 15:05the bill amount Y Bar is the mean of the
  352. 15:09dependent variable which in this case
  353. 15:10are the
  354. 15:12tips now X ofi is the value of the
  355. 15:15independent variable for a point and Y
  356. 15:17subi is the value of the dependent
  357. 15:19variable for a point so we have the mean
  358. 15:22of the independent variable we have the
  359. 15:24mean of the dependent variable and then
  360. 15:26X subi and Y subi are simp a pair of tip
  361. 15:31and meal
  362. 15:33data now The Intercept is the other
  363. 15:36component here so it's B subz now to
  364. 15:39find B subz we just take the Y Bar which
  365. 15:42is the mean of the dependent variable
  366. 15:45and then subtract the slope times the
  367. 15:47mean of the independent variable so we
  368. 15:49have to find B sub1 first because we
  369. 15:52will use that to find The Intercept so
  370. 15:55these are very simple calculations if
  371. 15:57you set them up in a table and Mak you
  372. 15:59walk through them step by step but there
  373. 16:01is no magic here the four things we need
  374. 16:04are things we already know the mean of
  375. 16:06both variables and then a point so in
  376. 16:10this case a dollar and a tip
  377. 16:14amount let's talk about how to calculate
  378. 16:16these so here's our B sub1 remember this
  379. 16:18is the slope of our regression line so
  380. 16:20to find the numerator we do these things
  381. 16:22for each data point we take the x value
  382. 16:25and subtract the mean of the X variable
  383. 16:28or the independent variable we take the
  384. 16:31Y value and subtract the mean of the Y
  385. 16:34variable in this case the tip amount so
  386. 16:37all we're doing is taking the difference
  387. 16:38between the mean and the actual data
  388. 16:41point for each
  389. 16:43variable and then we multiply those two
  390. 16:45things together and then we add up all
  391. 16:48the products now we're going to walk
  392. 16:49through an actual calculation so you
  393. 16:50actually see it in action but this is
  394. 16:52what we do now on the bottom for each
  395. 16:55data point we take the x value and
  396. 16:58subtract the mean of X then we Square it
  397. 17:01then add them up so you can see it's
  398. 17:03actually pretty simple just using the
  399. 17:05four things we already have the mean of
  400. 17:08each variable and then a point that's an
  401. 17:10x sub I and a y sub I now to find B subz
  402. 17:14which is The Intercept we use what we
  403. 17:16find for B sub one the slope and then we
  404. 17:19use the mean of Y and the mean of X do a
  405. 17:21simple calculation and then we have
  406. 17:25it so here is a table where we can
  407. 17:28actually walk through each step of the
  408. 17:30calculation so here on the left we have
  409. 17:32each meal 1 through six and then we have
  410. 17:34the dollar amounts for the bill and the
  411. 17:36tip so the bill of $34 had a tip of5 the
  412. 17:39bill of $18 had a tip of $17 and so on
  413. 17:42and so forth on the bottom of this
  414. 17:44columns you'll see that we have the mean
  415. 17:45of each variable so the mean of the
  416. 17:48total bills was $74 and the mean of the
  417. 17:50tips was $10 so the first thing we got
  418. 17:53to do in this next column is the bill
  419. 17:56deviation so we're going to take x sub I
  420. 17:59and then subtract the mean of
  421. 18:02X so it looks like this so let's walk
  422. 18:06through a couple of them so you can see
  423. 18:07where we actually get them so remember x
  424. 18:09sub I all that is is the x value over
  425. 18:12here in the total bill column so in the
  426. 18:14first case it's 34 then we subtract the
  427. 18:17mean of that column which is 74 so 34-
  428. 18:2374 is -40 let's go to the next one so
  429. 18:27108 - 74 is
  430. 18:3134 same thing 64 - 74 is -10 so on and
  431. 18:37so forth so each x value minus the mean
  432. 18:41now I'll do the same thing for the
  433. 18:44Y's so for the first one a tip amount of
  434. 18:47$5 minus the mean of $10 is -5 then we
  435. 18:52have 17 - 10 which is 7 11 - 10 which is
  436. 18:561 8 - 10 10 which is -2 and so on and so
  437. 19:01forth so each y value minus its mean now
  438. 19:05look at the next column what we going to
  439. 19:07do well we're going to multiply those
  440. 19:09two things together it's just the
  441. 19:11product of those two so -40 * -5 is 200
  442. 19:1734 * 7 is
  443. 19:20238 -10 * 1 is10 and so on and so forth
  444. 19:25now we need to find the sum of those
  445. 19:27things so we're going to add them all up
  446. 19:29and then when we do we have a value of
  447. 19:33615 now the next column what do we do
  448. 19:36we're going to squared what we found in
  449. 19:38the bill deviation
  450. 19:40column so -40 squared
  451. 19:44is600 34 squared is
  452. 19:481,156 -10 sared is 100 and so on and so
  453. 19:53forth then we're going to add all those
  454. 19:55up and that's 4,26
  455. 19:59very very simple if you just followed
  456. 20:02along step by
  457. 20:06step let's go ahead and calculate the
  458. 20:09slope of our regression line so remember
  459. 20:11here it is so B sub1 is equal to this
  460. 20:15fraction here that involves things we
  461. 20:16just found in the previous slide now
  462. 20:19I've colorcoded everything so you can
  463. 20:21see how everything relates to the actual
  464. 20:23formula so in the numerator you can see
  465. 20:26that the terms in that numerator are the
  466. 20:28same thing as the terms in the deviation
  467. 20:30products column so the sum of that
  468. 20:33column will be our numerator now in the
  469. 20:36denominator we can see that that term is
  470. 20:39the same thing as our bill deviations
  471. 20:41squared over here so the sum of that
  472. 20:43column will be the
  473. 20:45denominator b sub1 or the slope of a
  474. 20:48regression line is 615 /
  475. 20:534,26 and we get those from our columns
  476. 20:56over here on the right so we go ahead
  477. 20:58and do that division the slope of our
  478. 21:01regression Line is
  479. 21:0801462 now what about the Y intercept
  480. 21:11well here is our general formula now we
  481. 21:13know letter B sub one is or our slope is
  482. 21:16we just found it and here is the rest of
  483. 21:18the information we need we need Y Bar
  484. 21:20and xar which is just the mean of the
  485. 21:23bills and the mean of the tips so we go
  486. 21:25ahead and substitute everything in so
  487. 21:27the mean of the tips or the Y Bar is 10
  488. 21:31minus B sub 1 which is our slope which
  489. 21:34is up there at the top and then the mean
  490. 21:36of the X's or the mean of our total
  491. 21:38bills which is 74 so we go ahead and do
  492. 21:41all that out and we end up with an
  493. 21:44intercept of
  494. 21:470.81
  495. 21:5188 what is our regression line so here's
  496. 21:55a general formula B Sub 0 is our
  497. 21:57intercept we found that out.
  498. 22:018188 our slope is
  499. 22:0401462 now all we have to do is assemble
  500. 22:07it we got to put it all together and it
  501. 22:10looks like this or this so y hat subi
  502. 22:16equal
  503. 22:180.818 that's our intercept plus
  504. 22:220.146 2 x so that's our slope B sub1 up
  505. 22:27there at the top now now we could
  506. 22:28rearrange it and put the slope first so
  507. 22:3301462 x minus 0. 8188 for The Intercept
  508. 22:39so it doesn't matter how you rearrange
  509. 22:40it some software packages will display
  510. 22:43it one way some will display it the
  511. 22:45other way it really does not matter as
  512. 22:47long as you know what each section or
  513. 22:49each term in there
  514. 22:53means now I went ahead and did this in
  515. 22:56Microsoft Excel and here's what it gave
  516. 22:59us it gave us a y =
  517. 23:0301462 xus
  518. 23:070.823 now what was our
  519. 23:11calculation
  520. 23:1201462
  521. 23:14xus 8188 now notice there's a little bit
  522. 23:18difference due to rounding in the
  523. 23:20intercept and that's okay now I will say
  524. 23:23this that regression is very sensitive
  525. 23:25to rounding so it's always best practice
  526. 23:28to take your calculations out to four
  527. 23:30decimal places but here we have a slight
  528. 23:32difference due to rounding but our
  529. 23:35manual calculation that we just did is
  530. 23:37the exact same that Excel came up with
  531. 23:40there at the
  532. 23:41top so our slope is
  533. 23:4501462 and our intercept is. 8203 in
  534. 23:50excel's case or. 8188 in our hand
  535. 23:53calculation case which is close enough
  536. 23:55for
  537. 23:56me now look at our centroid remember I
  538. 23:59said our centroid has to fall on the
  539. 24:02regression line so in this case our
  540. 24:04centroid was 74 10 so a bill amount of
  541. 24:0874 and a tip amount of $10 well guess
  542. 24:11what it does so that disproves the point
  543. 24:14that our regression line is accurate it
  544. 24:16goes to our centroid and her hand
  545. 24:18calculation matched excel's
  546. 24:22calculation so how do we actually
  547. 24:24interpret our regression line so here it
  548. 24:27is so why hat subi and again remember
  549. 24:29that's predicted the Y hat means this is
  550. 24:32how we find predicted values 0.146 2x
  551. 24:36minus
  552. 24:380.818 what does that actually
  553. 24:41mean well here's what it means for every
  554. 24:45$1 the bill amount which is our X
  555. 24:48increases for every dollar the bill
  556. 24:51amount increases we would expect the tip
  557. 24:54amount to also increase by
  558. 25:0001462 or about
  559. 25:0315 so for every dollar the bill amount
  560. 25:06increases we expect or predict the tip
  561. 25:09amount to increase by 15 cents
  562. 25:14approximately now what does The
  563. 25:15Intercept mean if the bill amount is $0
  564. 25:19then the expected or predicted tip
  565. 25:21amount is
  566. 25:2382 well does that make any sense no and
  567. 25:27here's another important important thing
  568. 25:29The Intercept may or may not have any
  569. 25:32real meaning in real life so it may or
  570. 25:35may not make sense in this case it
  571. 25:37doesn't make any sense so it has to be
  572. 25:40part of our prediction equation or a
  573. 25:42regression equation but it does not
  574. 25:44really make sense in real life sometimes
  575. 25:47it does sometimes it doesn't it just
  576. 25:49depends on the problem but the important
  577. 25:51thing to get out of this slide is how
  578. 25:54the dependent variable changes in
  579. 25:57relation to one unit change in the
  580. 26:00independent variable so for every $1 the
  581. 26:02bill amount increases we expect the tip
  582. 26:04amount to increase by about 15 cents or
  583. 26:0901462 and that's because it's
  584. 26:14positive
  585. 26:16but is this regression line model any
  586. 26:20good well we don't know that yet and
  587. 26:22that will be the topic of our next
  588. 26:27video okay so we've reviewed sort of the
  589. 26:29heart or the core of simple linear
  590. 26:31regression which is the least squares
  591. 26:33method so we talked about how to put our
  592. 26:35data on a graph make sure it actually
  593. 26:38follows a linear relationship if it
  594. 26:40doesn't we should abandon the regression
  595. 26:42because it doesn't make sense to try to
  596. 26:43force a linear model on data points that
  597. 26:47are scattered all over the place we
  598. 26:49talked about how we should format our
  599. 26:51graph so it doesn't distort our data
  600. 26:53points as well we also talked about
  601. 26:56doing a correlation analysis to f figure
  602. 26:58out if a strong linear relationship
  603. 27:00exists between our two variables now
  604. 27:03again that's sort of optional but I do
  605. 27:05suggest doing it because that comes into
  606. 27:08play later on and also in multiple
  607. 27:10regression now once we have that we use
  608. 27:13the actual step-by-step method to
  609. 27:15calculate B sub1 which is the slope of a
  610. 27:18regression line and B Sub 0 which is The
  611. 27:21Intercept now when we calculated those
  612. 27:23we found out that by putting them
  613. 27:25together we generated our regression
  614. 27:28line now we can go ahead and graph our
  615. 27:31regression line and it better go through
  616. 27:33our centroid which is the mean of each
  617. 27:36variable as plotted as a distinct point
  618. 27:39on the graph but of course in the end we
  619. 27:42don't know if this regression line is
  620. 27:44any good we're going to compare it to
  621. 27:47the situation where we did not have an
  622. 27:49independent variable so remember in that
  623. 27:51case the best prediction we had for any
  624. 27:53tip was $10 so when we find the squared
  625. 27:56residuals using the regression line
  626. 27:58it had better be a lot less than
  627. 28:01120 otherwise a regression model is no
  628. 28:04better than just using the mean of the
  629. 28:06tips alone and that's the whole point
  630. 28:09we're going to compare a regression line
  631. 28:11to the situation where we're only using
  632. 28:13the mean of the dependent variable so
  633. 28:16we'll get to that in the next video
  634. 28:19[Music]

About this transcript

This page contains the full transcript of YouTube transcript (Qa2APhWjQPc) , generated from the public captions YouTube serves with the video. The transcript has 4,595 words across 634 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.