• Managing your videos in Amara teams just got easier! Read about it in our latest blog post. Hide

## ← 03ps-02 Waning Immunity Solution

• 2 Followers
• 39 Lines

### Get Embed Code x Embed video Use the following code to embed this video. See our usage guide for more details on embedding. Paste this in your document somewhere (closest to the closing body tag is preferable): ```<script type="text/javascript" src='https://amara.org/embedder-iframe'></script> ``` Paste this inside your HTML body, where you want to include the widget: ```<div class="amara-embed" data-url="http://www.youtube.com/watch?v=3bewdK8SLek" data-team="udacity"></div> ``` 1 Language

• English [en]

Showing Revision 2 created 10/24/2012 by Amara Bot.

1. Now, let's look at the solution for a problem concerning waning immunity.
2. First things first, the constant waning time should be defined as 2 times the infectious time.
3. We can show this mathematically using the equations we have for the
4. derivatives of S, I, and R with their respective time.
5. We know that after a long period of time you want to attain a steady state situation
6. and there's a number of people in each portion to the population--
7. susceptible, infected, and recover stays constant.
8. Since they want to find out how long people should spend in the recovered stage,
9. we start with the time derivative of R and set that equal to zero.
10. Since you know that Rdot now has an extra term added to it or actually subtracted from it
11. showing the number of people that are leaving the recovered population
12. and going back to the infected population.
13. We can set these to terms right here equal to zero as well.
14. Just to note, I've used CINF to stand for the infectious time
15. and CWAN to stand for the waning time.
16. Now with just a little bit of Algebra, we come up with the answer that R=2I.
17. Since we know that we want the number of recovered people to be twice the number
18. of infected people, we can plug in this extra information to the equation above
19. and end up with the answer that the waning time is equal to twice the infectious time.
20. This put us directly into the next part of the problem.
21. We defined R to S in the same way that I to R is defined except that we replace infectious time
22. as the waning time and I step with R step as you can see right here.
23. Then moving on to our recursive relations, for each element in a step plus one position,
24. we need to take into account the value of the previous element in the number of people
25. added and subtracted from the population during each time step.
26. We know that the one thing that has changed in this model from the standard SIR model
27. is that people are now moving from the recovered population back to the susceptible population.
28. This is why we've needed to add in this extra term R to S, which we subtract from R and add to S.
29. Now, let's run the program and see what we get.
30. Here we see we end up with this fancy graph,
31. which has three different series for the three different parts of the population we're looking at.
32. Remembering how we set the initial values for S, I, and R.
33. Remember that the blue line here stands for the susceptible population.
34. The green line stands for the infected population,
35. and the red line stands for the recovered population.
36. And the maximum time that we're looking at 60 days,
37. you can see that the red line is graphing twice as many people over here
38. as the green line is marking, which is exactly the answer that we wanted to end up with.
39. Congratulations on successfully completing the first problem of Unit 3.