###################### ## Harjoitukset 1 ## ###################### ######### ## 1.5 ## ######### ## (a) curve(dnorm(x,8.78,sqrt(0.16)),7.5,10,xlim=c(7.5,10), ylim=c(0,3.1),ylab="density",lty=1, lwd=2) curve(dnorm(x,8.78,sqrt(0.16/9)),7.5,10,add=TRUE,lty=2,lwd=2) legend(10, 3.1, c("X",expression(bar(X))),lty=c(1, 2), xjust=1,yjust=1,lwd=2) ## (b) curve(dchisq(x,8),0,25,ylab="density",lty=1,lwd=2) qchisq(0.95,8) b<-(qchisq(0.95,8)*0.16)/8 qchisq(0.05,8) a<-(qchisq(0.05,8)*0.16)/8 ######### ## 1.7 ## ######### b<-(1-exp(-5/3))^4*(5*exp(-5/3)+1-exp(-5/3)) c<-exp(-5/3) ######### ## 1.8 ## ######### ## (a) a<-qchisq(0.95,15) ## (b) pnorm(((a/15)-1)/(sqrt(2/15))) pnorm((a-15)/(sqrt(30))) ######### ## 1.9 ## ######### curve(dchisq(x,15),0,35,xlim=c(0,35),ylim=c(0,0.08), ylab="density",lty=1,lwd=2) curve(dnorm(x,15,sqrt(30)),0,35,add=TRUE,lty=2,lwd=2) legend(35, 0.08,c("Y","approximaatio"),lty=c(1, 2), xjust=1,yjust=1,lwd=2)