YouTube2Text

YouTube transcript (iAgYLRy7e20) — Transcript

3,895 words · 517 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
  23. 1:08I'll feel that life is much too short
  24. 1:10and the world is much too large for us
  25. 1:12to miss the chance to connect when we
  26. 1:14can number three if you like the video
  27. 1:17please give it a thumbs up share it with
  28. 1:20classmates or colleagues or put it on a
  29. 1:22playlist that does encourage me to keep
  30. 1:24making them for you on the flip side if
  31. 1:27you think there's something I can do
  32. 1:28better please leave a instructive
  33. 1:30comment below the video and I will take
  34. 1:32those ideas into account when I make new
  35. 1:35ones and finally just keep in mind that
  36. 1:37these videos are meant for individuals
  37. 1:39who are relatively new to Stats so I'm
  38. 1:42just going over basic concepts and I
  39. 1:45will be doing so in a slow deliberate
  40. 1:48manner not only do I want you to know
  41. 1:51what is going on but also why and how to
  42. 1:55apply it so all that being said let's go
  43. 1:58ahead and get started
  44. 2:02so this video is the next in our series
  45. 2:04about simple linear regression in our
  46. 2:06last video we talked about the very
  47. 2:08basics of regression first we discussed
  48. 2:12what residuals are and then we learned
  49. 2:14about the sum of squares of those
  50. 2:16residuals lastly we talked about how a
  51. 2:19regression model is actually a
  52. 2:21comparison to a special model where the
  53. 2:24independent variable does not even exist
  54. 2:27and we just use the mean of the
  55. 2:29dependent
  56. 2:30variable so in this video we will talk
  57. 2:33about some of the nuts and bolts of
  58. 2:34regression I will introduce some basic
  59. 2:37terminology and Concepts that will carry
  60. 2:39you through your work using regression
  61. 2:42we will talk about how regression is
  62. 2:44related to the algebra of lines and
  63. 2:47discuss General patterns to look for on
  64. 2:49Scatter Plots now there are no formulas
  65. 2:52or calculations in this video the goal
  66. 2:54is to help better prepare you for
  67. 2:56interpreting regression analysis when it
  68. 2:59is performed if you are new to
  69. 3:01regression or are still trying to figure
  70. 3:03out exactly what it even is this video
  71. 3:06is for you so sit back relax and let's
  72. 3:09go ahead and get to
  73. 3:13work so simple regression is part of a
  74. 3:16special area of Statistics called by
  75. 3:19variate statistics of course by variate
  76. 3:21means two variables now in our previous
  77. 3:25videos we talked about correlation and
  78. 3:28we also talked about a Nova now if
  79. 3:31correlation and an NOA got together and
  80. 3:34had a child a very scary thought I know
  81. 3:38that child would be simple linear
  82. 3:41regression because regression shares
  83. 3:43trades with correlation and it shares
  84. 3:46traits with Anova now the sharing of all
  85. 3:49of those traits will become more
  86. 3:51apparent as we get further into
  87. 3:53regression but for now just going to
  88. 3:55take my word for it now correlation and
  89. 3:58regression also have something else in
  90. 4:00common and that is that those data
  91. 4:03points are plotted on a scatter plot or
  92. 4:06a coordinate plane so for both
  93. 4:09correlation and regression we have
  94. 4:10variable one and we have variable two
  95. 4:13and then we plot where each variable
  96. 4:15meets and we get a data point now of
  97. 4:17course our samples will have more than
  98. 4:19one data point so we'll populate it with
  99. 4:21some more points now the relationship
  100. 4:23between variable one and variable two is
  101. 4:25special in this case dealing with
  102. 4:27regression so we can say it like this
  103. 4:30the value of one variable is a function
  104. 4:33of the other variable so in this case
  105. 4:36the value of variable two is a function
  106. 4:39of the value of variable
  107. 4:41one we can say it like this the value of
  108. 4:44y is a function of X so y equal F ofx so
  109. 4:50we will either choose randomly or be
  110. 4:52given a value for x we will put that
  111. 4:55into some function and then it will
  112. 4:57generate a value for y
  113. 5:00but the value for y is always dependent
  114. 5:03on the value of
  115. 5:05x so we can say it like this the value
  116. 5:08of the dependent variable in this case Y
  117. 5:11is a function of the independent
  118. 5:13variable in this case the variable X now
  119. 5:16remember in regression the whole idea is
  120. 5:19to form a line through our data points
  121. 5:22that minimizes the residual sum of
  122. 5:25squares but before we can really learn
  123. 5:27about that we have to quickly review the
  124. 5:29basic
  125. 5:30of the algebra of
  126. 5:33lines so I know you don't really want to
  127. 5:35go back to algebra but you'd be
  128. 5:37surprised how many students I've worked
  129. 5:38with over the years that take stats
  130. 5:40they're sophomore junior year of college
  131. 5:42they haven't had algebra in five six
  132. 5:44seven years and they forget some of this
  133. 5:47stuff so just on one slide going to
  134. 5:49quickly review the algebra of lines now
  135. 5:52the most important thing to remember in
  136. 5:54this case is the slope intercept form of
  137. 5:57a line because that is basically
  138. 6:00how a regression line is stated so
  139. 6:03remember that y = mx plus b is the slope
  140. 6:07intercept form of a line and it's called
  141. 6:09that because it has two real components
  142. 6:12the slope and The Intercept so X in this
  143. 6:17case is some random variable that we
  144. 6:18either Choose Or we are given in the
  145. 6:21problem m in the slope intercept form is
  146. 6:25the slope of the line This represents
  147. 6:28you've also probably seen it written as
  148. 6:30rise over run but X is the random
  149. 6:33variable and M is the slope now B is the
  150. 6:37Y intercept is where the line crosses
  151. 6:39the Y AIS so wherever our line is on
  152. 6:43this graph wherever it crosses the Y AIS
  153. 6:46that is our Y
  154. 6:47intercept now the Y intercept has a
  155. 6:50couple of special properties the Y
  156. 6:52intercept is where x equals z so if you
  157. 6:57think about all the points on the Y AIS
  158. 6:59they all sound like this 02 05 010 0 -2
  159. 7:0705 Etc so it's always where the value of
  160. 7:11x is zero so every point on the Y AIS
  161. 7:16looks like this 0 comma y now let's take
  162. 7:20an example so we'll have this equation y
  163. 7:23= 2x + 3 now look at that equation and
  164. 7:26then superimpose it on top of the slope
  165. 7:29inter intercept form of a line we can
  166. 7:31learn a lot about this equation the
  167. 7:33first thing we can learn is that the
  168. 7:35slope is two so we have 2X + 3 over here
  169. 7:39on the left we have mx + b so 2 is where
  170. 7:42the m is therefore the slope is 2 now if
  171. 7:46we write it as a fraction that's 2 over
  172. 7:49one because we don't write the one when
  173. 7:50we write whole numbers like that so in
  174. 7:53terms of rise over run it's 2 over
  175. 7:56one now let's find the Y inter intercept
  176. 8:00so we know that the Y intercept is
  177. 8:02wherever X is zero so we can substitute
  178. 8:050 in for x and then calculate the value
  179. 8:08of y so Y = 2 * 0 + 3 so y = 3 so we
  180. 8:14have the point of The Intercept is the
  181. 8:16point
  182. 8:1703 so maybe it's about right there where
  183. 8:20the dot is now my graph here is not
  184. 8:23proportionally correct so don't go off
  185. 8:26how the graph looks just sort of take
  186. 8:28into account what I'm writing on the
  187. 8:30graph now of course to graph a line we
  188. 8:32have to have at least two points let's
  189. 8:35go ahead and figure out a second point
  190. 8:36and luckily this is easy to do we can
  191. 8:39just pick any random value for x and
  192. 8:41then calculate y so let's choose x = 1
  193. 8:44so we'll substitute one in where X is
  194. 8:47and we'll go and calculate the value of
  195. 8:48y so 2 * 1 is 2 + 3 so 2 + 3 is 5 so the
  196. 8:54second point on our graph will be the
  197. 8:57point 15 now we can go ahead and graph
  198. 9:01our
  199. 9:01line now remember our slope was 2 over 1
  200. 9:05so if this were graphed properly we
  201. 9:08could go up two and over one now
  202. 9:12remember they're both positive so two is
  203. 9:15upward and one is to the right because
  204. 9:17they're both positive and we would end
  205. 9:19up at another point on our line so this
  206. 9:23is a basic overview of the algebra of
  207. 9:25lines because regression lines when you
  208. 9:28actually do them in a stat software
  209. 9:30package come out in this
  210. 9:35form now they don't come out in exactly
  211. 9:37that form but they are related so let's
  212. 9:40go ahead and show that relationship so
  213. 9:42the slope intercept is y = mx + b now
  214. 9:46the overall regression model for the
  215. 9:48entire population we are considering
  216. 9:51looks like this y = beta Sub 0 plus beta
  217. 9:56sub 1 x + e so don't freak out this is
  218. 10:01essentially the same thing you see over
  219. 10:04on the left now remember as in many
  220. 10:07areas of stats there is this very large
  221. 10:10overall population that we really don't
  222. 10:13know everything there is to know about
  223. 10:16it because maybe we can't so therefore
  224. 10:18we have to use sample data to estimate
  225. 10:22it now if we had the population
  226. 10:25available to us this is what the
  227. 10:27regression model would look like
  228. 10:30now how does it relate to over here on
  229. 10:31the left so I color coded it as well so
  230. 10:34you can see the relationship so beta Sub
  231. 10:360 is the Y intercept of the population
  232. 10:40parameter so you can see on the left
  233. 10:42it's B and over here on the right it's
  234. 10:45beta Sub
  235. 10:470 Now Beta sub one is the same thing as
  236. 10:50the slope of the population parameter so
  237. 10:53beta sub 1X over here on the right
  238. 10:56corresponds to MX over here on the left
  239. 11:00and then e is the error term in
  240. 11:03regression it's the Unexplained
  241. 11:05variation in our y variable so I don't
  242. 11:09want to get ahead of myself here but the
  243. 11:11beta Sub 0 + B beta sub 1X will explain
  244. 11:16part of the variation and then what's
  245. 11:19left will be error or unexplained
  246. 11:22variation now when we actually do simple
  247. 11:25linear regression we write it like this
  248. 11:27the expected value of y equal beta Sub 0
  249. 11:32+ beta sub 1 x now all you really need
  250. 11:36to know at this point is that this is
  251. 11:38pretty much the exact same thing as y =
  252. 11:41mx plus b up here on the top left so
  253. 11:46what is the expected value of y well
  254. 11:49it's the mean or the expected value of y
  255. 11:53for a given value of x so whatever X we
  256. 11:57choose or or given
  257. 12:00the expected value of y is where we
  258. 12:02expect that to intersect in our graph
  259. 12:06now again this will become more apparent
  260. 12:07as we go but this is how we actually
  261. 12:10write the simple regression
  262. 12:14model now the expected value is the mean
  263. 12:18so what does that actually well mean so
  264. 12:22if we have a coordinate plane here where
  265. 12:23we have X and Y AIS and we pick a value
  266. 12:27for x so maybe here sort of in the
  267. 12:30middle well that corresponds to a value
  268. 12:33of y and that's our data point maybe
  269. 12:35right
  270. 12:37here but that's the expected value of y
  271. 12:41it's really not that simple there's
  272. 12:44actually a distribution of Y's for that
  273. 12:48given X so remember our regression model
  274. 12:51is not going to be perfect so any
  275. 12:54expected value of y we come up with is
  276. 12:57at best going to be an approximation
  277. 13:00so when we say the expected value what
  278. 13:01we mean is that it's the mean of a small
  279. 13:05distribution for that y so it can be
  280. 13:09fairly narrow like this you can see that
  281. 13:12our distribution of y's Falls in a
  282. 13:14narrow band or it can be the exact same
  283. 13:18point so this exact same point with the
  284. 13:22expected value of y could be much
  285. 13:25wider like that now obviously in
  286. 13:28regression we want to have the situation
  287. 13:30like is over here on the left so we want
  288. 13:33to have the expected value of our y's to
  289. 13:35be in sort of a narrower range a narrow
  290. 13:38distribution than we do over here on the
  291. 13:41right but just remember the expected
  292. 13:44value of y is really the mean the mean
  293. 13:48of a distribution of those y values now
  294. 13:51this will become more important as we
  295. 13:53get into more complex topics about
  296. 13:55regression but I just want to point out
  297. 13:57that the value of y isn't really a point
  298. 14:01it's the mean of a distribution around
  299. 14:03the
  300. 14:06Y's now regression lines can take three
  301. 14:09General forms so here we have our
  302. 14:11expression up here on the left or
  303. 14:13equation up here on the left so expected
  304. 14:15value of y = beta Sub 0 + beta sub 1 * X
  305. 14:20so we can have the first case so it
  306. 14:22looks like this the expected value of y
  307. 14:25equal beta Sub 0 + 0 * X well what is
  308. 14:32the zero in this case well that's where
  309. 14:34the beta sub one is so what is that
  310. 14:37saying well that's saying that the slope
  311. 14:40is zero but if we go ahead and multiply
  312. 14:44this out we end up with just expected
  313. 14:46value of y equals beta Sub 0 because
  314. 14:50everything to the right of that is 0
  315. 14:53because of the multiplication so on our
  316. 14:55graph if our slope is zero it looks like
  317. 14:59like this the line is flat that is a
  318. 15:02line with the slope of zero so the slope
  319. 15:06b sub1 or beta sub one is
  320. 15:10zero the second type might look like
  321. 15:12this expected value of y equal beta Sub
  322. 15:160 plus beta sub 1 x now notice that the
  323. 15:20slope the beta sub 1 is positive so it
  324. 15:25looked like this so the slope beta sub 1
  325. 15:28is is a positive so our line goes from
  326. 15:31the lower left upward to the right now
  327. 15:35the other General type looks like this
  328. 15:37the expected value of y = beta Sub 0
  329. 15:40minus beta sub 1 * X in this case our
  330. 15:44slope the beta sub one is negative so it
  331. 15:48might look like this where our line goes
  332. 15:51from the top left down to the lower
  333. 15:53right so again these are General
  334. 15:55patterns that are based on the sign and
  335. 16:00the value of beta sub 1 because beta sub
  336. 16:031 is the same thing as the slope so mx +
  337. 16:07b this is beta sub 1 * X beta sub 1 is
  338. 16:12the slope so our lines might sort of
  339. 16:14form a general pattern based on the
  340. 16:16value of beta sub
  341. 16:20one so if we actually knew the
  342. 16:23population parameters beta Sub 0 and
  343. 16:25beta sub 1 we could use the simple
  344. 16:28linear regression equation that looks
  345. 16:30like this that we already saw but in
  346. 16:33reality we almost never have the
  347. 16:34population parameters therefore we will
  348. 16:37estimate them using sample data when
  349. 16:39using sample data we have to change our
  350. 16:41equation a little bit it looks like this
  351. 16:45now the Y with the little thing on top
  352. 16:48is pronounced y hat and it is the point
  353. 16:52estimator of the expected value of
  354. 16:56y so y hat is the mean
  355. 16:59value of y for a given value of x so
  356. 17:04just like other cases in stats where
  357. 17:06we're using sample data we write the
  358. 17:08equations a bit differently so all we do
  359. 17:10is use lowercase b where we have the
  360. 17:13betas in the top equation and of course
  361. 17:15we have y hat versus the expected value
  362. 17:18of y now in functional terms they act
  363. 17:22the same way we just write it this way
  364. 17:25to acknowledge that we are using sample
  365. 17:28data
  366. 17:31so here is our same graph but now we
  367. 17:34write it with Y hat so in this case
  368. 17:36we're using sample data but the basic
  369. 17:39idea is the same so y hat is the mean of
  370. 17:44the expected values of Y for any given
  371. 17:47value of x otherwise it's the exact same
  372. 17:53concept so let's look at this in the
  373. 17:55context of a problem now this data or
  374. 17:58this graph is from our first video where
  375. 18:01we had the dollar amount of tips like a
  376. 18:04waiter or waitress received in a
  377. 18:06restaurant but we didn't have the
  378. 18:08matching amount of the actual bill so
  379. 18:11all we had was the tip amount we only
  380. 18:13had the one variable we only had the
  381. 18:16dependent variable at that so the best
  382. 18:19way we could do is make a graph based on
  383. 18:21the mean of the tip data which was $10
  384. 18:25so then we went through and found the
  385. 18:26residuals and squared those and then
  386. 18:28added them up so with the sum of squared
  387. 18:30errors or squared residuals of
  388. 18:33120 so in this case what's the slope of
  389. 18:37this line well it's zero because the
  390. 18:40independent variable doesn't even exist
  391. 18:43so the slope of this line is zero
  392. 18:46because we're only using the values of
  393. 18:48the dependent
  394. 18:49variable so when conducting simple
  395. 18:52linear regression with two variables we
  396. 18:54will determine how good the regression
  397. 18:56line fits the data by comparing ing it
  398. 18:59to this type where we pretend the second
  399. 19:02variable does not even exist so we
  400. 19:05covered that in the previous video but
  401. 19:07the important thing to apply in this
  402. 19:09video is that the slope of this example
  403. 19:13the slope of the special type of
  404. 19:16situation is zero so this is when beta
  405. 19:19sub one is zero so any regression line
  406. 19:23we come up with we will always be
  407. 19:26comparing it to the situation a where
  408. 19:29the slope is zero and the most extreme
  409. 19:33case where the slope is zero is where
  410. 19:35the dependent variable is where the
  411. 19:37independent variable does not even exist
  412. 19:42so in this situation the value of y hat
  413. 19:46is 10 for every value of x so we can
  414. 19:51actually do this algebraically so y Hat
  415. 19:53= B Sub 0 + B sub 1 * X but the slope 0
  416. 19:59so we insert that in where B sub1 is so
  417. 20:02we're left with Y hat equals B Sub 0 but
  418. 20:07what is B Sub 0 well it's 10 so y hat
  419. 20:12equals 10 for every point along the x
  420. 20:15axis so for the second tip it's $10 for
  421. 20:19the fifth tip it's $10 for the fourth
  422. 20:21tip it was $10 so we're always comparing
  423. 20:23our regression model to this example
  424. 20:26where beta sub one is Z or the slope is
  425. 20:33zero so let's go ahead and do a quick
  426. 20:35exercise where we can match an equation
  427. 20:37with the general regression model so we
  428. 20:39have an equation that's y hat equal 0.3
  429. 20:43minus 3.3x then we have y hat = 48 +
  430. 20:487.8x and then y hat = 14.87%
  431. 20:58our slope beta sub one is at or near
  432. 21:01zero in the second example our slope is
  433. 21:04positive so beta sub 1 is positive and
  434. 21:07our last one beta sub one is negative so
  435. 21:11let's go back up to our first equation
  436. 21:13what is the value of the slope in our
  437. 21:16first equation well it's
  438. 21:183.3 so it's negative so which one does
  439. 21:21that go
  440. 21:22with that General shape so if we graph
  441. 21:26this equation it probably look something
  442. 21:27like the bottom right right now what
  443. 21:29about our second equation what is the
  444. 21:32slope there well it's positive
  445. 21:357.8x so it would look maybe like the
  446. 21:38second example here at the bottom now
  447. 21:40what about our third one our slope is
  448. 21:44.014 well that's very very close to zero
  449. 21:47it's not exactly zero but it's close so
  450. 21:50if we graph that line it would probably
  451. 21:52look something like that so again
  452. 21:55depending on the value or the sign of
  453. 21:58the slope we can have a general idea
  454. 22:01what the regression line will look
  455. 22:05like let's go ahead and get ready for
  456. 22:08conducting the least squares which we
  457. 22:09will do in the next video now remember
  458. 22:12in the first video in regression we only
  459. 22:15had the dollar amount of the tip that
  460. 22:17the waiters or waitresses received we
  461. 22:19didn't have the meal amount so now we're
  462. 22:22going to go ahead and add that
  463. 22:24in so for the Bill of $34 I had a tip of
  464. 22:27$5 for a bill of $18 I had a tip of $17
  465. 22:32and so on and so forth now when we go
  466. 22:34ahead and graph those on a scatter plot
  467. 22:37it looks like this over here on the left
  468. 22:40so you can see where each data point
  469. 22:41Falls with relationship to the bill
  470. 22:43amount and the tip amount now remember
  471. 22:46what we're saying here is that the tip
  472. 22:49dollar amount depends on the original
  473. 22:54bill amount that's what we think that's
  474. 22:56what we're sort of hypothesizing so in
  475. 22:59general a lower bill will result in a
  476. 23:02lower tip and a more expensive bill will
  477. 23:05result in a higher tip that's sort of
  478. 23:08our hypothesis so if we graph these on
  479. 23:11the scatter plot we can look and it
  480. 23:13appears that there's some sort of linear
  481. 23:15relationship that goes from left to
  482. 23:18right so if we drew a line it would
  483. 23:21probably start the lower left and go to
  484. 23:23the upper right and most importantly
  485. 23:28if that
  486. 23:29line reduces the residual sum of squares
  487. 23:34significantly from the model where we
  488. 23:36only use the mean of the tips of
  489. 23:38$10 then that's when we will say that a
  490. 23:41regression model is good sort of an equ
  491. 23:44qualitative sense now quantitatively
  492. 23:46we'll be able to figure that out more
  493. 23:48concretely but generally if the residual
  494. 23:51sum of squares is a lot less using our
  495. 23:54regression line we come up with using
  496. 23:56the least squares method then we know
  497. 23:59that our regression line is much better
  498. 24:01than the example where we only use the
  499. 24:03mean tip
  500. 24:06amount okay so that wraps up our second
  501. 24:08video in our linear regression series
  502. 24:11and again here I wanted to review a
  503. 24:12couple things sort of the algebra of
  504. 24:14regression lines some general model
  505. 24:17equations that you will see going
  506. 24:18forward and you will see in your own
  507. 24:20work and then some general graph
  508. 24:22patterns that you can look at look at
  509. 24:23the equation and try to figure out what
  510. 24:25the graph means and vice versa so again
  511. 24:28this just sort of lays the groundwork
  512. 24:29for the actual calculations that will'll
  513. 24:31start in the next video where we will
  514. 24:33actually calculate the least squares
  515. 24:35method and figure out our regression
  516. 24:37line by hand
  517. 24:42[Music]

About this transcript

This page contains the full transcript of YouTube transcript (iAgYLRy7e20) , generated from the public captions YouTube serves with the video. The transcript has 3,895 words across 517 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.