Math and Medicine: Homework Assignment 3 Due on January 29

advertisement
Math and Medicine: Homework Assignment 3
Due on January 29
1. Suppose that the duration of hospital stays are defined by p2 = 0.25, p3 = 0.25, p4 = 0.25,
p7 = 0.25.
a. Find the average duration of a hospital stay T̄ .
b. Find the average with length-biased sampling, T¯b .
c. Find the average stay after being sampled at a random time, T¯r .
2. You are trapped behind an annoyingly slow driver (a.s.d.) in a long no passing zone. After
a couple more exits, a second a.s.d. merges on in front of the first, leaving you twice as
trapped. To calm yourself, you attempt to guess which driver will exit first.
a. If the number of exits a car remains on the road follows a geometric distribution, what
is the probability that the new a.s.d. exits first? Under what conditions might this
occur?
b. Under what assumptions would you expect the new a.s.d. to exit first?
c. Under what assumptions would you expect the new a.s.d. to exit second?
d. What does this have to do with medicine?
3. There are three simulation programs on the web site: geom.R for the geometric distribution,
timedep.R for time-dependent rates, and hetero.R for a heterogeneous population.
a. Try to find a case with timedep.R (by changing the three parameters q1, q2 and
Tphase1) that makes T¯r way bigger than T̄ . Why does it?
b. Find a case with hetero.R (by changing the three parameters q1, q2 and ptype) that
makes T¯r way bigger than T̄ . Is it possible to have T¯r = T̄ ?
c. Extra Credit: Write a program that includes both factors and find non-trivial parameters for which T¯r = T̄ .
Download