0
$\begingroup$

Suppose I have the following function, representing a linear model with an interaction term: $$ f(x, y) = \beta_{1} x + \beta_{2} y + \beta_{3} xy. $$

Now I want to see how the function changes if both $x$ and $y$ change. I can calculate it exactly by doing: $$ \Delta f = f(x + \Delta x, y + \Delta y) - f(x, y), \\[0.5em] \phantom{abcdefghijklm}= (\beta_{1} + \beta_{3}y)\Delta x + (\beta_{2} + \beta_{3}x)\Delta y + \beta_{3}\Delta x \Delta y. $$ How can I approximate this result using derivatives? If I apply the total derivative, i.e summing the partial derivatives I am missing the last term: $$ \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y} = (\beta_{1} + \beta_{3}y) + (\beta_{2} + \beta_{3}x) $$ The last term only appears when adding $\partial f/\partial x \partial y$, but I don't understand why I'd have to do that.

Thanks in advance for any useful hints!

$\endgroup$

1 Answer 1

3
$\begingroup$

You already are approximating $f$ using the derivative. If $\Delta x$ and $\Delta y$ are both "small", then $\Delta x \Delta y$ will be "very small," i.e. $\Delta x \Delta y \approx 0 $ and hence $$ (\beta_1 + \beta_3y)\Delta x + (\beta_2 + \beta_3 x)\Delta y + \beta_3 \Delta x \Delta y \approx (\beta_1 + \beta_3y)\Delta x + (\beta_2 + \beta_3 x)\Delta y . $$ It seems like you're wondering why the approximation is not exact, but why should you expect the approximation to be exact when you are using an affine linear approximation (the tangent plane) to approximate a quadratic function?

Maybe the confusion is because your linear model is not a linear function. "Linear model" means that the function is linear in the parameters $\beta_i$, while "linear function" would mean $f$ is linear in the variables $x$ and $y$, which it is not.

More precisely, remember that the derivative helps us define the best affine linear approximation to the function $f$, viz. the tangent plane $T_p f$. The tangent plane is a first-order (affine linear) Taylor approximation to $f$ in a neighborhood of the point $p$. However, the term $\Delta x \Delta y$ is a second-order term and is not included in the first-order approximation. If you used a second-order (quadratic) Taylor approximation instead you would be able to perfectly approximate your quadratic function $f$.

$\endgroup$

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.