1
$\begingroup$

How does using one distribution as another's sample size affect variance?

For example, let's say I roll a 6-sided dice and record the number shown. Then, I roll 'that many' 6 sided dice more and record the sum of the extra dice rolled. What is the variance for this particular problem, and how does it scale to continuous distributions like the normal distribution?

$\endgroup$
  • 1
    $\begingroup$ Such model is used in the estimation of collective risk in actuarial mathematics. For example, the number of appearing claims is Poisson distributed, while each claim amount is exponential. Check this example, p.6. Expectations are multiplied, the formula for variance is little bit more complicated. $\endgroup$ – Slowpoke May 8 '16 at 2:45
  • $\begingroup$ Compound distributions $\endgroup$ – Slowpoke May 8 '16 at 2:55
  • 1
    $\begingroup$ when you say "scale to continuous distributions" you presumably still want the first variable to be natural number-valued? $\endgroup$ – snarfblaat May 8 '16 at 2:57
  • $\begingroup$ @snarfblaat yes, I should have clarified that. The first variable should still be natural number-valued. $\endgroup$ – Will Sherwood May 8 '16 at 2:58
2
$\begingroup$

Let $N$ take values in the natural numbers and $X_i$ be iid as the other variable; you want the variance of $Y=\sum_{i=1}^N X_i$. The conditional variance formula gives $$Var(Y)=Var(E(Y|N))+E(Var(Y|N))\\ =Var(NE(X_1))+E(NVar(X_1))\\ =(EX_1)^2Var(N)+Var(X_1)EN.$$

In case $N, X_i$ are taken from dice rolls, I get $EX_1=EN=\sum_{i=1}^6i/6=7/2,$ $VarX_1=VarN=\sum i^2/6-(7/2)^2=91/6-49/4$, $VarY=(91/6-49/4)(63/4)$.

$\endgroup$
  • $\begingroup$ You didn't answer the question "What is the variance for this particular problem". It will help me and hopefully others to understand your solution $\endgroup$ – Will Sherwood May 8 '16 at 3:49
  • 1
    $\begingroup$ ok, added some details $\endgroup$ – snarfblaat May 8 '16 at 4:13
0
$\begingroup$

The variance of a single dice roll is $\frac{35}{12}$. The outcomes of the dices are indepedent. Therefore the variance of the sum of n dice rolls is $n\cdot \frac{35}{12}$ You can consider each dice roll as a random variable. And for the sum of $n$ rolls you can apply the central limit theorem. For suffcient large number of dice rolls the sum of the outcomes are normally distributed as $\mathcal N(\mu, \ \sigma ^2)=\mathcal N(3.5\cdot n, \ n\cdot \frac{35}{12}) \ $. 3.5 is the expected value of a single roll.

Let X be the random variable for the sum of $100$ dice rolls. Since it it hard to calculate directly the probility for a specific sum we approximate the distribution by the normal distribution.

Let´s calculate the probability that a sum of $100$ dice rolls is smaller or equal $370$. The expected value is $350$ and the variance is $100\cdot \frac{35}{12}$. Therefore

$$P(X\leq 370)\approx\Phi\left( \frac{x-n\cdot \mu}{\sqrt{n\cdot \sigma}} \right)=\Phi\left( \frac{370-100\cdot 3.5}{\sqrt{100\cdot \frac{35}{12}}} \right)=\Phi(1.1704115)$$

$\Phi(\cdot)$ is the cdf of the standard normal distribution with the expeted value of $\mu=0$ and and the variance of $\sigma ^2=1$. To get the value you can use this calculator or a table. The output of the calculator is $\Phi(1.1704115)=0.87980$

I did some simulations with excel. I made $4,000\times 100$ rolls with one dice (The excel function is RANDBETWEEN) From every 100 rolls I calculated the sum and evaluated if the sum is smaller or equal to 370 or not. The proportion of the 4,000 repeated experiments was, for instance, $0.87875$ But the $4,000$ experiments can be also repeated. Here are some additional values: $0.888,0.87925,0.88875,0.8935,0.87625$

Conclusion: It can be said, that the probability that the sum of 100 rolls is smaller than 371 is about $88\%$. By using the approximation it is not necessary neither to do some simulation nor looking for the exact distribution of $X$.

$\endgroup$
  • $\begingroup$ I'm not sure this is an answer to the question asked. $\endgroup$ – BruceET May 9 '16 at 3:07
  • $\begingroup$ I just wanted practically show that a sum of discrete random variables be comes a normal distributed random variable. This was part of the question. $\endgroup$ – callculus May 9 '16 at 11:00
0
$\begingroup$

Comment:

The very nice Answer by @snarfblatt gives both the derivation and the numerical answer. Sometimes this general type of problem is known as a 'random sum of random variables'.

Here is a brief simulation in R, which may help you visualize the process. It is based on a million repetitions of your experiment. Answers should be accurate to two or three significant digits.

 m = 10^6;  y = numeric(m)
 for(i in 1:m) {
   n = sample(1:6, 1) # how many dice to roll
   y[i] = sum(sample(1:6, n, rep=T)) }
 mean(y)
 ## 12.24234  # aprx E(Y) = (3.5)^2 = 12.25
 sd(t)
 ## 6.774848  # aprx SD(Y) = sqrt(45.9375) = 6.778
 mean(y < 7)
 ## 0.253512  # aprx P(Y < 7)
 pnorm(6.5, 12.25, 6.778)
 ## 0.1981263 # useless normal approximation

A relative frequency histogram of the million simulated totals suggests its pdf, which is only 'partly normal'. (In my experience, assuming 'some kind of CLT' and trying to fit a normal curve is not a feasible way to get probabilities for such random sums.) The values 1 through 6 arise from getting a 1 on the initial die. The largest possible value 36 can result from getting a six on the first die and on all six resulting dice rolls (this occurred 4 times in a million experiments).

enter image description here

$\endgroup$
  • $\begingroup$ Your simulation of two dices shows only that the approximation does not work. This is not suprisingly since you have only two random variables. $\endgroup$ – callculus May 9 '16 at 11:03
  • $\begingroup$ Have you really understood the CLT (for practical purpose) ? $\endgroup$ – callculus May 9 '16 at 11:12
  • $\begingroup$ @callculus: I feel that the CLT is irrelevant to this problem. It seems clear that by 'scaling to continuous distributions', OP was asking for theory that includes the possibility of continuous $X_i$ as in the complete answer from snarfblatt. $\endgroup$ – BruceET May 10 '16 at 0:34

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.