Montreal Problem

Montreal Problem - L< NULL for(i in 1:n T< rexp(9,1/20...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
#Original Montreal Problem # # JB--1-Ch -2- D -3---- B # | | | # 6 7 4 # | | | # | M | # | | | # | 8 | # | | | # Cy --5- H ------/ # LifeLeft1<-function(n) { #Input the number of repeats.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: # L <- NULL for (i in 1:n) { T <- rexp(9,1/20) L1 <- min(T[1],T[2],T[7]) L2 <- min(T[1],T[5],T[6],T[8]) L3 <- min(T[1],T[2],T[3],T[4],T[8]) L4 <- min(T[1],T[6],T[5],T[4],T[3],T[7]) L5 <- min(T[9],T[2],T[7]) L6 <- min(T[9],T[5],T[6],T[8]) L7 <- min(T[9],T[2],T[3],T[4],T[8]) L8 <- min(T[9],T[6],T[5],T[4],T[3],T[7]) L[i] <- max(L1,L2,L3,L4,L5,L6,L7,L8) } return(L) } data=LifeLeft1(10000) max(data) mean(data) min(data) sd(data)...
View Full Document

This note was uploaded on 11/16/2010 for the course STAT 340 taught by Professor Xu(sunny)wang during the Spring '09 term at Waterloo.

Page1 / 3

Montreal Problem - L< NULL for(i in 1:n T< rexp(9,1/20...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online