Open GaryBAYLOR opened 8 years ago
Purpose: do simulation to prove the distribution of max(X1, ..., Xn) - theta log(n) is Gumbel(0, theta).
## mu= 0, sigma = 1 a <- expression( n <- 50000, x <- rgumbel(n, 0, 1), xmax <- max(x - log(n)) ) res <- replicate(5000, eval(a)) plot(density(res)) xseq <- seq(-2, 6, by = 0.01) yseq <- dgumbel(xseq, 0, 1) lines(xseq, yseq, col = "red")
Purpose: do simulation to prove the distribution of max(X1, ..., Xn) - theta log(n) is Gumbel(0, theta).