Let us assume we have two parameters, $p_1$ and $p_2$. We also have two maximum likelihood estimators $\hat{p}_1$ and $\hat{p}_2$ and two confidence intervals for these parameters. Is there a way to build a confidence interval for $p_1p_2?$
3 Answers
You can use the Delta method to calculate the standard error of $\hat{p}_{1}\hat{p}_{2}$. The delta method states that an approximation of the variance of a function $g(t)$ is given by: $$ \mathrm{Var}(g(t))\approx \sum_{i=1}^{k}g'_{i}(\theta)^{2}\,\mathrm{Var}(t_{i})+2\sum_{i>j}g'_{i}(\theta)g'_{j}(\theta)\,\mathrm{Cov}(t_{i},t_{j}). $$ The approximation of the expectation of $g(t)$ on the other hand is given by: $$ \mathrm{\mathbf{E}}(g(t))\approx g(\theta) $$ So the expectation is simply the function. Your function $g(t)$ is: $g(p_{1}, p_{2})=p_{1}p_{2}$. The expectation of $g(p_{1}, p_{2})=p_{1}p_{2}$ would simply be: $p_{1}p_{2}$. For the variance, we need the partial derivatives of $g(p_{1}, p_{2})$: $$ \begin{align} \frac{\partial}{\partial p_{1}}g(p_{1}p_{2}) & = p_{2} \\ \frac{\partial}{\partial p_{2}}g(p_{1}p_{2}) &= p_{1} \\ \end{align} $$
Using the function for the variance above, we get:
$$ \mathrm{Var}(\hat{p}_{1}\hat{p}_{2})=\hat{p}_{2}^{2}\,\mathrm{Var}(\hat{p}_{1}) + \hat{p}_{1}^{2}\,\mathrm{Var}(\hat{p}_{2})+2\cdot \hat{p}_{1}\hat{p}_{2}\,\mathrm{Cov}(\hat{p}_{1},\hat{p}_{2}). $$ The standard error would then simply be the square root of the above expression. Once you've got the standard error, it is straight-forward to calculate a $95\%$ confidence interval for $\hat{p}_{1}\hat{p}_{2}$: $\hat{p}_{1}\hat{p}_{2}\pm 1.96\cdot \widehat{\mathrm{SE}}(\hat{p}_{1}\hat{p}_{2})$
To calculate the standard error of $\hat{p}_{1}\hat{p}_{2}$, you need the variance of $\hat{p}_{1}$ and $\hat{p}_{2}$ which you usually can get by the variance-covariance matrix $\Sigma$ which would be a $2\times 2$-matrix in your case because you have two estimates. The diagonal elements in the variance-covariance matrix are the variances of $\hat{p}_{1}$ and $\hat{p}_{2}$ while the off-diagonal elements are the covariance of $\hat{p}_{1}$ and $\hat{p}_{2}$ (the matrix is symmetric). As @gung mentions in the comments, the variance-covariance matrix can be extracted by most statistical software packages. Sometimes, estimation algorithms provide the Hessian matrix (I won't go into details about that here), and the variance-covariance matrix can be estimated by the inverse of the negative Hessian (but only if you maximized the log-likelihood!; see this post). Again, consult the documentation of your statistical software and/or the web on how to extract the Hessian and on how to calculate the inverse of a matrix.
Alternatively, you can get the variances of $\hat{p}_{1}$ and $\hat{p}_{2}$ from the confidence intervals in the following way (this is valid for a $95\%$-CI): $\mathrm{SE}(\hat{p}_{1})=(\text{upper limit} - \text{lower limit})/3.92$. For an $100(1-\alpha)\%$-CI, the estimated standard error is: $\mathrm{SE}(\hat{p}_{1})=(\text{upper limit} - \text{lower limit})/(2\cdot z_{1-\alpha/2})$, where $z_{1-\alpha/2}$ is the $(1-\alpha/2)$ quantile of the standard normal distribution (for $\alpha=0.05$, $z_{0.975}\approx 1.96$). Then, $\mathrm{Var}(\hat{p}_{1}) = \mathrm{SE}(\hat{p}_{1})^{2}$. The same is true for the variance of $\hat{p}_{2}$. We need the covariance of $\hat{p}_{1}$ and $\hat{p}_{2},$ too (see paragraph above). If $\hat{p}_{1}$ and $\hat{p}_{2}$ are independent, the covariance is zero and we can drop the term.
This paper might provide additional information.

- 3,664
- 5
- 18
- 35

- 25,317
- 8
- 73
- 123
-
5+1. The variances of the parameters & their covariance can be found by examining the variance-covariance matrix of $\boldsymbol\beta$, which most statistical software can provide. Eg, in R, it's [?vcov](http://stat.ethz.ch/R-manual/R-patched/library/stats/html/vcov.html); & in SAS, `covb` is added [as an option to the model statement in PROC REG](http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_reg_sect033.htm). – gung - Reinstate Monica Jun 29 '13 at 18:11
-
2@gung On a point of pedantry it might be worth pointing out (because I know it confuses some people) that it's really the variance-covariance matrix of $\hat \beta$ rather than $\beta$ (and in fact it isn't even really that, because the standard deviation has to be estimated from the sample, so it's really the *estimated* variance-covariance matrix..) – Silverfish Dec 21 '15 at 16:32
-
4@Silverfish, duly chastised. Next time I'll say "the estimated variance-covariance matrix of $\boldsymbol{\hat\beta}$". – gung - Reinstate Monica Dec 21 '15 at 17:54
-
2You could try to construct a profile likelihood function! and construct the confidence interval from that. – kjetil b halvorsen Sep 30 '17 at 13:21
-
Isn’t $var(p_1)=0$ since it’s a parameter? – sjw Dec 07 '18 at 16:48
-
@user0 Yes, the (unknown) parameter, i.e. the true population value of $p_1$ has zero variance since it's assumed to be fixed. But the question seeks a confidence interval for the *estimates* of these parameters, and these estimates have corresponding variances. – COOLSerdash Dec 07 '18 at 19:03
-
Then $var(p_1p_2)$ above, should the ps have hats? – sjw Dec 08 '18 at 17:26
-
@user0 Ah yes, of course. Thanks for noticing. – COOLSerdash Dec 08 '18 at 20:00
-
Sorry, just to clarify, if we expect the product of p1_hat and p2_hat to be significantly non-normal, we wouldn't be able to use the standard normal-based CI for it, would we? In that case just knowing the variance wouldn't be enough, I think. Is a Bayesian approach [like this](https://stats.stackexchange.com/questions/493716/accounting-for-multiple-layers-of-uncertainty-in-a-model) a better option in that scenario? – Nayef Sep 17 '21 at 16:22
-
The delta method is justified asymptotically by the CLT, yes. So for small samples or proportions near the boundary I would be suspicious. Another possibility to calculate confidence intervals is the bootstrap or some Bayesian approach. – COOLSerdash Sep 17 '21 at 16:31
I found a different equation for calculation of variance of product.
If x and y are independently distributed, the variance of the product is relatively straightforward: V(x*y)= V(y)*E(x)^2 + V(x)*E(y)^2 + V(x)*V(y) These results also generalize to cases involving three or more variables (Goodman 1960). Source: Regulating Pesticides (1980), appendix F
Coolserdash: The last component V(x)*V(y) is missing in your equation. Is the referenced book (Regulating Pesticides) wrong?
Also, both equations might not be perfect. "... we show that the distribution of the product of three independent normal variables is not normal." (source). I would expect some positive skew even in the product of two normally distributed variables.

- 31
- 1
- The length of the CI / 2 / 1.96 = se, i.e. the standard error of A or B
- se^2 = var, i.e. the variance of the estimate A or B
- Use the estimated A or B as the means of A or B, i.e. E(A) or E(B)
- Follow this page http://falkenblog.blogspot.se/2008/07/formula-for-varxy.html to get var(A*B), i.e. var(C)
- Square-root of var(C) is the se of C
- (C - 1.96*se(C), C + 1.96*se(C)) is the 95% CI of C
Note that if your A and B are correlated, you need to consider their covariance as well.

- 167
- 1
- 3