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

Creating a least-squares matrix of partial derivatives

  1. Jun 7, 2012 #1
    In the ordinary least squares procedure I have obtained an expression for the sum of squared residuals, S, and then took the partial derivatives of it wrt β0 and β1. Help me to condense it into the matrix, -2X'y + 2X'Xb.

    ∂S/∂β0 = -2y1x11 + 2x110x11 + β1x12) + ... + -2ynxn1 + 2xn10xn1 + β1xn2)

    ∂S/∂β1 = -2y1x12 + 2x120x11 + β1x12) + ... + -2ynxn2 + 2xn20xn1 + β1xn2)

    At least, help me to understand why the two partial derivatives equal the matrix above.
  2. jcsd
  3. Jun 8, 2012 #2


    User Avatar
    Science Advisor

    Since you haven't told us what "yi" or "xij" are or what they have to do with S, [itex]\beta_0[/itex], or [itex]\beta_1[/itex], it is impossible to answer your question.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook