Can I differentiate a quadratic regression model formula with the form

$$Y_i=\beta_0+\beta_1 X_{1i} +\beta_2 X_{1i}^2+\epsilon_i$$

(added to this formula would be other control variables e.g dummy variables) to obtain the correlation between X and Y holding everything else constant? Also, if I were to add a female dummy variable, how would the correlation of X and Y differ between men and women? Or would the correlation be the same?


1 Answer 1


For the above equation is differentiable, and hence the partial derivatives will exist:

$\frac{\partial Y}{\partial X_2}= 2\beta_2X_2$.

Adding a dummy variable should not affect the above derivative for all practical purposes - the function will be differentiable a.e.

(note that you can't differentiate with respect to a dummy variable though)


After the question was modified, the new expression of the partial derivative would be:

$\frac{\partial Y}{\partial X_1}=\beta_1+ 2\beta_2X_1$.

  • $\begingroup$ Your answer may have been affected by a typo by an editor who transcribed an image into MathJax. The $X_{2i}$ is supposed to be $X_{1i}$ according to OP's original question. $\endgroup$
    – Herr K.
    Aug 10, 2020 at 17:43
  • $\begingroup$ Ah. Thanks for correcting the question! $\endgroup$
    – user28372
    Aug 10, 2020 at 18:16
  • $\begingroup$ @Tomcat, OP's question is about a polynomial regression model. Thus, the partial derivative calculated differently. See this post here stats.stackexchange.com/questions/52585/… $\endgroup$
    – london
    Aug 10, 2020 at 18:49
  • $\begingroup$ The question was different when I posted the answer, as pointed out in the first comment to thIs post. Will make the necessary edits when I’m free, but the partial derivative is not calculated differently for linear or polynomial functions, the definition is still the same (the value will of course be different) $\endgroup$
    – user28372
    Aug 10, 2020 at 21:32
  • $\begingroup$ @london this thread was very helpful. Thank you for pointing it out! $\endgroup$ Aug 12, 2020 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.