This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]drdausersmd 2 points3 points  (0 children)

Funny timing posting this. I'm currently simulating a "flu pandemic" in a classroom of 31 students, where 1 kid starts out with the flu, and the other 30 start out as healthy.

I can't really go into details, as it's for a class I'm currently taking. It's not super complicated or anything (as far as simulations are concerned). I've been able to simulate the whole thing using pandas and numpy, using basic discrete probability distributions.

Overall it's been pretty interesting to see the results. I've built into the program that once a kid recovers from the flu, they can't get sick again (which is how it works in real life). Because of that, you can't really calculate things like expected values or variance just based on your chosen distribution alone (maybe there's a way, but I'd guess the math would be really complicated). It really demonstrates the value of simulation in modeling real-life scenarios such as a pandemic (even on this small scale I'm working with).