About Posts which Tagged by 'Probability'
For each $j$ let $X_j$ have the uniform distribution in $[-j,j]$. We have $$\begin{array}{rl}
\mathscr{E}(X_j) &=\frac{-j+j}{2}=0; \\
\sigma^2(X_j) &=\frac{[j-(-j)]^2}{12}=\frac{j^2}{3}\;\Rightarrow\; \\
\sigma^2_n &=\sigma^2(S_n)=\sum_{j=1}^n\sigma^2(X_j)=\sum_{j=1}^n\frac{j^2}{3}=\frac{n(n+1)(2n+1)}{18}.
\end{array}$$The Lindeberg's condition is defined as, for all $\eta>0$, $$\begin{array}{rl}
\frac{1}{\sigma^2_n}\sum_{j=1}^n\mathscr{E}\left(X_j^2\,I\{|X_j|>\eta\sigma_n\}\right)
&
= \frac{1}{\sigma^2_n}\sum_{j=1}^n\mathscr{E}\left(X_j^2\,I\{X_j^2>\eta^2\sigma_n^2\}\right) \\
(\because\,|X_j|\leq n) & \leq \frac{1}{\sigma^2_n}\sum_{j=1}^n\mathscr{E}\left(X_j^2\,I\{n^2>\eta^2\sigma_n^2\}\right) \\
& = \frac{1}{\sigma^2_n}\left[\sum_{j=1}^n\mathscr{E}(X_j^2)\right]\,I\left\{1>\frac{\eta^2\sigma_n^2}{n^2}\right\} \\
& = I\{1>\eta^2\frac{(n+1)(2n+1)}{18n}\}\rightarrow0\mbox{ as }n\rightarrow\infty, \\
\end{array}$$since $(n+1)(2n+1)/18n\rightarrow\infty$ as $n\rightarrow\infty$. Hence Lindeberg's condition holds. Then $$\frac{S_n-\mathscr{E}(S_n)}{\sigma_n}\sim\frac{3}{\sqrt{n}}\left(\frac{S_n}{n}\right)\overset{d}{\rightarrow}\mathscr{N}(0,1).$$
The R code for simulating this result is shown as follows.
set.seed(100)
# set simulation time and total number of summation
sim <- 1000; n <- 100
# simulate sample
s <- sapply(1:sim, function(k) sum(sapply(1:n, function(i) runif(1,-i,i))))
# calculate means
m <- s/n
# draw result
hist(m, freq = FALSE, xlab = 'mean', main = '', border = 'white', col = 'gray')
title(paste0('Histogram of the Mean of Unif(-i,i), i=1,2,..., n'), line = 2)
title(paste0('n = ', n, '; Simulation times = ', sim), line = 0.6)
# compare to normal distribution
curve(dnorm(x, 0, sqrt(n)/3), col = 2, lwd = 2, add = TRUE)
legend('topleft', expression(N(0,sqrt(n)/3)), col = 2, lty = 1, lwd = 2, bty = 'n')
沒有留言:
張貼留言