How can I find the standard deviation of the sum of a series of rolls of a weighted die?

97 Views Asked by At

Let's say you possess an $n$-sided weighted die with probabilities $p_1, p_2, ...,p_n$ of landing on sides $1,2,...,n$ such that $\sum\limits_k p_k = 1 $. What is the standard deviation of the sum of $k$ rolls?

Example: $n=3, p_1=0.25, p_2=0.25, p_3=0.5, k=2$.

The sum is $2$ with probability $\frac{1}{16}$, $3$ with probability $\frac{1}{8}$, $4$ with $\frac{5}{16}$, $5$ with $\frac{1}{4}$, $6$ with $\frac{1}{4}$.

$\mu= \frac18+\frac38+\frac54+\frac54+\frac32=4.5$

$\sigma = \sqrt{\frac{2.5^2}{16}+\frac{1.5^2}{8}+5\frac{0.5^2}{16}+\frac{0.5^2}{4}+\frac{1.5^2}{4}}=\sqrt{1.375}\approx 1.172$.

My question is how to generalize this so that I can find it quickly for very large n and k ($n=100, k=1000000$ or so). I don't necessarily need an exact answer (although one is preferred), a good approximation will suffice.

Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

Whenever we have independent events $X_1, X_2, ..., X_k$, we have the following formula:

$Var(X_1 + X_2 + ... + X_k) = Var(X_1) + Var(X_2) + ... + Var(X_k)$

Where $Var(X)$ is the variance of $X$. In the case where the $X$s are IID (independent and identically distributed) with distribution $X$, we have

$Var(X_1 + X_2 + ... + X_k) = k Var(X)$

Using the fact that $Var(X) = E[X^2] - (E[X])^2$, we end up with a variance for rolling a single die of

$\sum\limits_{i = 1}^n p_i i^2 - (\sum\limits_{i = 1}^n p_i i)^2$

And thus the variance of rolling $k$ dice is

$k (\sum\limits_{i = 1}^n p_i i^2 - (\sum\limits_{i = 1}^n p_i i)^2)$

The standard deviation will be the square root of this quantity.