Assignment given 21 April 2009


This assignment was given on 21 April 2009. The work is due 28 April 2009.


We will continue with the simple SIR model of disease in a hospital ward. This week, we will consider the effect of vaccination in decreasing the severity of the outbreak, and we will also try to understand how to deal with the randomness in our simulations.

Question 1: Vaccination provides partial or full immunity to a disease. While O'Leary considers full immunity, let's assume our vaccination decreases the chance by a factor F = 1/5 of the original chance. That is, if a person is vaccinated, then every time we would ordinarily apply the transmission probability of tau, we instead use a factor tau/5.

To keep track of people who have been vaccinated, we will give them a status of -2, and we will name this the "V" class to go along with "S", "I" and "R".

Our initial condition will still have 1 infected person and 99 susceptibles. So where will the vaccinated people come from?

At the beginning of each step, every susceptible person considers becoming vaccinated. There is a v chance that they will become vaccinated on this step, where v is a number between 0 and 1 that will be specified later. If a susceptible person becomes vaccinated, they move immediately to class "V", which we will store in our matrix as the value "-2".

Only after all the susceptibles have had a chance to consider getting vaccinated do we proceed to update the status of all the patients in the normal way. But now we have one new rule, to handle the vaccinated people. The rule is essentially the same as for susceptible people, but with the weaker value of tau:


        if ( patient status == - 2 ) then
          if infected neighbor to north and random number < ( tau / 5 )
            patient becomes sick.
          if infected neighbor to south and so on
        end
      

As before, use M = N = 10, for the problem size, a disease length K of 4 days, a transmission probability tau of 0.20, and start with exactly one infected patient, P(M/2,N/2) whose status is 1. All other patients start at 0. Our new factor is a daily probability of vaccination v = 10% and the vaccination effectiveness factor of 1/5. Run the simulation for 50 days.

Turn in: Make one plot on which you display the values of S, I, R and V over this time period. Why are there no "S" people left at the end?

Question 2: Variation occurs in real life and in simulations, when randomness or uncertainty occurs in physical processes or calculations. Our disease model is more interesting because the transmission includes a random factor, but that also means that it's harder to explain what we learn from running the program! A natural statistic for our simulations is the total number of people who get sick. Assuming the disease is finished in 50 days, then this is equal to the number of recovered people on the last day, or "R(50)". The larger "R(50)" is, the worse the disease was.

One way to get a feeling for the "typical" number of people who will get sick is to run the program many times and keep track of the average of the values of R(50). A second number that is of interest tells us how closely all the data stays to the average value. This number is called the standard deviation.

For a set of N numbers X(1), X(2), ..., X(N), with average value XBAR, the standard deviation is

        std dev = sqrt ( sum ( X(1:N) - XBAR )^2 / N )
      

Turn in: Run your program from Question #1 100 times, but only save the value of R(50) from each run. Compute the minimum, maximum, average, and standard deviation of the 100 results.


Last revised on 20 April 2009.