Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #### PREGUNTA 5
- ## parte a)
- rm(list = ls())
- x=vector()
- y=vector()
- U=vector()
- n=1000
- for (i in 1:n) {
- z=0
- for (j in 1:12) {
- U[j]=runif(1,0,1)
- z[j]=sum(U)-6
- }
- theta=(z^3)*(exp(z))
- }
- theta
- med=mean(theta);med
- var1=(var(theta)/n);var1
- ##Parte b)
- Longitud <- (2*(1.96)*sqrt(var1))/(sqrt(n));Longitud
- ILI=med-((1.96)*sqrt(var1)/sqrt(n));ILI
- ILS=med+((1.96)*sqrt(var1)/sqrt(n));ILS
Add Comment
Please, Sign In to add comment