I have two questions:

A) Suppose that we have $$Z=c\sum_i (X_i-a)(Y_i-b)$$ where $X_i$s and $Y_i $s are independent exponential random variables with means equal to $\mu_{X}$ and $\mu_{Y}$ (for $1\le i\le n$). That is $X_i$s are i.i.d random variables and so are $Y_i $s. Besides, $a,b$ and $c$ are real numbers. I want to find the distribution of $Z$ for large enough $n$.

I used central limit theorem (CLT) and found the distribution of Z. I calculated the mean and variance as follows: $$E(Z)=\sum_i c(E(X_i)-a)(E(Y_i)-b)$$ using delta method, I estimated the variance as follows: $$Var(Z)=c^2\sum_i (E(X_i)-a)^2 Var(Y_i)+Var(X_i)(E(Y_i)-b)^2$$ To check if it is correct, I used MATLAB. I considered $n$ to be $200$. I varied $\mu_{X}$ and $\mu_{Y}$ from $1$ to $4$ $({1,2,3,4})$. To simplify my calculation I considered $\mu_{X}=\mu_{Y}$. For each random variable, I created $1,000,000$ samples and calculated PDF of $Z$. But when I compare this PDF with the one I found using CLT they are different! I cannot understand where I made mistake!

B) Another question is that if we have $$Z=c\sum_i (a_i+X_i-a)(b_i+Y_i-b)$$ where $a_i$ and $b_i$ are real numbers. Can I still use CLT to find the PDF of Z? $$E(Z)=\sum_i c(E(X_i)+a_i-a)(E(Y_i)+b_i-b)$$ using delta method, I estimated the variance as follows: $$Var(Z)=c^2\sum_i (E(X_i)+a_i-a)^2 var(Y_i)+var(X_i)(E(Y_i)+b_i-b)^2$$

(again I tested the correctness using MATLAB and faced the same problem!)

I would appreciate if you could help me.

  • $\begingroup$ There are several possibilities. Perhaps $n$ was too small for CLT to kick in. Perhaps there was a programming error. Or perhaps the mean (probably not) and/or variance of $(X_i-a)(Y_i-b)$ were computed incorrectly. In the simulation, what was $n$? What $\mu_X$, $\mu_Y$ were used? What "theoretical" mean was used? What theoretical variance was used? $\endgroup$ – André Nicolas Aug 3 '14 at 4:21
  • 1
    $\begingroup$ It's really hard to tell where you made a mistake when you tell us no details of what you actually did. Of course the results will be "different": the distribution of $Z$ won't be exactly normal. But how different is it? $\endgroup$ – Robert Israel Aug 3 '14 at 7:12
  • $\begingroup$ Thanks, I edited the question. $\endgroup$ – carl Aug 3 '14 at 15:01

In answer to your first question ...

Given $X \sim Exponential(\lambda_1)$ with $E[X] =\lambda_1 $, and $Y \sim Exponential(\lambda_2)$ with $E[Y] =\lambda_2 $, where $X$ and $Y$ are independent. Let:

$$W_i =c (X_i-a) (Y_i-b) \quad \text{and} \quad Z_n = \sum_{i=1}^n W_i$$

Then, by the Lindeberg-Levy version of the Central Limit Theorem:

$$Z_n\overset{a} {\sim }N\big( n E[W], n Var(W)\big)$$

We immediately have: $$E[W] = c \left(\lambda _1-a\right) \left(\lambda _2-b\right)$$

Variance of $W$

The OP attempts to approximate the variance - this is not necessary and causes errors.

By independence, the joint pdf of $(X,Y)$ is $f(x,y)$:

Then, $Var[W]$ is:

where I am using the Var function from the mathStatica package for Mathematica to do the nitty-gritties. All done.

Central Limit Theorem approximation

Here are $100000$ pseudo-random drawings of $Z$ generated in Mathematica, given $n = 200, \lambda_1= 3, \lambda_2 =2,a=2.2,b=4$ ...

zdata = Table[
     xdata = RandomVariate[ExponentialDistribution[1/3], {200}];
     ydata = RandomVariate[ExponentialDistribution[1/2], {200}];
     Total @@ {(xdata - 2.2) (ydata - 4)}, {i, 1, 100000}];

The CLT Normal approximation $N\big(\mu, \sigma^2\big)$ has parameters $\mu = n E[W]$ and $\sigma = \sqrt{n Var(W)}$:

Here, the squiggly BLUE curve is the empirical pdf (from the Monte Carlo data), and the dashed red curve is the Central Limit Theorem Normal approximation. It works very nicely WHEN THE CORRECT variance derivation is used, even with a sample of size $n = 200$.

Central Limit Theorem fit using OP's approximated variance

By contrast, if we use the OP's approximation of Var(Z) to calculate $\sigma$, then the CLT 'fit' is not good at all:


  1. As disclosure, I should add that I am one of the authors of the software used above.

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.