Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Least Squares Derivation—Simple Algebraic Simplification

  1. Mar 15, 2015 #1


    User Avatar

    Hey, PF

    I'm reading the following derivation of least squares, and I'm trying to figure out how the author went from the last step at the bottom of pg. 7 to the final equation (11) at the top of pg. 8.


    More specifically, why is the denominator a difference of two terms? Aren't the terms in the denominator summed in the prior step?

    I would expect the answer to be

    b_1=\dfrac{\displaystyle \sum_{\textrm{i=1}}^{n}y_ix_{i}-\left(\frac{1}{n}\right)\left(\sum_{\textrm{i=1}}^{n}y_i\sum_{\textrm{i=1}}^{n}x_{i}\right)}{\displaystyle\sum_{\textrm{i=1}}^{n}x_{i}^2+\left(\frac{1}{n}\right)\left(\sum_{\textrm{i=1}}^{n}x_{i}\right)^{2}}

    Note: I'm no statistician, but I thought you guys might be more familiar with this derivation.
  2. jcsd
  3. Mar 15, 2015 #2
    I think you are right. The step only "divides both sides of the equation by the quantity in the large brackets on the left side" as the text states.

    So, the sign doesn't change and will be the sum of the two terms in the denominator as you wrote out above.
  4. Mar 15, 2015 #3
    But the the mistake is a few steps before that where the text reads "Multiplying out the last term on the right". The writer removes the brackets but only changes the sign for the first term of the brackets. It is supposed to be a minus sign in the denominator (as in a difference of the two terms).
  5. Mar 15, 2015 #4


    User Avatar

    Thank you, TitasB!
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Least Squares Derivation—Simple Date
A Confused about Weighted Least Squares Jan 27, 2018
I Shaky model in least squares fit Jun 16, 2017
I Hessian of least squares estimate behaving strangely Aug 6, 2016
The linear in linear least squares regression Jul 28, 2015
Need linear regression help Dec 13, 2014