path <- commandArgs()[6] ############################## Ex01 <- function(y) { n <- 20 (y+1)/(n+2) } postscript( file=paste(path, "grp2.2-1.eps", sep=""), width = 9, height = 9, pointsize = 20, horizontal = FALSE, onefile = FALSE, paper = "special", family="Palatino" ) par(mar=c(3.2, 3.2, 1.5, 0.5), mgp=c(2.0, 0.7, 0)) par(bty="l") names <- replace(seq(0, 20), which(seq(0, 20) %% 5 != 0), NA) barplot( Ex01(seq(0,20)), col = "#E64B6B", border = NA, ylim = c(0, 1), space = 0.2, beside = T, names.arg = names, xlab = expression(y), ylab = expression(paste("E(", theta ,"|", y, ")")), main = expression(paste(n, " = ", 20)) ) abline(h = 0, lty=1) abline(h = 0.5, lty=2) text(1, 0.55, expression(paste("E(", theta, ") = ", over(1,2))), cex = .8) dev.off() ############################## Ex02 <- function(y) { n <- 20 (n-y+1) * (y+1) / (n+2)^2 /(n+3) } postscript( file=paste(path, "grp2.2-2.eps", sep=""), width = 9, height = 9, pointsize = 20, horizontal = FALSE, onefile = FALSE, paper = "special", family="Palatino" ) par(mar=c(3.2, 3.2, 1.5, 0.5), mgp=c(2.0, 0.7, 0)) par(bty="l") names <- replace(seq(0, 20), which(seq(0, 20) %% 5 != 0), NA) barplot( Ex02(seq(0,20)), col = "#E64B6B", border = NA, ylim = c(0, 0.1), space = 0.2, beside = T, names.arg = names, xlab = expression(y), ylab = expression(paste("Var(", theta ,"|", y, ")")), main = expression(paste(n, " = ", 20)) ) abline(h = 0, lty=1) abline(h = 1/12, lty=2) abline(h = 20/(12*(20+2)), lty=6) text(1.5, 0.088, expression(paste("Var(", theta, ") = ", over(1,12))), cex = .8) text(3.8, 0.070, expression(paste("Var(E(", theta, "|", y, ")) = ", over(n,12(n+2)))), cex = .8) dev.off()