Why a "least squares regression line" is called that...

Sdílet
Vložit
  • čas přidán 26. 07. 2024
  • This explanation made a lot of sense to me when I read it years ago, and I think it's even better dynamically illustrated with Geometer's Sketchpad.

Komentáře • 138

  • @nguyenbluesea77
    @nguyenbluesea77 Před 11 lety +4

    I have been taught many times about least squares. But this is the first times I understand what it is!

  • @rhraziel
    @rhraziel Před 11 lety +1

    I learned more in this 5 minute video than 4 weeks of correlation and regression analysis practice and lecture.

  • @COCCmath
    @COCCmath  Před 11 lety

    Yay! This makes me so happy! Thanks for stopping by, and glad it helped!

  • @COCCmath
    @COCCmath  Před 11 lety

    So glad it helped! Thanks for stopping by!

  • @COCCmath
    @COCCmath  Před 12 lety

    Yay! Glad you found it helpful! It sure helped me to understand it. Thanks for stopping by!

  • @COCCmath
    @COCCmath  Před 12 lety +3

    Merci beaucoup! Hello from Oregon!
    So nice to hear from you, and I'm glad you found this helpful. Knowledge should be shared, no?
    Au revoir

  • @COCCmath
    @COCCmath  Před 12 lety +3

    Hey there! Thanks for stopping in! You minimize the vertical (offset) distance because you're checking the error between the model (the "best fit" line) and the actual "performance" of the data. By checking the vertical distance, the x - coordinate (input variable) remains consistent between y (data dependent value) and "y hat" (the predicted y-value). Take care!

  • @handsonthroat
    @handsonthroat Před 11 lety

    Awesome! So glad it helped! Thanks for stopping by!

  • @43SunSon
    @43SunSon Před 12 lety

    Very straightforward explanation. very helpful. Hope you will do more! Good job

  • @tleearning1755
    @tleearning1755 Před 2 lety +1

    still helpful 11 years later.

  • @COCCmath
    @COCCmath  Před 12 lety

    My pleasure! Thanks for stopping by!

  • @glittergal0701
    @glittergal0701 Před 8 lety +8

    I have to take my AP Stats class today, and this helped a lot! wish I was doing that project you kept referencing because I still need more help haha

    • @COCCmath
      @COCCmath  Před 8 lety

      +Rachel Hartman Glad it helped, my friend! If you like, here's the link to the project:
      coccweb.cocc.edu/srule/MTH244/projects/4Correlationandregression.pdf
      Here are the datasets you'll need:
      coccweb.cocc.edu/srule/MTH244/projects/correg.xlsx

  • @Radmuz2
    @Radmuz2 Před 11 lety +1

    That was my question when I saw the video as well. However seeing this graphically really helps my understanding of what is going on. Even though we are about done with the last course I will be able to take from you I had to subscribe since this stuff is so fun to learn.

  • @COCCmath
    @COCCmath  Před 12 lety

    Thank you! Glad it made sense. I, for sure, will do more as I find time!

  • @alexe610
    @alexe610 Před 12 lety

    Very well explained. Thank you so much for your generosity. From FRANCE.

  • @ladyvanda
    @ladyvanda Před 11 lety +1

    Yes, the visual aspect (seeing the actual squares) makes a big difference. Thanks for the help on my stats project! :-)

  • @soccerwhos11
    @soccerwhos11 Před 12 lety

    Thank you for the explanation. Helped me quite a bit.

  • @handsonthroat
    @handsonthroat Před 11 lety

    Heck yeah! Thanks, Randy! It's been fun!

  • @handsonthroat
    @handsonthroat Před 11 lety

    You're so welcome! Thanks for checking it out!

  • @kevinduncan8333
    @kevinduncan8333 Před 3 lety

    Good job. I'm using this for my class. It's a very clear explanation

    • @COCCmath
      @COCCmath  Před 3 lety

      Thank you! And heck yeah! Have fun with it!

  • @spchacal
    @spchacal Před 9 lety

    that was a very good explanation and presentation of the least squares. very good job, thank you

    • @COCCmath
      @COCCmath  Před 9 lety

      Thank you so much! Thanks for stopping by!

  • @handsonthroat
    @handsonthroat Před 11 lety

    Thanks for stopping by, and a very good point! I was just trying to get at the explanation of the "squares" bit in this video. Maybe I need another one. :)
    From what I remember from Stat 370, the reason isn't to accentuate the larger variations, but to create a differentiatiable function (when you're minimizing the sum of the squares, you need to set partial derivatives to 0).
    Hope that helps! Thanks, again, for stopping in!

  • @heathernadine94
    @heathernadine94 Před 11 lety

    Love it! I'm so visual - Thank you.

  • @meenakshimahanta451
    @meenakshimahanta451 Před 10 lety

    Wow!! such a nice to video to understand the meaning of least squares. Thanks !!!
    It was so useful and very well explained.

    • @COCCmath
      @COCCmath  Před 10 lety

      You're very welcome! Glad it helped!

  • @Tierceleyas
    @Tierceleyas Před 8 lety

    Thank you. Visual cues + Meaning = Dual Code Processing = LEARNING! You just made that cool for a person with math anxiety! Yay!

    • @COCCmath
      @COCCmath  Před 8 lety +1

      +Tierceleyas Yay! So glad it was helpful! I like to come at things non - traditionally when I can. :)

  • @uzbek1988
    @uzbek1988 Před 5 lety +1

    The best explanation. Thank you.

  • @LordTodd
    @LordTodd Před 11 lety +1

    Great video!!

  • @Romulaan
    @Romulaan Před 6 lety

    My god this clarified SO MUCH, THANKS!!!

    • @COCCmath
      @COCCmath  Před 6 lety

      You're so welcome! It always used to mystify me, too. :)

  • @COCCmath
    @COCCmath  Před 12 lety

    @XboxFearTheReaper95 You're more than welcome! Thanks for stopping by!

  • @handsonthroat
    @handsonthroat Před 11 lety

    Thank you! Glad it made sense!

  • @COCCmath
    @COCCmath  Před 12 lety

    @DocKTP This is my favorite explanation, so I'm glad you like it, too!

  • @toddintr
    @toddintr Před 10 lety

    Incredibly useful, thanks.

    • @handsonthroat
      @handsonthroat Před 10 lety

      So glad it helped! Thanks for stopping in!

  • @ashrafosman7845
    @ashrafosman7845 Před 5 lety

    Great visualization .. thanks

    • @COCCmath
      @COCCmath  Před 5 lety

      You're so welcome! Glad it helped!

  • @handsonthroat
    @handsonthroat Před 11 lety

    Sweet! SO glad it was helpful!

  • @jobyfeccia3740
    @jobyfeccia3740 Před 10 lety

    Thank you. This is very well explained.

  • @handsonthroat
    @handsonthroat Před 11 lety

    You're more than welcome!

  • @armiakrolewska
    @armiakrolewska Před 12 lety

    Thank you for explaining the method of least squares ; ]

  • @HanySalem
    @HanySalem Před 3 lety

    Very nice and crystal clear explanation

    • @COCCmath
      @COCCmath  Před 3 lety

      Thanks, Doc! Appreciate it!

  • @COCCmath
    @COCCmath  Před 12 lety

    You're so very welcome!

  • @COCCmath
    @COCCmath  Před 13 lety +1

    Hello!
    The program is called Geometer's Sketchpad. It's truly wonderful.
    (I tried to post a link to its site, but got an error...so it's "dynamic geometry dot com")
    Hope you find it useful!

  • @COCCmath
    @COCCmath  Před 11 lety

    Thank you! Hope it helped!

  • @luvgirlism
    @luvgirlism Před 11 lety +1

    Thank you soo very much!!!! Very very much appreciated!!!!! :)

  • @MrThecordeiro
    @MrThecordeiro Před 4 lety +1

    Man, tha is awesome. Thanks!

    • @COCCmath
      @COCCmath  Před 4 lety

      You're welcome! Thank you! Glad it helped!!!

  • @ChristieNel
    @ChristieNel Před 11 lety +2

    I love the Capricorn reference.

  • @poonammhaske6441
    @poonammhaske6441 Před rokem +1

    Thank you very much 🙏 from India..

  • @TheScappru
    @TheScappru Před 11 lety +1

    Oh Thank you SO much!! I have got stats exam in a couple of weeks and I just don't understand most of what my lecturer has spent hours talkinggggg about .. its just the wording/ his explanations of it all is not helpful but THIS oh thank you!! That's one topic down!

    • @COCCmath
      @COCCmath  Před 5 lety

      I'm sorry if I never responded to this ! So glad it helped!!!

  • @Dcj21
    @Dcj21 Před 12 lety

    Thanks! Very helpful! :)

  • @alexe610
    @alexe610 Před 12 lety +1

    En effet, et si certains décideurs politiques avait la même générosité d'esprit que vous le monde serait un paradis. Take care.

  • @magedx7059
    @magedx7059 Před rokem +1

    Awesome, thank you

    • @COCCmath
      @COCCmath  Před rokem

      You're so welcome! Thanks for stopping by!

  • @5zainab11
    @5zainab11 Před 8 lety

    Excellent. Thanks a lot

  • @NZAURUSS
    @NZAURUSS Před 10 lety

    fantastic stuff!! Thank you!

  • @debrabra
    @debrabra Před 11 lety

    this video helps a lot~~!!

  • @AnaNobis
    @AnaNobis Před 12 lety

    Thanks!

  • @COCCmath
    @COCCmath  Před 12 lety

    @SkateObsession You're welcome!

  • @COCCmath
    @COCCmath  Před 12 lety +1

    Thank you for this wonderful sentiment (that I had to Google translate...sorry for being such an...American). Take care!

  • @COCCmath
    @COCCmath  Před 12 lety

    @aecesped You're welcome!

  • @sebon11
    @sebon11 Před 6 lety

    Thanks, it helped alot!

  • @chichasb
    @chichasb Před 8 lety

    Excllent !! Thanks a lot

  • @alexe610
    @alexe610 Před 12 lety

    sorry for my comment in French , il does mean: it would be heaven on earth if the politicians (around the world, not just in the USA) had the same generosity as you,

  • @COCCmath
    @COCCmath  Před 12 lety

    @alexe610 It was a tremendous comment! And beautiful in your native language. Thank you so much!

  • @COCCmath
    @COCCmath  Před 12 lety

    Hey, you're welcome! The quick and easy answer is that the sum of the deviations (unsquared) will always be zero (this is the same thing that happens when you square the "sum of deviations from average" when computing variances...I mention the motivation at around 2:06). Make sense?

  • @binwang227
    @binwang227 Před 9 lety

    amazing

  • @srinadhk8071
    @srinadhk8071 Před 5 lety

    thank you very much. :)

    • @COCCmath
      @COCCmath  Před 5 lety

      You're so welcome! Glad it helped!

  • @jamesrockford2626
    @jamesrockford2626 Před 7 lety

    Brilliant

    • @COCCmath
      @COCCmath  Před 7 lety

      Thank you! Hope it helped!And your profile pic, likewise, is brilliant! Thought it was Randy Rhoads. :)

  • @ChristieNel
    @ChristieNel Před 11 lety

    Ah, that makes sense. Do all regression methods require the derivative? I assume other functions could work instead of square, but would provide a different optimized fit? I use LevMar at work for non-linear regression, which requires the Jacobian. If (-1)^2.5 existed, what do you imagine its sign would be?

  • @Felicidade101
    @Felicidade101 Před 6 lety

    Thanks! this is usefull!

    • @COCCmath
      @COCCmath  Před 6 lety

      Oh yay! So glad it helped! :)

  • @wpigrad
    @wpigrad Před 11 lety

    I loved the explanation and the video, but I have a question about the ending. I agree that the line of best fit was y=0.35x + 0.55, but to find that answer the way you showed in the video by minimizing the areas, you would have to be pivoting that line around a point that was already on the line of best fit. How could you have found this answer graphically without more information or did I miss a step?

  • @COCCmath
    @COCCmath  Před 11 lety

    Hello, and thanks for the note!
    You missed not a thing, my friend. The only way to find it graphically would be to a) randomly test all pairs of points and b) minimize the sum of squares for the lines determined by them. No prob...assuming you have infinite precision and infinite time. :) A much more direct method is to use partial derivatives to derive the slope and intercept. This video is just to give the viewer the big picture (without the calculus).
    Have a great day, and thanks!

  • @alextan94
    @alextan94 Před 12 lety +1

    Thanks! But why minimize the square but not the distance?

  • @ChristieNel
    @ChristieNel Před 11 lety

    This is great, but it doesn't explain why sum of squares and not just sum of absolutes. I imagine it's because we want bigger errors to carry more weight, but why not power of 4 or sum(exp(abs(error))) then?

  • @varshamehra7045
    @varshamehra7045 Před 6 lety +2

    cool

  • @jazz265
    @jazz265 Před 13 lety

    Which program are you using to demonstrate this?
    Thanks

  • @Dcj21
    @Dcj21 Před 12 lety +1

    Sorry I have tourettes

  • @amengizaw1970
    @amengizaw1970 Před 11 lety +1

    real it is good

  • @jackt.8201
    @jackt.8201 Před 8 lety

    Xans in my l e a n

  • @RudFaden
    @RudFaden Před 9 lety

    Which program is this made with?

    • @COCCmath
      @COCCmath  Před 9 lety

      Geometer's Sketchpad: www.dynamicgeometry.com/

  • @jakebarbuto5818
    @jakebarbuto5818 Před 5 lety

    Scoresby SC for the win

  • @EWB438
    @EWB438 Před 5 lety +1

    Tomorrow I have exam....thank you.

    • @EWB438
      @EWB438 Před 5 lety +1

      I just rock in viva today....thanks to you😀😀

    • @COCCmath
      @COCCmath  Před 5 lety

      @@EWB438 Oh YAY!!!! You're so welcome - and glad it helped!!!!! :) :) :)

  • @unev
    @unev Před 7 lety +1

    Why squaring method is preferred over absolute values?

    • @COCCmath
      @COCCmath  Před 7 lety +3

      Absolute values are way more intuitive, for sure! I (just today) had my
      students "invent" measures of variation, and they came up with average
      deviation (not standard deviation).
      As far as I know, the reason the squared deviations are used is to maintain differentiability...if you want to minimize the sum of those squares, you can differentiate x^2, but not |x|.

    • @unev
      @unev Před 7 lety

      COCCmath thank you for writing back. I'm afraid, I'm not prepared to understand your explanation. An article on algorithms brought me here. Is this topic a part of statistics?

    • @COCCmath
      @COCCmath  Před 7 lety

      All good! When you say "an article brought you here", do you mean this this video? if so, which article?
      And yep - it is statistics. But the fact that you have to minimize the squared deviations of the points requires calculus (at least in the background).
      Hop that helps!

    • @unev
      @unev Před 7 lety

      not to this video in particular, but the term least squares was used. calculus...failed it in previous semester.

    • @COCCmath
      @COCCmath  Před 7 lety

      Gotcha. There's an overlap in much of inferential statistics with calculus - generally, when something needs to be optimized.

  • @nickidaviz6123
    @nickidaviz6123 Před rokem

    Can we get graph

    • @COCCmath
      @COCCmath  Před 11 měsíci

      Not sure I know what you mean.

  • @aleksandrsimonov4591
    @aleksandrsimonov4591 Před 3 lety

    Your voice sounds like Hank's from Breaking Bad

    • @COCCmath
      @COCCmath  Před 3 lety

      Hope that's not a bad thing. :)

    • @aleksandrsimonov4591
      @aleksandrsimonov4591 Před 3 lety

      @@COCCmath hah, that is not; this is so cool 😎😅

    • @COCCmath
      @COCCmath  Před 3 lety

      @@aleksandrsimonov4591 Whew! You had me worried there! :) Glad you liked the video!

  • @juanbautistasosa363
    @juanbautistasosa363 Před 4 lety

    You forgot to explain why it is called a "regression"

    • @COCCmath
      @COCCmath  Před 4 lety +1

      True.
      But I'm fairly certain that "regression to the mean" is more of a universal idea than "least squares".

  • @handsonthroat
    @handsonthroat Před 11 lety

    I would guess that all do, since they're all minimizing the error. And, for sure, other differentiable functions besides squaring could work (especially because the squaring does create such exaggerations at large deviations)...I wonder, though, if we're tied to it due to our common use of the variance statistic as an unbiased estimator.
    I imagine that (-1)^2.5 would be Capricorn...an imaginary one :) 

  • @kingozboss
    @kingozboss Před 8 lety

    finagle

  • @irdinaali9406
    @irdinaali9406 Před 4 lety

    matlab uoe gang?

  • @handsonthroat
    @handsonthroat Před 11 lety

    Thanks!

  • @susanmohammed2575
    @susanmohammed2575 Před 10 lety

    cool