Loesung Aufgabe 53 ------------------ a) i ---> i+1 mit Rate lambda i i ---> i-1 mit Rate mu i b) 1. Neue Zeit berechnen mit Totalrate i(lambda+mu) [Lemma 8.4 a)] 2. Was ist passiert mit proporionalen Anteilen [wegen Lemma 8.4 b)] 3. Neu einstellen und goto 1 c) bd=Birth-Death sieht zum Beispiel folgendermassen aus: bd<-function(noevents,lambda,mu){ incrprob<-lambda/(lambda+mu) decrprob<-mu/(lambda+mu) totrate<-(lambda+mu) tofevents<-c(1:noevents) state<-c(1:noevents) state[1]<-1 tofevents[1]<-0 p<-0 for(j in 2:noevents) { if(state[j-1]>0) { tofevents[j]<-tofevents[j-1]+rexp(1,(totrate*state[j-1])) p<-runif(1) if(p > incrprob) state[j]<-(state[j-1]-1) if(p <= incrprob) state[j]<-(state[j-1]+1) } if(state[j-1]==0) { tofevents[j]<-tofevents[j-1] + 1 state[j]<-0 } } plot(tofevents, state, type="s") curve(exp(x*(lambda-mu)), add=T) } Klar ist, dass die Epidemie in c5 und c6 sicher ausstirbt. Was man auch sieht, ist dass die Erwartungswertsfunktion selten gut in's Bild passt. Das liegt vor allem bei c3 und c4 daran, dass viele Pfade aussterben. Auch ist die Variabilitaet am Anfang sehr gross. Wenn es dort einmal nicht mehr nahe beim Erwartungswert ist, dann wird es wahrscheinlich vom Erwartungswert weg bleiben. d) mindestens ein c \in (0,1), sodass c*lambda/mu \le 1 [wegen Lemma 8.5 b)]