How do a find the variance of a nonlinear combination of random variables. Say I want to find the variance of the quantity

$$\hat{\beta} = AB\exp(AC) + C$$

in function of the variances and covariances of A, B and C, which are known. Consider A, B and C estimators, with also values of their estimates available. What is ${\rm Var}(\hat{\beta})$?

  • 1
    $\begingroup$ I don't see why any symbolic software such as Mathematica wouldn't work? $\endgroup$ – Aksakal Feb 20 '18 at 17:37
  • $\begingroup$ I think Stata can do this with the lincom command. $\endgroup$ – AdamO Feb 20 '18 at 17:40
  • 1
    $\begingroup$ @AdamO I am guessing you meant nlcom. However, that will only work after an actual estimation command, rather taking an immediate argument. $\endgroup$ – Dimitriy V. Masterov Feb 20 '18 at 17:54
  • 2
    $\begingroup$ @Knarpie, do you know the derivation? Would you want to post it as an answer, if this thread were reopened? Asking for software is off topic here, but asking for the derivation isn't. $\endgroup$ – gung - Reinstate Monica Feb 21 '18 at 14:27
  • 3
    $\begingroup$ @gung Yes please. I thought I had a software issue, but it turns out my understanding of the stats was lacking. I removed the part on the software, even though I disagree about it being off topic. When the questions get so technical, only statisticians will be able to point you to the right software. Also the wide interest in this question shows that it is useful to many. $\endgroup$ – Knarpie Feb 21 '18 at 15:27

Even though the original question was asking for a software, the "hard" part is in statistical theory. The answer is called the multivariate delta method, which states that, given a variance-covariance matrix

$$V = \begin{bmatrix} \sigma^2_{A} & \sigma_{A, B} & \sigma_{A, C}\\ \sigma_{A, B} & \sigma^2_{B} & \sigma_{B, C} \\ \sigma_{A, C} & \sigma_{B, C} & \sigma^2_{C} & \end{bmatrix} $$

and defining the gradient of $\hat{\beta}$

$$\nabla \hat{\beta}(A,B,C) = \begin{bmatrix} \frac{\partial \beta}{\partial A}\\ \frac{\partial \beta}{\partial B}\\ \frac{\partial \beta}{\partial C}\\ \end{bmatrix}$$

The required variance is approximately

$$Var(\hat{\beta}) \approx \nabla \hat{\beta}^t V \nabla \hat{\beta}$$

Given the difficult formula for $\hat{\beta}$, finding the gradient is the "difficult" part, but indeed any symbolic software is able to carry out this symbolic derivation.

  • 1
    $\begingroup$ The delta method is an approximation, an important point to note. The delta method does work in all scenarios, and Mathematica can find the derivatives. The question could be made much more sophisticated by considering that certain linear and nonlinear combinations of RVs form known RVs whose variance could be expressed exactly. $\endgroup$ – AdamO Feb 21 '18 at 15:51
  • 1
    $\begingroup$ First, the delta method is an approximation -- and it may not necessarily be a good approximation. Second, you are seeking the answer in terms of the known variances and covariances of $A$, $B$ and $C$. It is not transparent to me that the delta method will provide a solution in terms of the known variances and covariances. Third, given your functional form [with exp($AC$) ], it will not be possible to provide a general solution just in terms of the variances and covariances of $A$, $B$ and $C$. Even without the exponent, say $Z = A B C +C$ it would be tough to express $Var(Z)$ as requested. $\endgroup$ – wolfies Feb 21 '18 at 16:10
  • 1
    $\begingroup$ @wolfies I agree to your first point. Concerning your second and third: I modified the question such that also estimates of A, B and C are available, which will also be present in the final solution for the variance. Does this address your concerns? $\endgroup$ – Knarpie Feb 21 '18 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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