x = runif(50) psi = max(x) par (mfrow=c(2,2)) # simultaing from the real distribution to estimate variance of psi (maximum) psi.samp = NULL for (i in 1:1000) psi.samp = c(psi.samp, max(runif(50))) hist(psi.samp,breaks=(80:100)/100) var(psi.samp) # nonparametric bootstrap psi.star = NULL for (i in 1:1000) psi.star = c(psi.star, max(sample(x,50,rep=T))) hist(psi.star,breaks=(80:100)/100) var(psi.star) # parametric: bootstrap from uniform(0, max of data) psi.par = NULL for (i in 1:1000) psi.par = c(psi.par, max(runif(50)*psi)) hist(psi.par,breaks=(80:100)/100) var(psi.par)