Skip to main content
1 of 5
Zhanxiong
  • 21.2k
  • 2
  • 46
  • 89

Let's approximate the probability of interest $P\left(\sum_{i = 1}^{1296}X_i \leq 3600\right)$ in two ways to verify if the CLT approximation is reliable for this specific problem.

CLT Approximation

As usual, denote the i.i.d. sum $X_1 + X_2 + \cdots + X_n$ by $S_n$. Using the moments calculated in whuber's answer, the classical CLT tells us \begin{align*} \frac{S_n - \frac{17}{6}n}{\sqrt{\frac{107}{36}n}} \to_d Z \sim N(0, 1). \tag{1}\label{1} \end{align*} According to $\eqref{1}$, $P\left(\sum_{i = 1}^{1296}X_i \leq 3600\right)$ can be evaluated as follows: \begin{align*} & P\left(\sum_{i = 1}^{1296}X_i \leq 3600\right) \\ =& P(S_{1296} \leq 3600) \\ =& P\left(\frac{S_{1296} - \frac{17}{6} \times 1296}{\sqrt{\frac{107}{36} \times 1296}}\leq \frac{3600 - \frac{17}{6} \times 1296}{\sqrt{\frac{107}{36} \times 1296}} \right) \\ \approx & P(Z \leq -1.160084) \\ =& \Phi(-1.160084) = 0.1230073. \tag{2}\label{2} \end{align*}

Monte Carlo Simulation

To validate if $\eqref{2}$ is a good approximation, let's simulate $N$ samples $$\mathcal{S}_i = \{X_1^{(i)}, \ldots, X_{1296}^{(i)}\}, i = 1, \ldots, N$$ from the density $f$ directly, and use the proportion of $\frac{1}{N}\sum_{i = 1}^N I\left(X_1^{(i)} + \ldots + X_{1296}^{(i)} \leq 3600\right)$ to approximate $P\left(\sum_{i = 1}^{1296}X_i \leq 3600\right)$. The R code and results are as follows:

N <- 100000
S <- matrix(sample(c(0, 3, 4), size = N * 1296, replace = TRUE) + runif(N * 1296),
            nrow = N, ncol = 1296)
iidSum <- rowSums(S)
mean(iidSum <= 3600)
#  0.1221

The Monte Carlo estimate 0.1221 (your run may be different from mine for different random seeds) shows that the CLT approximation 0.1230073 is quite accurate.

Zhanxiong
  • 21.2k
  • 2
  • 46
  • 89