Multiple Regression: Two Independent Variables Case - Part 1

Поділитися
Вставка
  • Опубліковано 6 жов 2024

КОМЕНТАРІ • 198

  • @svensei5643
    @svensei5643 4 роки тому +35

    Finally someone who can explain how b0 is calculated in multiple linear regressions! Even in my Books they didnt explain it well enough to understand

  • @SoumyaDasgupta
    @SoumyaDasgupta 3 роки тому +5

    I am here because I was asked how to calculate this in a face to face DS interview for a tech giant. Can you believe that? Yes, and I very well faltered cause generally we use python/matlab to figure out the coefficients for us, we hardly do the math ourselves. Never-mind, its never too late to learn anything. Thanks a lot to the person who spent 28 minutes of his precious time for this. You are the reason why internet should be free forever.

    • @MathsAndStats
      @MathsAndStats  3 роки тому +1

      Hi Soumya. Thanks for the kind words and I hope your interview went well. Please share. Kindest regards. Jonathan

  • @jayhagen5996
    @jayhagen5996 3 роки тому +13

    Excellent summary; it really helped - a lot - to see this manually broken down, step-by-step, by hand. Great work and really appreciate it. For everyone else out there, note: There are a lot of sites that skip steps, gloss over things, or simply get the math wrong (frustrating), whereas this video does not miss a beat the whole way through.

  • @scholasticarania9034
    @scholasticarania9034 4 роки тому +51

    Thank You!! Now, time to figure out how to do this during exam along with 10 other questions under 2 hours :)
    Update: I've graduated and got my degree y'all

  • @btsismydrug9822
    @btsismydrug9822 2 роки тому +2

    Finally I understand, all they do is give us the final answer in class no explanation. Our lecturer just gives us notes not even explaining. Thank u sir , may u live long.

    • @MathsAndStats
      @MathsAndStats  2 роки тому

      Hi. I'm glad it was helpful. Please share. Regards. Jonathan.

  • @johnkyburz7055
    @johnkyburz7055 3 роки тому +15

    Don’t typically comment on math videos, but this video is a piece of art. Cheers

  • @expertreviews1112
    @expertreviews1112 2 роки тому +1

    this is the only video on youtube where i could learn calculating coefficients!!! thnx so much... the demonstration using some software would hv been much better than flipping sheets of paper but we'll take it

  • @russellkemmit73
    @russellkemmit73 4 роки тому +5

    Thank you, I wanted to code this from scratch in Python and you really helped me.

  • @VlogVenturesDubai
    @VlogVenturesDubai 3 роки тому +1

    Thank u so much. I especially logged in my mail id to like and comment this video and this is my first ever comment on any UA-cam video in last 15 years.
    From the last 2 years i was searching to find an answer, How to put the values of constant and slope in equation? and today i got my answer. Highly appreciation from Pakistan.

    • @MathsAndStats
      @MathsAndStats  3 роки тому

      Hi Kamran. Thank you for the kind words and I am really happy that the video was helpful. It would be great if you could subscribe and share with your friends. Thank you from Ireland. Jonathan.

  • @prathamIsOp
    @prathamIsOp Рік тому

    Thank you sir, I wasted an hour watching multiple videos on this topic but none were explained as clearly as you did

  • @Tryzex
    @Tryzex 3 роки тому +2

    Thank you so much. Been struggling with this for a while. Well explained. Just perfect.

  • @seal.2303
    @seal.2303 Рік тому

    thanks so much. I can't wrap my head around this stuff without real , ground up examples.

  • @waterford7736
    @waterford7736 Рік тому +2

    Thank you so much sir,the video was really helpful

  • @_kingsbreed
    @_kingsbreed 3 роки тому

    this is the most explanatory video i ever watched and understood on regression. thank you for sharing

  • @ibrahimAnjum
    @ibrahimAnjum 2 роки тому +2

    Thank you so much! I was trying to figure out what formula the LINEST function of excel uses for multiple Regression, I was able to figure using this video

  • @jankakopkasova7480
    @jankakopkasova7480 Рік тому +2

    thank you so much for saving me from a mental breakdown

  • @nokuthulashange9865
    @nokuthulashange9865 2 роки тому +1

    This man is GOLDEN!!!!!!!!!!!!!!!!!!!!!!!!

  • @protocolwonder4558
    @protocolwonder4558 2 місяці тому

    with the same data, I used the matrix approach and i had the same answer. This is fulfilling

  • @taraporewalla
    @taraporewalla 4 роки тому +1

    Very well explained, looked for it all over but your video helped it out. Please keep posting more such explanations on Statistics on UA-cam.

  • @jakirhossain12nov
    @jakirhossain12nov 3 роки тому +1

    i was hardly looking for such a video and finally got it! really great explanation and teaching. thanks a lot :)

  • @elrevesyelderecho
    @elrevesyelderecho 4 роки тому +3

    Thank you! I am working on PBI and I was looking for a way to do it on DAX.

  • @4054613
    @4054613 4 роки тому +5

    wonderful explaination. as a bonus, it felt like connor mcgregor was teaching me regression. haha

  • @gmc254quads6
    @gmc254quads6 4 роки тому +10

    Quite an insight. Thank you. I do have a question though, is there a formula for more than 2 variables that does not involve matrix calculations.

    • @MichaelCarrPilot
      @MichaelCarrPilot 9 місяців тому

      I'm wondering the same thing! I have a need to have 3+ input but sitll only one output.

  • @macanbhaird1966
    @macanbhaird1966 4 роки тому +1

    Very useful - I teach this too at a more basic level and this was great! Thanks

    • @MathsAndStats
      @MathsAndStats  4 роки тому +1

      Hi Andrew. Thanks for the kind words. Regards. Jonathan.

  • @maggot9111
    @maggot9111 Рік тому +2

    Thank you! Wonderful explanation

  • @Janeilliams
    @Janeilliams Рік тому

    Indeed, you put a lot of work in this video.
    Thankyou, it was very helpful. Keep posting

  • @bugraozturk3250
    @bugraozturk3250 9 місяців тому +1

    Excellent ! Thanks so much for this high value sharing

  • @FarhatKCh
    @FarhatKCh 3 роки тому +2

    Thank you for the nice explanation, I really needed this for my monograph!

  • @dalmasogembo7034
    @dalmasogembo7034 3 роки тому +2

    Great video, I can know solve this quiz!
    Thank you very much

  • @suneeth_kumar
    @suneeth_kumar Рік тому +1

    appreciate your effort sir...thanks a lot

  • @S1mple-f3s
    @S1mple-f3s 3 роки тому +1

    Great Video . I searched for it since long time

  • @mandarabattalahalli37
    @mandarabattalahalli37 4 роки тому +2

    Thank you. you saved my exam. may god bless you

    • @MathsAndStats
      @MathsAndStats  4 роки тому

      Hi Mandara, That's good to hear. Please share. Regards. Jonathan

  • @sethusudharshan3375
    @sethusudharshan3375 5 років тому +3

    Excellent decent explanation of two dependant varialble OLS. But I need for 3 variables.

    • @Radmud
      @Radmud 4 роки тому +1

      Multiple regression with 3 variables is explained on this page: openprairie.sdstate.edu/cgi/viewcontent.cgi?article=1055&context=agexperimentsta_tb
      Regression for more than 3 variables can also be deduced from the equations in the link.

  • @MuaazYT
    @MuaazYT 3 роки тому +1

    You are a savior... Thanks, Sir :)

  • @citrasalsabillap4608
    @citrasalsabillap4608 4 роки тому +3

    thankyou so much. today i have exam test and i understand about this subject. :)

    • @behailumimi
      @behailumimi 2 роки тому

      I'm very comfortable. Please please post The Three variables case(OLS)

  • @tagoreji2143
    @tagoreji2143 2 роки тому

    Thank you, Professor.It was a Clear and a Brief Explanation

  • @reishinomiya2954
    @reishinomiya2954 4 роки тому +1

    Thank you for the example and solutions. Great explanation. Really appreciate it soooo much😥😥😥

  • @malefiyadesale7763
    @malefiyadesale7763 3 роки тому +1

    I'm real thank you!!! for your great explanation and can I understand

  • @snr.Adams100
    @snr.Adams100 Рік тому +2

    Quite an eye opener content you have posted..😊I would really appreciate if you could post another one showing how to derive the coefficients of a multiple linear regression with 2 independent variables.

    • @raidzeromatt
      @raidzeromatt Рік тому +1

      Yes, I looked for part 2 and it doesn't look like he ever did one
      That would be a huge help

  • @morrismwanza5065
    @morrismwanza5065 3 роки тому

    You've done me the magic...God bless you

  • @XX-vg8um
    @XX-vg8um Рік тому

    Thank you so much, it's clearly explained. Please put more clips on statistic concepts and their interpritations

  • @MatsUlvenes
    @MatsUlvenes 5 років тому +2

    Great video
    It really helps to see it step by step by hand. Thanks a lot:)

  • @annahdaily.
    @annahdaily. 3 роки тому +1

    Thank you,huge help I'm more than confident to do my ecometrics

  • @chamopasindu414
    @chamopasindu414 Рік тому +1

    excellent video sir thank you very much

  • @Kuhle980
    @Kuhle980 3 роки тому +1

    amazing, easy to grasp and understandable content.

  • @aravindvasudev7921
    @aravindvasudev7921 Рік тому

    This video was very helpful. Thank you so much!

  • @engrusmanzafar
    @engrusmanzafar 5 років тому +3

    Thank you. It helped me. Useful video man.

  • @kolaletimothy6417
    @kolaletimothy6417 3 роки тому +1

    thanks alot..this really helped me..BIG UP👏

  • @kannanv8831
    @kannanv8831 4 роки тому +1

    Thanks a lot. The explanation is wonderful.

  • @fadye.f.samann4720
    @fadye.f.samann4720 3 роки тому +1

    thank you so much for the video. What about 3 independent variables? Is matrices is the only way to solve this kind of problem? Moreover, how to calculate R squared for multiple regression?

    • @MathsAndStats
      @MathsAndStats  3 роки тому +1

      Hi Fady,
      It is possible but you really would not do that by hand. The formulae are extremely large. If you are still interested in the formulae I would suggest using correlations matrices and using an online symbolic equation solver, like WolframAlpha, to provide the symbolic solution. I have done this and the equations for the three variable case look like this:
      b1 =
      [Rx1y*(1 - Rx1x3) + Rx2y*(Rx1x3*Rx2x3 - Rx1x2) + Rx3y*(Rx1x2*Rx2x3-Rx1x3)]
      /
      [-Rx1x2*Rx1x2 + 2*Rx1x2*Rx1x3*Rx2x3 + 1 - Rx1x3*Rx1x3 - Rx2x3*Rx2x3]
      Where Rx1x2 is the correlation between independent variable X1 and independent variable X2 etc.
      The above is just the first coefficient, there are obviously two more: b2 and b3. Oh and also the intercept b0.
      As you can see they are horrible to work with and are even more complex considering that each represents a correlation calculation.
      As I mentioned, the best way to get the closed-form equations is to use an online equation solver that allows you to solve symbolic expressions.
      I know this was long, but there is no short quick answer. I hope this helped.
      Regards. Jonathan.
      [Hopefully, there are no typos in the above b1 equation :-)]

    • @fadye.f.samann4720
      @fadye.f.samann4720 3 роки тому

      @@MathsAndStats Many thanks for the explanation.

  • @itzsale3927
    @itzsale3927 3 роки тому +2

    This helped a lot, thanks!

  • @klimandrewyusi7214
    @klimandrewyusi7214 4 роки тому +2

    Hi! This is a huge help. Is there a part 2 on this? Would like to know how to interpret this and in relation also to the problems of multicollinearity.

    • @MathsAndStats
      @MathsAndStats  4 роки тому +1

      Hi Klim. I'm glad that the video helped. Actually, it is only a single part, there is no part 2. The video ends with the full calculation of the regression coefficients. Although, I do have a playlist that covers other related items:
      ua-cam.com/play/PLJy0LHDLpgHGerwgH8LlVRl0ThQG1v2fb.html
      I hope they are interesting. Regards. Jonathan

  • @nicholaskirimi1567
    @nicholaskirimi1567 4 роки тому +1

    Thank you.This a very useful video.

  • @baboucarrgibba2615
    @baboucarrgibba2615 2 роки тому

    thank you so much sir, you really make me understand it

  • @varvarashtembari9451
    @varvarashtembari9451 4 роки тому +1

    thank you sir! excellent explanation!

  • @malikamirzoshoeva5878
    @malikamirzoshoeva5878 4 роки тому +1

    Thank you. It was very well explained 👍

    • @MathsAndStats
      @MathsAndStats  4 роки тому +1

      No problem, Malika. It would be great if you could share with your friends. Kindest regards. Jonatha

    • @malikamirzoshoeva5878
      @malikamirzoshoeva5878 4 роки тому +1

      @@MathsAndStats Sure)

  • @hasiburrahman6006
    @hasiburrahman6006 2 роки тому +1

    Thank you very much Sir ❤️

  • @politicaleconomypk405
    @politicaleconomypk405 2 роки тому

    Absolutely wonderful🥰, you made my day✌️

  • @danielcampos4079
    @danielcampos4079 3 роки тому +1

    Could you do with 3 Independent variables please?

  • @dominicconroy810
    @dominicconroy810 4 роки тому +1

    Fantastic video, thank you so much

  • @saurabhkhatri2295
    @saurabhkhatri2295 3 роки тому

    Dear Jonathan sir, nice and clear calculation steps explained, which will help me in my examination. if you also share the formula to calculate standard errors for intercept and independent variables in case of multiple regression, it would be very much helpful.

  • @mugwerianmusa9002
    @mugwerianmusa9002 3 роки тому +1

    Thank you so much for the work done

    • @MathsAndStats
      @MathsAndStats  3 роки тому

      Thanks, Mugwerian. Please share. Regards. Jonathan.

  • @protocolwonder4558
    @protocolwonder4558 2 місяці тому

    Thanks for the video sir
    please i want part 2

  • @erlydoculara3048
    @erlydoculara3048 4 роки тому +3

    well explained ! THANK YOU SIR ! :)

  • @anonymousswan8534
    @anonymousswan8534 3 роки тому +1

    So useful!!!
    Btw, is this method called “least square method”?

  • @ouardabrahmia2959
    @ouardabrahmia2959 Рік тому

    Many thanks, it was very helpful❤

  • @pjakobsen
    @pjakobsen 3 роки тому +1

    Did you say "pint" or "point". Without these great insights, there would be no Guinness.

    • @MathsAndStats
      @MathsAndStats  3 роки тому

      Oh, I can't wait for the pubs to reopen here in Ireland. :-)

  • @runxitymotorsports
    @runxitymotorsports 2 роки тому +1

    that was a good one 👍

  • @charitymanzinde9196
    @charitymanzinde9196 4 роки тому +1

    Thank you. ..well explained

  • @nagasanthoshnama
    @nagasanthoshnama Рік тому

    Great Video, But it would have been better if your variables and the x1 and x2 are different

  • @mrblawblawblaw2335
    @mrblawblawblaw2335 Рік тому +1

    Wonderful....

  • @rahulahuja1412
    @rahulahuja1412 4 роки тому +1

    How are the p-values calculated in multiple regression case?
    How to interpret them?

  • @batuhanguvenc6633
    @batuhanguvenc6633 4 роки тому +1

    Where are b1 and b2 formulas comes??
    İn triple regression
    İs B1 ,b2 and b3 like
    Y=b0+b1x+b2t+b3c
    B1=
    (c²)*(t²)*(xy)-(xtc)*(ytc)
    -----------------------------------
    (c²)*(t²)*(x²)-(xtc)²
    I used () for sigma

  • @asrarmostofa818
    @asrarmostofa818 4 роки тому +4

    Sir , how do i solve three/four independent variable

    • @MathsAndStats
      @MathsAndStats  4 роки тому +2

      Asrar. It is possible but you really would not do that by hand. The formulae are extremely large. If you are still interested in the formulae I would suggest using correlations matrices and using an online symbolic equation solver to provide the symbolic solution. I have done this and the equations for the three variable case look like this:
      b1 =
      [Rx1y*(1 - Rx1x3) + Rx2y*(Rx1x3*Rx2x3 - Rx1x2) + Rx3y*(Rx1x2*Rx2x3-Rx1x3)]
      /
      [-Rx1x2*Rx1x2 + 2*Rx1x2*Rx1x3*Rx2x3 + 1 - Rx1x3*Rx1x3 - Rx2x3*Rx2x3]
      Where Rx1x2 is the correlation between independent variable X1 and independent variable X2 etc.
      The above is just the first coefficient, there are obviously two more: b2 and b3. Oh and also the intercept b0.
      As you can see they are horrible to work with and are even more complex considering that each represents a correlation calculation.
      As I mentioned, the best way to get the closed-form equations is to use an online equation solver that allows you to solve symbolic expressions.
      I know this was long, but there is no short quick answer. I hope this helped.
      Regards. Jonathan.
      [Hopefully, there are no typos in the above b1 equation :-)]

    • @madesastra4145
      @madesastra4145 3 роки тому

      @@MathsAndStats Thanks sir

  • @mohammadhoseinbigdeli8782
    @mohammadhoseinbigdeli8782 3 роки тому +1

    huge thank to you

  • @gilma4328
    @gilma4328 2 роки тому

    this is amazing ! Thank you s much.

  • @kiranupase50
    @kiranupase50 3 роки тому

    sir, i have one que ...
    what if we have more than two independent variable ?
    How we will calculate the equation ?

  • @haikajamil
    @haikajamil 6 місяців тому

    By which method you are explaining (linear correlation coefficient method)???

  • @soulsdnight9038
    @soulsdnight9038 3 роки тому +2

    You saved me!

  • @russellkemmit73
    @russellkemmit73 3 роки тому

    Would love to see Maximum Likelihood from scratch.

  • @EarthColonyNet
    @EarthColonyNet 4 роки тому +1

    absolutely mathematically artistic!

    • @MathsAndStats
      @MathsAndStats  4 роки тому +1

      Thank you, Steven. Kindest regards. Jonathan.

    • @EarthColonyNet
      @EarthColonyNet 4 роки тому +1

      @@MathsAndStats Plus, I really like your Irish accent.

  • @sylviastevoo2391
    @sylviastevoo2391 3 роки тому +1

    Thank you sir

  • @tontontalisaysay2863
    @tontontalisaysay2863 5 місяців тому +1

    THANK YOU

  • @osamafaisal6607
    @osamafaisal6607 3 роки тому

    Many thanks, that was helpful!

  • @MichaelCarrPilot
    @MichaelCarrPilot 9 місяців тому +1

    I have this all in several spreadsheets and have it all calculate it but can it be adjusted to have more than 2 input variables to get one output?

    • @MathsAndStats
      @MathsAndStats  9 місяців тому

      Hi Michael. You can extend it to more than two independent variables, but the parameter solution equations are huge. If you have it in Excel, you would be better generating the model results using the Excel Data Analysis Toolpak. Jonathan

    • @MichaelCarrPilot
      @MichaelCarrPilot 9 місяців тому

      @@MathsAndStats I appreciate your reply. I believe I got it figured out. I actually sent you an email to your Ireland College email with a link to one of the spreadsheets I’m using this converted to work with excel formulas.

  • @utubeworldchannel9452
    @utubeworldchannel9452 Рік тому

    Very well explained

  • @kylmaz5782
    @kylmaz5782 Рік тому

    If I want to transform this regression model into a LASSO regression model with penalty terms, how do I calculate the new model along with the penalty terms? For example, if I want to set lambda (λ) to 0.005.

  • @generodrick7504
    @generodrick7504 Рік тому +1

    Thank you

  • @magnoliasphinkter8622
    @magnoliasphinkter8622 2 роки тому

    can you explain intuitively why b1 and b2 are calculated the way it is?

  • @lastvatican1976
    @lastvatican1976 3 роки тому +1

    Good video

  • @rafaelladeia7278
    @rafaelladeia7278 3 роки тому

    Thank you! But, and when I have 4 independent variable? How it goes?

  • @moyoy5892
    @moyoy5892 3 роки тому

    why do they equal the x variable when the x variable corresponds with the alignment of the c, right? that’s the only part i didn’t get

  • @jeevankuluru7305
    @jeevankuluru7305 3 роки тому +1

    than you sir

  • @gardeningtourfamilycelebra8268
    @gardeningtourfamilycelebra8268 4 роки тому

    sir please help me
    my problem is -
    Another persons explain his model -
    RSEI = 0.098*NDVI + 1.019*WET - 0.025*NDSI - 0.001*LST + 0.007 (R2 =0.998)
    1. The WET must increase by 0.098 if the RSEI increase by 0.1. Nevertheless, the increased WET and the decreased LST occurred at the same time .
    2. Therefore, RSEI increase will be more than 0.1. If the LST decrease by 0.098 and the WET increased by 0.098 the RSEI will increase by 0.10001.
    How its explain?
    My model is -
    RSEI = 0.9396*NDVI - 0.0074*WET - 0.22496*NDSI + 0.04665*LST + 0.0664 (R2 =1)
    So,1. If the RSEI increase by 0.1 then NDVI must increase ................?
    2. RSEI will increase by 0.10001, Then LST decrease by .................? and NDVI increased by ..................................?
    How this model explain above mention two point?
    Please answer me. and help me.

  • @amlanhaque461
    @amlanhaque461 3 роки тому

    thank you sir, can you write formula for 3 independent variable.

  • @keyansheppard8391
    @keyansheppard8391 3 роки тому

    I don't understand the difference between the big and little x. It may be in a previous video but I can not find an explanation for it.

  • @christopherleonard6781
    @christopherleonard6781 4 роки тому +1

    What if the number of data between X1 and X2 are different? for example X1 has 4 data and X2 has 3 data. Does this method still can be used?

    • @MathsAndStats
      @MathsAndStats  4 роки тому +2

      Hi Christopher.
      It sounds like the question you are asking is in relation to missing data!! With respect to regression, irrespective of the number of independent variables (X1, X2, ..., Xn), and the dependent variable; it is assumed that you have measurements across all variables for each tuple of dependent and independent variables.
      If it is the case that you are missing observations, there are techniques for introducing a value for the missing data. one such technique is to replace the missing value with the average of the values of the specific variable. There are many other techniques, but that would require a class on dealing with missing data. Alternatively, you could exclude the cases that have missing values.
      I hope this helps. Kindest regards.
      Jonathan

  • @umarsanusi5740
    @umarsanusi5740 3 роки тому +1

    Well done

  • @mishikhan455
    @mishikhan455 3 роки тому +1

    Thanku sir 🌸

  • @imtiazahmad7826
    @imtiazahmad7826 4 роки тому +1

    nice video so helpful