I was given a task to show empirically that the scattering holds up Cramer rao low bound.
At first I had to calculate the estimator $ T' = E(2X_1\mid \max X_i)$
which is equal to $=\frac{n+1}{n} \max X_i$
Then I was need to run a sample in R with some parameters.
Here is my code:
theta = 5
n = 1000
error1 = c()
error2 = c()
for (i in 1:15){
U = runif(n, min=0, max = 5)
T_1 = 2*U[1]
T_2 = ((n+1)/n)*max(U)
error1 = c(error1, (T_1-theta)^2)
error2 = c(error2, (T_2-theta)^2)
}
Ok, now for Cramer rao low bound I have to calculate $\frac{1}{I(\theta)}$
but there is no Fisher information for $U\sim[0,\theta]$
So, how can I show empirically (in R) that Cramer rao low bound hold here?
Best Answer
Cramer - Rao lower bound does not hold for Uniform distribution not only due to the absence of regularity. The estimator $\frac{n+1}{n}\max X_i$ has the variance $$ \text{Var}\left(\frac{n+1}{n}\max X_i\right) = \dfrac{\theta^2}{n(n+2)} $$ which does not bounded from below by $\frac{\text{const}}{n}$.