Linear Regression - Least Squares Criterion Part 2

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.พ. 2025
  • Linear Regression - Least Squares Criterion Part 2.
    In this video, I actually find the equation of the linear model and show the formulas to get there. I go into quite a bit of detail about notation and a few other things so the video is a bit long! We are using the Least Squares Criteria in this video.
    We use our data set in order to go through all of the computations so there is a bit of grinding to do. In general this is something you'd just use a calculator / software on but it never hurts to see it all the way at least once!
    #stats #statistics #linearregression #leastsquares #maths #correction #correlationcoefficient #dataanalysis #datascience

ความคิดเห็น • 183

  • @Cowabunga-dl3zo
    @Cowabunga-dl3zo 8 ปีที่แล้ว +60

    You are the only reason I am able to be passing my online math course. I am not just scraping by with a D though, I am actually learning and have a B right now! Thanks!

    • @yaelwallace8965
      @yaelwallace8965 3 ปีที่แล้ว

      I know Im asking randomly but does anybody know a tool to log back into an Instagram account..?
      I was stupid lost my login password. I appreciate any tips you can offer me!

  • @rebeccaarce5472
    @rebeccaarce5472 12 ปีที่แล้ว +1

    Thank you so much for posting these. What took me two weeks in class to barely understand I learned in less than 20 minutes here. I need some Gauss-Markov next.

  • @SuperMboli
    @SuperMboli 6 ปีที่แล้ว

    I basically know most of the things you did but what I didn't know was how to apply linear regression to prediction or estimation model. NOW it's very clear. Thanks a whole bunch for that.

  • @kelvindearaujoferreira4760
    @kelvindearaujoferreira4760 8 ปีที่แล้ว

    Amazing Job! It was a noble and admirable action of you sharing this content Patrick. I've haven't found any good content in Portuguese Language, not even close good as your content is. Your explanation was clear, bright and assertive. Thanks so much Patrick!

  • @rogerprimo0119
    @rogerprimo0119 4 ปีที่แล้ว

    THANK YOU!!! Because of these quarantine im having a hard time learning specially online classes, but thanks to you im able to understand on how to solve em. YOU REALLY ARE AN AMAZING PERSON, THANK YOU.

  • @WiperTF2
    @WiperTF2 10 ปีที่แล้ว

    BRILLIANT video. Actually, all of your videos are great. I like you more than Khan Academy, much more clear and educational. Thank you so much.

  • @williamaiweilun
    @williamaiweilun 11 ปีที่แล้ว +14

    Man, you are fucking awesome... it is the people who can understand the best who can explain in the simplest fashion

  • @masterpieceaccountingservices
    @masterpieceaccountingservices 11 ปีที่แล้ว

    Excellent presentation! I was looking for a way to understand this concept for which I couldn't wrap my brain around since statistics has always been difficult to understand for me. You took me by the hand, explained it in such a way that it just made sense and now I'm ready to complete my homework.
    Thank you sooooooooo much!!!!

  • @jingyiwang5113
    @jingyiwang5113 ปีที่แล้ว

    I am really grateful for these fantastic videos that you made. I have understood linear regression now. Thanks!

  • @kristynicole6201
    @kristynicole6201 10 ปีที่แล้ว +16

    Patrick, you really help me understand math... I can't say thank you enough. I tell all of my friends to watch your videos when they ask how I do so well in class :)

  • @YlmazDALKIRANscallion
    @YlmazDALKIRANscallion 4 ปีที่แล้ว

    Your handtyping is so clear. Thank you!

  • @marlonumali
    @marlonumali 11 ปีที่แล้ว

    very helpful for someone like me who is not really familiar with predictive equation but suddenly find the need to work with it. many thanks...

  • @gurvindersingh.1814
    @gurvindersingh.1814 5 ปีที่แล้ว

    Where in the world are you ? You are saviour!,,,truly It’s Amazingly gr8 explanation !!!!. In starting I thought it will be like other boring explanations but it was so easy to understand. Thx a ton.

  • @rudydeleon8288
    @rudydeleon8288 11 ปีที่แล้ว +3

    Eplained it better than my professor. Thank you, this is going to help alot.

  • @ABugWithTheBigDreams
    @ABugWithTheBigDreams 6 ปีที่แล้ว

    Watching in 2018 for machine learning , You are awsm thanks for uploading such good videos. Appreciate man.

  • @femifakunle1529
    @femifakunle1529 11 ปีที่แล้ว

    Nice one.I have learnt this in the university almost 20 years, my memory was revived in just 15 minutes.

  • @TheSm1thers
    @TheSm1thers 5 ปีที่แล้ว

    Thank you so much! I'm programming software for multivariate ridge regression using Python for an assignment and it helps sooooo much to see it worked out by hand.

  • @pascalndamati9832
    @pascalndamati9832 4 ปีที่แล้ว

    Thank you so much for the videos. You're the best online tutor ever..

  • @emrebalta9775
    @emrebalta9775 4 ปีที่แล้ว

    Thank you very much.Your way of explaining is the best.Keep the good job.

  • @xfronwenzyoucamex
    @xfronwenzyoucamex 7 ปีที่แล้ว

    I'm surprised by how easy this is. My professor made it seem like rocket science. thanks man!

  • @Nakadeba
    @Nakadeba 5 ปีที่แล้ว

    You're saving peoples lives, man. I love you

  • @francismjenkins
    @francismjenkins 5 ปีที่แล้ว +1

    great job ... needed a quick refresher & this was perfect, thx

  • @kamaualex2165
    @kamaualex2165 10 ปีที่แล้ว

    Hey Patrick, that was so helpful sir. i wish i had seen your channel earlier!!! this is wonderful

  • @MyLOBsTerr
    @MyLOBsTerr 9 ปีที่แล้ว +1

    Great work! I think it would be extremely complex, but with your nice explanation and vivid examples. Thank a lot!

  • @niblacknivek
    @niblacknivek 10 ปีที่แล้ว +4

    You've saved my procrastinating behind countless times with some late night studies, really appreciate your help.

  • @muthierry1
    @muthierry1 4 ปีที่แล้ว

    You are an amazing Lecturer , Thank you for your explanation. Great work ..

  • @lkdjlkjd
    @lkdjlkjd 6 ปีที่แล้ว

    I wish I could give you my $10,000 a semester instead of my university....YOU ARE THE MAN!!!!

  • @loes1727
    @loes1727 4 ปีที่แล้ว

    THank you man, now I finally understand how excel calculates those nice lines in scatter plots!

  • @EagleSlightlyBetter
    @EagleSlightlyBetter 11 ปีที่แล้ว +1

    Yo, you have to respect a dude that does math with a sharpie.

  • @fmkeane
    @fmkeane 8 ปีที่แล้ว +1

    Hi patrickJMT - I'm a big fan of your work - I find you to be very clear and easy to understand. I've a few issues with this video. I've been practicing using Excel to solve the regression, my answer is y = 8.6701x - 438.39. I got the same answer using the 'normal formulae' method. Using your least square formula I get 8.67 for the slope. Just a calculating error somewhere. Keep up the great work - Frank

  • @unknown93ist
    @unknown93ist 11 ปีที่แล้ว +7

    YOU ARE AMAZING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!THANK YOU FOR SAVING MY LIFE!

  • @dianrose7718
    @dianrose7718 12 ปีที่แล้ว

    all of your videos are really important not always in Education and Others.

  • @MrKool951
    @MrKool951 7 ปีที่แล้ว

    I've learned more from you in 6 minutes than a single 2 hour lecture from my professor.

  • @NemesisElitePro
    @NemesisElitePro 12 ปีที่แล้ว

    @patrickJMT
    Tomorrow I am going to have my pre-calc finals exam! Thanks for uploading your videos. Your videos help me alot and are very easier to understand, not like my teacher. I 'll try to let you know if I passed the exam.

  • @muijnckj
    @muijnckj 7 ปีที่แล้ว

    Thanks for putting "actual" numbers in the equations!! ;-) Very helpful..

  • @zzimja6738
    @zzimja6738 9 ปีที่แล้ว

    Thanks Mr: Ireally got preave understanding after waching thes explanation . I hope that we have a teacher with same clear examples

  • @sulemansohail2831
    @sulemansohail2831 6 ปีที่แล้ว

    I really like the way you explained the whole scenario

  • @anandprakash705
    @anandprakash705 5 ปีที่แล้ว

    Thanks so very much, persons like you are blessing.

  • @eltietiti9670
    @eltietiti9670 4 ปีที่แล้ว

    Thank you sooo much for these videos. You're a life saver!!👏🏾

  • @kurumitokisaki4844
    @kurumitokisaki4844 8 ปีที่แล้ว

    Thank you sir. This really helped me understand the topic for my cost accounting subject. Well explained.

  • @mrashraf1982
    @mrashraf1982 9 ปีที่แล้ว +1

    Thank you so much for the great efforts explaining this topic.. You really helped me.
    Thanks :)

  • @maty1a
    @maty1a 7 ปีที่แล้ว

    finally someone according to whom I am able to write code for least square method

  • @eegasudheer
    @eegasudheer 9 ปีที่แล้ว

    You made statistics subject easy, thank you.

  • @ilovefredreika
    @ilovefredreika 9 ปีที่แล้ว

    Very clear. Great teaching!

  • @dehbontempos5222
    @dehbontempos5222 6 ปีที่แล้ว

    That’s amazing explanation my brother! Thanks for the effort !!

  • @BalkanManic
    @BalkanManic 6 ปีที่แล้ว

    Thanks a lot. You explain everything so well.

  • @mekhalaspencer1370
    @mekhalaspencer1370 8 ปีที่แล้ว

    really helpful, both this one and part 1. Thanks !!

  • @casual_mma_cards
    @casual_mma_cards 12 ปีที่แล้ว

    love your videos! I'm a math/computer science double major, and your vids have helped me in most of my classes... any chance you're going to upload any vids for topics on complex variables?

  • @darkBender99
    @darkBender99 11 ปีที่แล้ว

    Thank you so much! This helped out in calculus soooo much

  • @jebastintamilselvan7446
    @jebastintamilselvan7446 11 ปีที่แล้ว +7

    doing great job really helpful

  • @VahidAryadoust
    @VahidAryadoust 11 ปีที่แล้ว

    Thanks for the videos. Very helpful. Can we say that the farthest the point from the regression line, the less accurate the prediction of the regression model for that point?

  • @Mr_Furey
    @Mr_Furey 8 ปีที่แล้ว

    Explained so well!, wish I had of found this video earlier.

  • @tedwurster5979
    @tedwurster5979 9 ปีที่แล้ว

    Very Good explanation - Thank you.

  • @Uncertaintycat
    @Uncertaintycat 7 ปีที่แล้ว +1

    Thank you. My book just waves hands and then we are supposed to fill in the blank. You are doing the book's job (and my professor's) right now, and I wish I could just give you the money that I spent on this useless book and for my useless professor.

  • @38ANDREW91
    @38ANDREW91 11 ปีที่แล้ว

    excellent video,really helped me get a grasp of the it

  • @aounallahrayane8164
    @aounallahrayane8164 6 ปีที่แล้ว

    you are the beeeeeeeeeeeeeeeeeeeeeeeeest thank you so much your a life saviour
    where can I have more exercices please ?

  • @abdulrahmanalraisi406
    @abdulrahmanalraisi406 7 ปีที่แล้ว

    this was extremely helpful! thank you so much

  • @aryandz1842
    @aryandz1842 7 ปีที่แล้ว +1

    Hi Patrick cheers to this! Clear and simple examples. Do you have lessons for non-linear too?

  • @hafidzazharjakaria2615
    @hafidzazharjakaria2615 6 ปีที่แล้ว

    u are legend man, thanks for helping me

  • @toufikdjeradi6256
    @toufikdjeradi6256 9 ปีที่แล้ว

    Great explanation, Thanks for the effort.

  • @RajeevSingla01
    @RajeevSingla01 6 ปีที่แล้ว +1

    Really well explained !! ..

  • @annapatricia2495
    @annapatricia2495 6 ปีที่แล้ว +1

    I finally get this. Thank you 😭😭😭🙌🏼🙌🏼🙌🏼

  • @loago8068
    @loago8068 6 ปีที่แล้ว

    Great job, really helpful.

  • @bikramkarki9749
    @bikramkarki9749 6 ปีที่แล้ว

    i am very happy to have get learning nicely

  •  9 ปีที่แล้ว

    Helped me a lot. Thx.

  • @panda9212
    @panda9212 11 ปีที่แล้ว

    Thank you so much, this was super helpful!!

  • @theovanoers7660
    @theovanoers7660 4 ปีที่แล้ว

    Very clear explanation

  • @ΛέναΞάνθη
    @ΛέναΞάνθη 7 ปีที่แล้ว

    You saved my life! thank you

  • @louisfan9859
    @louisfan9859 10 ปีที่แล้ว

    Brilliant!!! This video helps me a a lot.
    Actually I'm now having problem with curve fitting by using least square. Could you elaborate on this topic? I'll be so thankful !

  • @AltafHussain-gk2xe
    @AltafHussain-gk2xe 5 ปีที่แล้ว

    Thank you sir for such good explanation

  • @ruachspiritual9324
    @ruachspiritual9324 7 ปีที่แล้ว

    Statistics can be that easy... thanks man. you're awesome!!
    Wonder why the professors make it seem so hard though...

  • @darek4488
    @darek4488 6 ปีที่แล้ว

    You're the man. Very helpful.

  • @Spynighty
    @Spynighty 5 ปีที่แล้ว

    Perfect video. Thank you very much !

  • @KevinChen2022
    @KevinChen2022 9 ปีที่แล้ว

    great video, helped me i lot.

  • @Javiier216x
    @Javiier216x 8 ปีที่แล้ว

    extremely helpful.. i can finish my homework!

  • @robertballance6409
    @robertballance6409 10 ปีที่แล้ว +4

    Hi, this is an excellent video, can you tell me where you found the formula? I need to cite it in my math IA (IB Math project) Thank you, this has been the easiest formula to follow, can not seem to find a similar formula to yours.

  • @alexandercuartas9184
    @alexandercuartas9184 8 ปีที่แล้ว

    ty bro, you really helped me out

  • @thetruereality2
    @thetruereality2 7 ปีที่แล้ว +1

    Thank you for the wonderful video, what is the difference between regression an curve fitting.

  • @abhishekpandey411
    @abhishekpandey411 10 ปีที่แล้ว

    thank you so much for such a good example

  • @KisemboPhysicsAndMath
    @KisemboPhysicsAndMath 5 ปีที่แล้ว

    This z cool, thanks for the video

  • @anthonyfrunzi6667
    @anthonyfrunzi6667 8 ปีที่แล้ว

    This helped alot. Thank you.

  • @ManudeoNSinghManu
    @ManudeoNSinghManu 11 ปีที่แล้ว

    thanks a lot for clearing my concepts :)

  • @parzrelmuzik
    @parzrelmuzik 11 ปีที่แล้ว

    Helpful explanation. Thanks

  • @nullifiedHorizon
    @nullifiedHorizon 7 ปีที่แล้ว

    Absolute god among men, thank you.

  • @EngBandar1
    @EngBandar1 11 ปีที่แล้ว +1

    Thank you so much for this real example. This is my Matlab code for your example
    -------------------------
    clear all
    clc
    weight = [65; 65; 62; 67; 69; 65; 61; 67];
    height = [105; 125; 110; 120; 140; 135; 95; 130];
    Swh = sum(weight.*height) - (sum(weight)*sum(height))/size(weight,1);
    Sww = sum(weight.^2) - (sum(weight)).^2 / size(weight,1);
    b = Swh/Sww;
    a = sum(height)/size(height,1) - b*(sum(weight)/size(weight,1));
    x= 30:150; % weights
    y = a + b*x; % heights
    plot(weight,height,'o', x, y)
    axis([55 80 65 160])
    grid on
    ------------------------------------------------------------

    • @Gavusl
      @Gavusl 11 ปีที่แล้ว

      Why not just plot the x and y values and let matlab do the approximation for you? What's the point of doing the approximation by yourself if matlab already have these functions ready for you?

    • @EngBandar1
      @EngBandar1 11 ปีที่แล้ว

      No. sometimes the approximation is not clear. I've tried this many times. Actually, my approach is not that well however, the better approach is to acquire the min and max of x-y - axes to plot the data.

    • @Karikato
      @Karikato 10 ปีที่แล้ว

      Gustav Johansson how about for the sake of learning? :p

  • @Anteater23
    @Anteater23 6 ปีที่แล้ว +2

    A tip for people out there who can't remember the formula for b_1:
    The bottom line is the same as the top line but with y's replaced with x's :)

  • @nandhinipuppy4357
    @nandhinipuppy4357 6 ปีที่แล้ว +1

    generally guys don't have patients.
    u r really awesome.

    • @krishnasmail
      @krishnasmail 6 ปีที่แล้ว +1

      Patience. But guys do have both patience and patients.

  • @alishachhetri2351
    @alishachhetri2351 9 ปีที่แล้ว

    you are amazing !! thankyou for your help : )

  • @ThirtySixBlue
    @ThirtySixBlue 8 ปีที่แล้ว +1

    Phenomenal explanation; thorough and easy to understand! Thanks man, I wish you worked at my college, haha

  • @alexlai6202
    @alexlai6202 10 ปีที่แล้ว

    superb video!

  • @mikefaz5374
    @mikefaz5374 8 ปีที่แล้ว

    thanks so much! you're the best

  • @AnchalSingh06
    @AnchalSingh06 7 ปีที่แล้ว

    Nice work dude!

    • @akhilpinninti558
      @akhilpinninti558 7 ปีที่แล้ว

      Anchal Singh bro where is the graph diagram??

    • @AnchalSingh06
      @AnchalSingh06 7 ปีที่แล้ว

      I'll do it in R tool. :)

  • @readogamer3515
    @readogamer3515 7 ปีที่แล้ว

    great explanation

  • @ahmed.bhewary775
    @ahmed.bhewary775 5 ปีที่แล้ว

    any plan to make videos about multiple regression , logistic , and finally exponential regression ?

  • @fredtarbox8427
    @fredtarbox8427 11 ปีที่แล้ว

    This is great! Thank you!

  • @CarstenDittrich2014
    @CarstenDittrich2014 12 ปีที่แล้ว

    Great explanation - thx

  • @katzda
    @katzda 5 ปีที่แล้ว

    Thank you, that explains it well :-)

  • @Praveenkumar-vg3pn
    @Praveenkumar-vg3pn 8 ปีที่แล้ว

    Great video :) thanks

  • @Curly.Vibes13
    @Curly.Vibes13 10 ปีที่แล้ว

    Thank you so much

  • @kalmuraqab
    @kalmuraqab 9 ปีที่แล้ว

    Great Job