As you can see in the plots above, the value of Beta does influence how fast the coverage kicks in, with higher beta values kicking in the 95% interval quicker.
Problem S2
loglik.alpha <-function(a,y) { n <-length(y) likel <--n*log(gamma(a))-n*a*log(mean(y)/a) + (a-1)*sum(log(y))-a*nreturn(likel)}get.mle <-function(y) { a <-optimize(loglik.alpha,c(0,30),y = y,maximum =TRUE)$maximum b <-mean(y)/areturn(c(a,b))}ps2df <- (parameters(~n,c(5,20,50,100,150,200))%>%add_trials(10000)%>%mutate(Yn =map(n,\(n) rgamma(n,4,1/2)),,AlphaMLE =map_dbl(Yn,\(y) get.mle(y)[1]),BetaMLE =map_dbl(Yn,\(y) get.mle(y)[2])))
Warning: There was 1 warning in `mutate()`.
ℹ In argument: `Yn = pmap(list(n, p), function(n, p) rbernoulli(n, p))`.
Caused by warning:
! `rbernoulli()` was deprecated in purrr 1.0.0.
As shown above by the plots, asymptotic coverage kicks in very quickly when \(p\) is \(1\) through \(4\) , but at \(p=5\) it takes a little longer for the coverage to kick in. This supports what the above charts show as \(p=5\) was the only one that had issues with normality, and the same thing is true here.
C
The parameter space of \(\tau(p) = p(1-p)\) is \([0,.25]\) as setting \(\tau'(p) = 1- 2p\) equal to zero, we get a maximum at \(p=.5\), and \(\tau(.5) = .5(1-.5)=.25\), and \(\tau(p)\) cannot be negative as \(p \in [0,1]\) .