How to show that these two alternative formulas for slope are equivalent












0












$begingroup$


First Formula
$$b_1=dfrac{displaystylesum_{i=1}^n(Y_iX_i-bar Y bar X)}{displaystylesum_{i=1}^n(X_i^2-bar X^2)}$$



Second Formula
$$b_1=dfrac{displaystylesum_{i=1}^nY_i(X_i- bar X)}{displaystylesum_{i=1}^n(X_i-bar X)^2}$$



I understand the derivation of the slope $b_1$ in the Ordinary Least Squares regression. However, I am having a hard time converting the initial formula to the second one using algebra.










share|cite|improve this question









$endgroup$












  • $begingroup$
    The numerators are obviously equal, thus you only need to show that the denominators are equal.
    $endgroup$
    – lightxbulb
    Jan 23 at 22:18
















0












$begingroup$


First Formula
$$b_1=dfrac{displaystylesum_{i=1}^n(Y_iX_i-bar Y bar X)}{displaystylesum_{i=1}^n(X_i^2-bar X^2)}$$



Second Formula
$$b_1=dfrac{displaystylesum_{i=1}^nY_i(X_i- bar X)}{displaystylesum_{i=1}^n(X_i-bar X)^2}$$



I understand the derivation of the slope $b_1$ in the Ordinary Least Squares regression. However, I am having a hard time converting the initial formula to the second one using algebra.










share|cite|improve this question









$endgroup$












  • $begingroup$
    The numerators are obviously equal, thus you only need to show that the denominators are equal.
    $endgroup$
    – lightxbulb
    Jan 23 at 22:18














0












0








0





$begingroup$


First Formula
$$b_1=dfrac{displaystylesum_{i=1}^n(Y_iX_i-bar Y bar X)}{displaystylesum_{i=1}^n(X_i^2-bar X^2)}$$



Second Formula
$$b_1=dfrac{displaystylesum_{i=1}^nY_i(X_i- bar X)}{displaystylesum_{i=1}^n(X_i-bar X)^2}$$



I understand the derivation of the slope $b_1$ in the Ordinary Least Squares regression. However, I am having a hard time converting the initial formula to the second one using algebra.










share|cite|improve this question









$endgroup$




First Formula
$$b_1=dfrac{displaystylesum_{i=1}^n(Y_iX_i-bar Y bar X)}{displaystylesum_{i=1}^n(X_i^2-bar X^2)}$$



Second Formula
$$b_1=dfrac{displaystylesum_{i=1}^nY_i(X_i- bar X)}{displaystylesum_{i=1}^n(X_i-bar X)^2}$$



I understand the derivation of the slope $b_1$ in the Ordinary Least Squares regression. However, I am having a hard time converting the initial formula to the second one using algebra.







statistics regression






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 23 at 22:09









Jac FrallJac Frall

405




405












  • $begingroup$
    The numerators are obviously equal, thus you only need to show that the denominators are equal.
    $endgroup$
    – lightxbulb
    Jan 23 at 22:18


















  • $begingroup$
    The numerators are obviously equal, thus you only need to show that the denominators are equal.
    $endgroup$
    – lightxbulb
    Jan 23 at 22:18
















$begingroup$
The numerators are obviously equal, thus you only need to show that the denominators are equal.
$endgroup$
– lightxbulb
Jan 23 at 22:18




$begingroup$
The numerators are obviously equal, thus you only need to show that the denominators are equal.
$endgroup$
– lightxbulb
Jan 23 at 22:18










2 Answers
2






active

oldest

votes


















0












$begingroup$

Both the numerator and the denominator can be adjusted using the two tricks that $sum_{i=1}^n C = nC$ where $C$ is a constant, and $nbar{Y} = sum_{i=1}^n Y_i$.



In the numerator, you just have to expand:



$sum bar{X} bar{Y} = bar{X} left(sum bar{Y}right) = bar{X} left(n bar{Y}right) = bar{X} sum Y_i$
and you can then combine that with the other term and factorise the common $bar{X}$



In the denominator, you need to expand the square, and then use the tricks to make two of the terms partially cancel out.






share|cite|improve this answer









