Assignment 12
Total Page:16
File Type:pdf, Size:1020Kb
Statistics STAT:7400, Spring 2019 Tierney Assignment 12 1. The trimean is an estimate of location based on the median and the quartiles that is constructed as a weighted average with the median weighted twice as heavily as each quartile. For samples of size 9 the trimean is (X(3) + 2X(5) + X(7))=4 Conduct a simulation study to assess the variance of the trimean for samples of size 9 from the standard normal, t4, and t10 distributions. Be sure to provide standard errors for your estimates, and make sure your simulation sample sizes are sufficient to support any conclusions. Use any variance reduction methods that might be appropriate. Summarize your results in about one page, and include appropriate supporting material in an appendix. You should submit your assignment electronically using Icon. Submit your work as a single compressed tar file. If your work is in a directory mywork then you can create a compressed tar file with the command tar czf mywork.tar.gz mywork 1 Statistics STAT:7400, Spring 2019 Tierney Solutions and Comments 1. The trimean for a sample of size 9 can be computed by tm9 <- function(x) mean(sort(x)[c(3, 5, 5, 7)]) Since the trimean is affine equivariant and the distributions to be considered can be represented as normal-over-independent, the methods of the Princeton study can be used. For the t10 distribution the samples can be generated with N <- 10000 df <- 10 Z <- matrix(rnorm(9*N), ncol = 9) V <- matrix(sqrt(rchisq(9 * N, df) / df), ncol = 9) X <- Z / V A crude estimate of the variance of the trimean and its standard error are computed by mean(apply(X, 1, tm9)^2) sd(apply(X, 1, tm9)^2) / sqrt(N) To apply the Princeton swindle, we need to compute the configuration statistic C: Xhat <- apply(X * V^2, 1, sum) / apply(V^2, 1, sum) S2hat <- apply(sweep(X, 1, Xhat)^2 * V^2, 1, sum) / 8 C <- sweep(sweep(X, 1, Xhat), 1, sqrt(S2hat), "/") The estimated variance of the trimean and its standard error is then given by df / (df * 9 - 2) + mean(apply(C, 1, tm9)^2) sd(apply(C, 1, tm9)^2) / sqrt(N) Summary of results: Distribution Est. Variance Std Error Est. Var. Reduction t4 0.1721 0.000847 89% t10 0.1451 0.000447 96% Normal 0.1314 0.000254 98% 2.