Why an Average Derivative Needs a Density Correction
A conditional mean \(m(x)=E[Y\mid X=x]\) describes how the mean outcome varies with covariates. Its derivative describes a local change: when \(X\) is scalar, \(m'(x)\) is the change in conditional mean outcome per unit increase in \(x\), at the value \(x\). A common summary is the average derivative, \(E[m'(X)]\). It averages those local slopes over the covariate distribution, rather than evaluating the slope at one selected covariate value.
The influence function for this target has two parts. One reflects how the distribution of covariates changes the average of the slopes. The other reflects how changes in the conditional mean affect the slopes. Integration by parts expresses the second part using the derivative of the covariate density. This yields a density correction that can become large where the density changes sharply, so conditions for square-integrability matter.
Model and Conditions
For the derivation, consider a regular submodel of the joint distribution of \((Y,X)\), indexed by \(t\), with the true distribution at \(t=0\). Let its score be \(s(Y,X)\), with mean zero and finite second moment. Decompose it into the marginal covariate score and conditional outcome score: \(s(Y,X)=s_X(X)+s_{Y\mid X}(Y\mid X)\), where \(E[s_{Y\mid X}\mid X]=0\). Write \(m_t(x)=E_t[Y\mid X=x]\) and \(f_{X,t}(x)\) for the conditional mean and covariate density along this submodel.
Assume the support of \(X\) is fixed along the submodel; \(m\) and the relevant pathwise derivatives are differentiable in \(x\); and differentiation under the integral is valid. Require the boundary term \(f_X(x)\dot m(x)\) to vanish at the support endpoints, where \(\dot m(x)=\left.\frac{\partial}{\partial t}m_t(x)\right|_{t=0}\). On unbounded support, this means sufficient tail decay; in more than one dimension, the corresponding boundary terms must vanish in each coordinate. Also require the integrals below to exist. These are substantive regularity conditions, not automatic consequences of finite \(E[Y^2]\).
Finally, for the resulting expression to be an influence function in \(L^2(P)\), a useful explicit sufficient condition is \(E[(m'(X)-\theta)^2]<\infty\) and \(E[q_X(X)^2\operatorname{Var}(Y\mid X)]<\infty\). The second condition controls the residual part. It is the weighted conditional-variance condition that ordinary finite outcome variance does not replace.
Derivation by Integration by Parts
An influence function \(\phi(Y,X)\) represents the derivative of the target along every regular submodel: the derivative must equal \(E[\phi(Y,X)s(Y,X)]\). To find that representation, differentiate \(\theta_t=\int m_t'(x)f_{X,t}(x)\,dx\). The conditional mean derivative follows from the conditional score: \(\dot m(x)=E[(Y-m(x))s_{Y\mid X}(Y\mid X)\mid X=x]\).
The first equality differentiates both the conditional mean and the covariate distribution. Since \(E[s_X(X)]=0\), subtracting \(\theta\) in the second term does not change it. For the next equality, integration by parts gives \(\int \dot m'(x)f_X(x)\,dx=[\dot m(x)f_X(x)]-\int \dot m(x)f_X'(x)\,dx\); the boundary condition removes the bracketed term, and \(f_X'=f_Xq_X\). Substituting the conditional-score formula for \(\dot m\) gives the final line.
Now consider the candidate \(\phi(Y,X)=m'(X)-\theta-(Y-m(X))q_X(X)\). Its covariance with the marginal score is the second expectation in the display: the residual term has conditional mean zero given \(X\). Its covariance with the conditional score is the first expectation, because \(m'(X)-\theta\) is fixed given \(X\) and \(E[s_{Y\mid X}\mid X]=0\). Thus it represents the derivative. Under the stated \(L^2(P)\) condition, it is a square-integrable influence function; in the unrestricted regular joint model it is the efficient influence function.
Worked Examples
Worked Example: Normal Covariate and a Linear Conditional Mean
Suppose, hypothetically, that \(X\sim N(2,4)\), and \(Y=m(X)+\varepsilon\), where \(m(x)=1+0.5x\), \(E[\varepsilon\mid X]=0\), and \(\operatorname{Var}(\varepsilon\mid X)=9\). Assume the conditional residual has the stated variance and the regular submodels satisfy the fixed-support and tail conditions. Check the weighted moment condition and derive the influence function and its variance.
The average derivative is \(\theta=E[m'(X)]=0.5\), since \(m'(x)=0.5\) everywhere. The normal density has spatial score \(q_X(x)=-(x-2)/4\). Therefore \(\phi(Y,X)=0.5-0.5-\varepsilon[-(X-2)/4]=\varepsilon(X-2)/4\).
The weighted moment is \(E[(X-2)^2\operatorname{Var}(Y\mid X)]=9E[(X-2)^2]=9(4)=36<\infty\). The centered slope has finite second moment as well, and the normal tails satisfy the integration-by-parts boundary condition for regular directions with suitable decay. The influence-function variance is \(E[\phi^2]=E[\varepsilon^2]E[(X-2)^2]/16=9(4)/16=2.25\), using the constant conditional variance and mean-zero residual. Thus this influence function is square-integrable, with standard deviation \(1.500\). The units of \(\phi\) are outcome per unit of \(X\).
Worked Example: A Density That Vanishes at Its Boundaries
Suppose, hypothetically, \(X\) has density \(f_X(x)=6x(1-x)\) on \(0<x<1\), and \(Y=m(X)+\varepsilon\), where \(m(x)=x^2\), \(E[\varepsilon\mid X]=0\), and \(\operatorname{Var}(\varepsilon\mid X)=x(1-x)\). Assume regular fixed-support submodels whose conditional-mean path derivatives are bounded at the endpoints. Find the influence function, verify its residual moment, and evaluate it at one observation.
Here \(m'(x)=2x\). The density is symmetric about \(1/2\), so \(E[X]=1/2\) and \(\theta=E[2X]=1\). Its spatial score is \(q_X(x)=1/x-1/(1-x)=(1-2x)/(x(1-x))\). The boundary term vanishes because \(f_X(x)\) tends to zero at both endpoints and the path derivatives are bounded. The weighted residual moment is \(E[q_X(X)^2\operatorname{Var}(Y\mid X)]=6\int_0^1(1-2x)^2\,dx=6(1/3)=2\), which is finite. Also, \(2X-1\) is bounded, so its second moment is finite.
The influence function is \(\phi(Y,X)=2X-1-\varepsilon(1-2X)/(X(1-X))\). For the hypothetical observation \(X=0.25,\ Y=0.5625\), the conditional mean is \(m(0.25)=0.0625\), so the residual is \(0.5\). The density score is \(1/0.25-1/0.75=8/3\), and hence \(\phi=-0.5-(0.5)(8/3)=-1.833\) to four significant figures. This is an influence-function value, not a slope at that observation.
As a further check, the centered-slope term has variance \(4\operatorname{Var}(X)=4(1/20)=0.2\), since a Beta(2,2) variable has variance \(1/20\). The residual term has variance \(2\); their covariance is zero by conditional mean zero. Thus \(E[\phi^2]=0.2+2=2.2\).
Worked Example: Two Average Partial Derivatives
Suppose, hypothetically, \(X=(X_1,X_2)\) has independent components \(X_1\sim N(1,9)\) and \(X_2\sim N(0,1)\), and \(Y=m(X)+\varepsilon\), where \(m(x_1,x_2)=2+3x_1-2x_2\), \(E[\varepsilon\mid X]=0\), and \(\operatorname{Var}(\varepsilon\mid X)=4\). Assume regular submodels with the required multivariate tail behavior. Derive both coordinate influence functions and check their weighted moments.
The average partial derivatives are \(\theta_1=E[\partial_1m(X)]=3\) and \(\theta_2=E[\partial_2m(X)]=-2\). The coordinate spatial scores are \(q_1(x)=-(x_1-1)/9\) and \(q_2(x)=-x_2\). Applying the scalar derivation coordinate by coordinate gives \(\phi_1=3-3-\varepsilon q_1(X)=\varepsilon(X_1-1)/9\) and \(\phi_2=-2-(-2)-\varepsilon q_2(X)=\varepsilon X_2\).
For coordinate 1, the weighted moment is \(E[(X_1-1)^2\operatorname{Var}(Y\mid X)]=4(9)=36\); for coordinate 2 it is \(E[X_2^2\operatorname{Var}(Y\mid X)]=4(1)=4\). Both are finite, and the normal tails satisfy the boundary condition. The variances are \(E[\phi_1^2]=4(9)/81=4/9\) and \(E[\phi_2^2]=4(1)=4\). Their covariance is \(4E[(X_1-1)X_2]/9=0\), by independence and the centered covariates. Each influence function is measured in outcome units per unit of its corresponding covariate.
Multivariate Form and Interpretation
For a vector \(X=(X_1,\ldots,X_p)\), define \(m(x)=E[Y\mid X=x]\) and \(\theta_j=E[\partial_jm(X)]\). If the coordinatewise integration-by-parts conditions hold, let \(q_j(x)=\partial_j\log f_X(x)\). The influence function for coordinate \(j\) is \(\phi_j(Y,X)=\partial_jm(X)-\theta_j-(Y-m(X))q_j(X)\). The same logic applies: changes in the covariate distribution contribute the centered partial derivative, while changes in the conditional mean are converted by integration by parts into the residual-density-score term.
The density correction is essential because the target averages slopes under the distribution of \(X\). It does not turn an associational derivative into a causal effect. Interpreting it causally requires additional design and identification assumptions beyond the influence-function calculation. The formula instead describes local sensitivity of a statistical functional to perturbations of the joint distribution.
Common Mistake: Finite Outcome Variance Is Not Enough
A tempting but incorrect argument is: “\(E[Y^2]\) is finite, so every term in the influence function has a finite second moment.” The residual term is multiplied by \(q_X(X)\), which can be large in parts of the covariate space. The relevant condition is \(E[q_X(X)^2\operatorname{Var}(Y\mid X)]<\infty\), not merely \(E[Y^2]<\infty\). For a normal covariate, this includes a weighted residual moment such as \(E[(X-\mu)^2\operatorname{Var}(Y\mid X)]<\infty\), up to a finite scale factor.
If that condition fails, the displayed expression may still be a formal derivative representation for a restricted set of paths, but it is not a square-integrable influence function in the stated model. In that case it does not provide the usual finite-variance efficiency bound. Check the weighted moment explicitly rather than inferring it from ordinary finite moments.
Check Your Understanding
Use the assumptions stated in each question and show the key calculation.
- For scalar \(X\), write the average derivative and state the units of the target.
- Why does the integration-by-parts step require a boundary condition on \(f_X(x)\dot m(x)\)?
- If \(X\sim N(\mu,\sigma^2)\), what is \(q_X(x)\), and what sign does this imply for the residual correction in the influence function?
- Explain why finite \(E[Y^2]\) alone does not ensure that the residual-density-score term is square-integrable.
- In the two-coordinate example, what is the weighted conditional-variance moment for the second coordinate, and why is it finite?