$endgroup$





















    0












    $begingroup$

    $$sum_{i=1}^n(X_i-bar X)^2=sum_{i=1}^n(X_i^2-2X_ibar X+(bar X)^2)=sum_{i=1}^nX_i^2-2bar Xsum_{i=1}^nX_i+bar X^2sum_{i=1}^n1$$
    Now $sum_{i=1}^nX_i=nbar X=bar Xsum_{i=1}^n1$. I will replace this in the middle term. I get $$sum_{i=1}^nX_i^2-2bar Xbar Xsum_{i=1}^n1+bar X^2sum_{i=1}^n1=sum_{i=1}^nX_i^2-bar X^2sum_{i=1}^n1=sum_{i=1}^n(X_i^2-bar X^2)$$
    You can proceed similarly for the numerator






    share|cite|improve this answer









    $endgroup$













      Your Answer





      StackExchange.ifUsing("editor", function () {
      return StackExchange.using("mathjaxEditing", function () {
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      });
      });
      }, "mathjax-editing");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "69"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      noCode: true, onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3085149%2fhow-to-show-that-these-two-alternative-formulas-for-slope-are-equivalent%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0












      $begingroup$

      Both the numerator and the denominator can be adjusted using the two tricks that $sum_{i=1}^n C = nC$ where $C$ is a constant, and $nbar{Y} = sum_{i=1}^n Y_i$.



      In the numerator, you just have to expand:



      $sum bar{X} bar{Y} = bar{X} left(sum bar{Y}right) = bar{X} left(n bar{Y}right) = bar{X} sum Y_i$
      and you can then combine that with the other term and factorise the common $bar{X}$



      In the denominator, you need to expand the square, and then use the tricks to make two of the terms partially cancel out.






      share|cite|improve this answer









      $endgroup$


















        0












        $begingroup$

        Both the numerator and the denominator can be adjusted using the two tricks that $sum_{i=1}^n C = nC$ where $C$ is a constant, and $nbar{Y} = sum_{i=1}^n Y_i$.



        In the numerator, you just have to expand:



        $sum bar{X} bar{Y} = bar{X} left(sum bar{Y}right) = bar{X} left(n bar{Y}right) = bar{X} sum Y_i$
        and you can then combine that with the other term and factorise the common $bar{X}$



        In the denominator, you need to expand the square, and then use the tricks to make two of the terms partially cancel out.






        share|cite|improve this answer









        $endgroup$
















          0












          0








          0





          $begingroup$

          Both the numerator and the denominator can be adjusted using the two tricks that $sum_{i=1}^n C = nC$ where $C$ is a constant, and $nbar{Y} = sum_{i=1}^n Y_i$.



          In the numerator, you just have to expand:



          $sum bar{X} bar{Y} = bar{X} left(sum bar{Y}right) = bar{X} left(n bar{Y}right) = bar{X} sum Y_i$
          and you can then combine that with the other term and factorise the common $bar{X}$



          In the denominator, you need to expand the square, and then use the tricks to make two of the terms partially cancel out.






          share|cite|improve this answer









          $endgroup$



          Both the numerator and the denominator can be adjusted using the two tricks that $sum_{i=1}^n C = nC$ where $C$ is a constant, and $nbar{Y} = sum_{i=1}^n Y_i$.



          In the numerator, you just have to expand:



          $sum bar{X} bar{Y} = bar{X} left(sum bar{Y}right) = bar{X} left(n bar{Y}right) = bar{X} sum Y_i$
          and you can then combine that with the other term and factorise the common $bar{X}$



          In the denominator, you need to expand the square, and then use the tricks to make two of the terms partially cancel out.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Jan 23 at 22:21









          ConManConMan

          7,9021324




          7,9021324























              0












              $begingroup$

              $$sum_{i=1}^n(X_i-bar X)^2=sum_{i=1}^n(X_i^2-2X_ibar X+(bar X)^2)=sum_{i=1}^nX_i^2-2bar Xsum_{i=1}^nX_i+bar X^2sum_{i=1}^n1$$
              Now $sum_{i=1}^nX_i=nbar X=bar Xsum_{i=1}^n1$. I will replace this in the middle term. I get $$sum_{i=1}^nX_i^2-2bar Xbar Xsum_{i=1}^n1+bar X^2sum_{i=1}^n1=sum_{i=1}^nX_i^2-bar X^2sum_{i=1}^n1=sum_{i=1}^n(X_i^2-bar X^2)$$
              You can proceed similarly for the numerator






              share|cite|improve this answer









              $endgroup$


















                0












                $begingroup$

                $$sum_{i=1}^n(X_i-bar X)^2=sum_{i=1}^n(X_i^2-2X_ibar X+(bar X)^2)=sum_{i=1}^nX_i^2-2bar Xsum_{i=1}^nX_i+bar X^2sum_{i=1}^n1$$
                Now $sum_{i=1}^nX_i=nbar X=bar Xsum_{i=1}^n1$. I will replace this in the middle term. I get $$sum_{i=1}^nX_i^2-2bar Xbar Xsum_{i=1}^n1+bar X^2sum_{i=1}^n1=sum_{i=1}^nX_i^2-bar X^2sum_{i=1}^n1=sum_{i=1}^n(X_i^2-bar X^2)$$
                You can proceed similarly for the numerator






                share|cite|improve this answer









                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  $$sum_{i=1}^n(X_i-bar X)^2=sum_{i=1}^n(X_i^2-2X_ibar X+(bar X)^2)=sum_{i=1}^nX_i^2-2bar Xsum_{i=1}^nX_i+bar X^2sum_{i=1}^n1$$
                  Now $sum_{i=1}^nX_i=nbar X=bar Xsum_{i=1}^n1$. I will replace this in the middle term. I get $$sum_{i=1}^nX_i^2-2bar Xbar Xsum_{i=1}^n1+bar X^2sum_{i=1}^n1=sum_{i=1}^nX_i^2-bar X^2sum_{i=1}^n1=sum_{i=1}^n(X_i^2-bar X^2)$$
                  You can proceed similarly for the numerator






                  share|cite|improve this answer









                  $endgroup$



                  $$sum_{i=1}^n(X_i-bar X)^2=sum_{i=1}^n(X_i^2-2X_ibar X+(bar X)^2)=sum_{i=1}^nX_i^2-2bar Xsum_{i=1}^nX_i+bar X^2sum_{i=1}^n1$$
                  Now $sum_{i=1}^nX_i=nbar X=bar Xsum_{i=1}^n1$. I will replace this in the middle term. I get $$sum_{i=1}^nX_i^2-2bar Xbar Xsum_{i=1}^n1+bar X^2sum_{i=1}^n1=sum_{i=1}^nX_i^2-bar X^2sum_{i=1}^n1=sum_{i=1}^n(X_i^2-bar X^2)$$
                  You can proceed similarly for the numerator







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Jan 23 at 22:23









                  AndreiAndrei

                  13.1k21230




                  13.1k21230






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Mathematics Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      Use MathJax to format equations. MathJax reference.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3085149%2fhow-to-show-that-these-two-alternative-formulas-for-slope-are-equivalent%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      MongoDB - Not Authorized To Execute Command

                      How to fix TextFormField cause rebuild widget in Flutter

                      in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith