Apply the chain rule with a binary variable

275 Views Asked by At

What is the correct way to apply the chain rule if the independent variable is binary?

Concretely, say you have the expression

$\frac{\partial y}{\partial x} = \frac{\partial y}{\partial z}\frac{\partial z}{\partial x}$

and you want to write an analogous expression where x is a binary variable (y and z are continuous). Would the following be correct?

$\frac{\Delta y}{\Delta x} = \left(\lim_{\Delta z \rightarrow 0}\frac{\Delta y}{\Delta z} \right) \frac{\Delta z}{\Delta x}$

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

I understand $x$ can take only two values and you are interested in $\frac{y(z(x_1))-y(z(x_0))}{x_1-x_0}$. Multiply by $1=\frac{z_1-z_0}{z_1-z_0}$ where we define $z_i=z(x_i)$. Rearrange the terms and you get what you wrote but without the limit to zero operation.