Learn¶
A derivative describes the local rate of change of a function. Approximate it by a difference quotient over a small interval. The derivative is the limit as that interval approaches zero, when the limit exists. It is not generally a constant over a large interval.
A gradient collects partial derivatives for a function with several inputs. Each partial derivative varies one input while holding the other coordinates fixed. Optimization algorithms use this local information to choose a direction. The units of a derivative depend on the units of its output and input.
A derivative inside a fitted prediction function is not automatically a causal effect. Holding model coordinates fixed is a mathematical operation. A physical intervention can change other variables through causal mechanisms. To interpret a derivative causally, specify the causal model and the intervention that the derivative represents.
Practice¶
Solution
The partial derivatives are 2x and 6y. Substitute the point to obtain the gradient (4,-6). This vector gives local change in the two coordinate directions.
Check your understanding¶
Does a nonzero regression derivative by itself prove a causal effect?
A. Yes, for every fitted function
B. No, it needs causal assumptions
C. Yes, if the derivative is large
Show the answer
B. No, it needs causal assumptions
A prediction function can reflect confounding or selection. A causal interpretation needs a justified model of interventions and mechanisms.
Sources¶
This lesson draws on Illowsky & Dean, 2023Peters et al., 2017.
Next: L3-07 · Expectation and variance
- Illowsky, B., & Dean, S. (2023). Introductory Statistics 2e. https://openstax.org/books/introductory-statistics-2e/pages/1-introduction
- Peters, J., Janzing, D., & Scholkopf, B. (2017). Elements of Causal Inference. https://mitpress.mit.edu/9780262037310/elements-of-causal-inference/