Simulating an epidemic 

Skatījumi 4,4 milj.
99% 43 236 293

Experiments with toy SIR models
Home page: www.3blue1brown.com
Brought to you by you: 3b1b.co/sir-thanks

Awesome fan-made interactives:
Simulations by Harry Stevens at the Washington Post:
Simulations by Kevin Simler at Melting Asphalt:
Excellent visualization of each country's current growth from Minutephysics and Aatish Bhatia:
Another good interactive to see what effect various parameters have on the shape of the curve:
If you want to hear a mathematician/epidemiologist's summary of COVID-19, I found this MSRI talk very worthwhile:
Marcel Salathé on Contact Tracing:

These animations are made using manim, a scrappy open-source python library: github.com/3b1b/manim
Code for this video:
Honestly, given that the code for that video is meant for demo purposes, and not meant to reflect the true data of COVID-19, if you want to apply these ideas to the current situation I'd recommend looking for more professional epidemiological modeling tools that are less centered around animations and pedagogy and more focused on accurate predictions. For example, the Institute for Disease Modeling has a lot of models free for people to look at and play with.
Opening music:
Candlepower by Chris Zabriskie is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/by/4.0/)
Source: chriszabriskie.com/divider/
Artist: chriszabriskie.com/
Other music by Vincent Rubinetti.
Download the music on Bandcamp:

Stream the music on Spotify:

If you want to contribute translated subtitles or to help review those that have already been made by others and need approval, you can click the gear icon in the video and go to subtitles/cc, then "add subtitles/cc". I really appreciate those who do this, as it helps make the lessons accessible to more people.


3blue1brown is a channel about animating math, in all senses of the word animate. And you know the drill with LVlocal, if you want to stay posted on new videos, subscribe: 3b1b.co/subscribe

Various social media stuffs:
Website: www.3blue1brown.com
Twitter: 3blue1brown
Reddit: www.reddit.com/r/3blue1brown
Instagram: 3blue1brown_animations
Patreon: patreon.com/3blue1brown
Facebook: 3blue1brown

Publicēšanas datums


27 mar 2020






Mans atskaņošanas saraksts
Skatīties vēlāk
komentāri 100   
N. R.
N. R. Pirms 17 Stundām
I would have hoped our politicians would have had watched this video. But obviously no, they keep re-open the hair-dressers and schools as soon as the numbers drop a little bit.
N. R.
N. R. Pirms 17 Stundām
Could you please make an update with vaccination, mutants and other new developments we had since the outbreak? (Please hit „like“ if you agree, so that 3Blue1Brown sees my comment)
Breno Bandeira
Breno Bandeira Pirms dienas
Thanks for this video, it is so helpful! Already sharing!
3dgar 7eandro
3dgar 7eandro Pirms dienas
If the specialist and the majority would have done half this instructions: we would had stopped covid before summer of 2020...😌👌👌👌
Moohyun Chang
Moohyun Chang Pirms 6 dienām
Thanks for your nice explanation! I have to work with SIR model for a modelling project and I am really curious how you have implemented your models such that you get these beautiful simulations as shown in the video. :)
Michael Darrow
Michael Darrow Pirms 6 dienām
2:01 **anger intensifies**
The Alpaca Redstoner
The Alpaca Redstoner Pirms 9 dienām
BRUH. R0 for COVID is 2. For the Black Death, it's apparently 7. And you wonder why there are ppl who feel that COVID is being blown out of proportion via comparisons with plague.
The Alpaca Redstoner
The Alpaca Redstoner Pirms 9 dienām
Also, an idea is to add a new parameter of the simulation, Fatality rate It would be the odds that when a dot reaches the R stage, that it would be in the death toll. If it survives, it winds up in the recovered group. (Just a thought)
Maverick Berkland
Maverick Berkland Pirms 11 dienām
I wish I glowed yellow when someone is too close to me.
AminaZikZak Pirms 14 dienām
Would've appreciated a spoiler alert
Loofus Doofus
Loofus Doofus Pirms 14 dienām
The Music........Is Super Quiet and calming
Luigi Cotocea
Luigi Cotocea Pirms 15 dienām
No one Plague Inc: Iceland executes the infected people...
денис баженов
денис баженов Pirms 19 dienām
It's not working for most countries - they don't take measures in time. China was hiding the disease and blamed any country closing travel from China. WTO is a total disaster, they waited too long to declare a global pandemic. And countries .... UK lost more lives than in WW2 air raids by Hitler's airforce. US not better, 100+ times more than in 9/11 event. Moscow, Russia lost much more lives than in German air strikes in 1941-42.
Astraestus Pirms 19 dienām
Excellent video. Rings true after almost a year
JP T Pirms 22 dienām
This is great. But you got a problem with social distancing: when you activate it in your simulation, all people are stuck in place because there is no room to move. I believe this effects the outcome way more than the social distancing itself.
Jaden CHOW [6S]
Jaden CHOW [6S] Pirms 24 dienām
The people who disliked this should get covid tests done cause one of their major symptoms is no "taste"
John Casey
John Casey Pirms 24 dienām
Therefore Trumps early travel ban that he was called racist for and the WHO disagreed with, was in fact right. Fauci's instruction to not wear masks for up to 4 to 6 weeks at the start of the pandemic allowed Covid to spread easier/faster at the outset leading to a quicker spread. I believe there was a concerted effort to allow the virus to spread to get Trump out of office and to justify the Great Reset.
The Shadow
The Shadow Pirms 25 dienām
2020:SImulating an Epidemic 2021:Simulating a Pandemic
lukloek Pirms 26 dienām
It is bullshit in this case because there is so many wrong inputs. Never, the whole population is susceptible at start. The curve will flatten anyway because the most susceptible will pass at the beginning. It is oversimplified and models from viruses in the past never show these kind of exponential growth, but know for the first time in history it does. I think it is more likely your model is wrong.
X Pirms 23 dienām
You’re wrong, he’s right. Cry more. He covered your concerns and is still correct. Again, cry more.
jhjh jhjh
jhjh jhjh Pirms Mēneša
😅Thanks😅for😅the website😅it😅lags😅for😅my😅PHONE😅
Raven Roth
Raven Roth Pirms Mēneša
I think I have just found the best channel on youtube.
Shloimy Silberstein
Shloimy Silberstein Pirms Mēneša
Imagine laughing at a man who predicted the future.
Wolf Elkan
Wolf Elkan Pirms Mēneša
From his other video on the topic: "If people are sufficiently worried, then there's a lot less to worry about. But if no one is worried, that's when you should worry. The only thing to fear is the lack of fear itself."
Graydon Klein
Graydon Klein Pirms Mēneša
a t
a t Pirms Mēneša
Absolutely remarkable! I wish everybody in the world --specially, governments-- understand the basics of an epidemic, now turned into a pandemic. Almost a year has passed since the inception of this video, yet the dramatic world situation still haunts us. Perhaps it is too much to ask, but the outcome considering the effects of a vaccine will be certainly uplifting.
Emre Yılmaz
Emre Yılmaz Pirms Mēneša
projenin içinden geçtin
Elgar Kleijne
Elgar Kleijne Pirms Mēneša
Revisiting this video shows how much hind-sight knowledge today could have been taken from this video 10 months ago...
뀨앙지윤 Pirms Mēneša
11:40 Solid Liquid Gas
Tobias R
Tobias R Pirms Mēneša
Can you help the little dots with vaccination?
Alkatross Pirms Mēneša
I wonder how it changes when removed dots can become infected again?
X Pirms 23 dienām
Think of the flu with it’s “endless” cycles.
JockDean95 Pirms Mēneša
so the "lighter" the virus cells are, the further they can reach, so if we "translate" it to what 3B1B has shown us, the larger the radius the faster the pandemic will go away? sorry for abusing "the"
X Pirms 23 dienām
The larger the radius, the *quicker the spread*.
Nick Outram
Nick Outram Pirms Mēneša
OK, we are 9 months on, it would be good to take a look at how these simulations panned out in the real world...
Kendrick Chan
Kendrick Chan Pirms Mēneša
I have seen 5 youtube videos, and all of their SIR models are wrong. Their ds_dt equations are -kSI without divided by N, only your linked video is correct. Too many fake mathematics guru on youtube.
Shloimy Silberstein
Shloimy Silberstein Pirms Mēneša
The Karens are better at simulating viruses. Or does that not count as simulating?
Tom Bowen
Tom Bowen Pirms Mēneša
turn that stupid music off , AHHHH!!!!!!!!!!!!!!!!!!!!!!!!
panda Pirms Mēneša
butifly done i love it
Power Slider
Power Slider Pirms Mēneša
:) thx man, i got poor english but nice video anyway. Both academicily and mentally.
888 Pirms Mēneša
ayyy I made it to a year without being infected!
Guilherme Matos Passarini
21:15 EXACTLY what happened in Europe
alexldances Pirms Mēneša
This video suggests the UK government have been doing the PRCICESLY OPPOSITE strategies of what should be done and it really is the most tragic thing ever
Rasscal Pirms Mēneša
Proven solution: social distancing, wear masks, monitor hygiene and quarantine infected people. Creative / stubborn people. A. no no no. Let's study this first. Meanwhile let's focus on the economy. B. Let's try experimenting with letting it spread in order to build up immunity and create herd immunity C. Government Denial. It doesn't exist (for months). Months later. Oh no. Too late. It's China. China started this. D. Individual, I want to freedom to no wear masks. Whoever dies is their own problem.
DorkMuffin Pirms Mēneša
incredible. not only super fun to watch, but also simple to understand. such a shame that so many cannot wrap their heads around such a concept when this video exists.
uhm179 Pirms Mēneša
It could've been interesting if 3Bl1Br could incorporate a simplified measure of the economic damage caused by lockdowns/covid, and see if there's a sweet spot where you can maximize protective effect of lockdowns while minimizing economic damage
X Pirms 19 dienām
@uhm179 Still waiting for that source ": D"
uhm179 Pirms 19 dienām
@X you just proved my point : D
X Pirms 20 dienām
@uhm179 I'll translate the nonsense you just spewed: "I, uhm179, have no sources and am backtracking because my lies have been called out". You're welcome. It's much easier when you're honest and just say that you're a liar.
uhm179 Pirms 20 dienām
@X you're being silly. Ive had massive debates about this with a friend, sharing research articles back and forth. clearly, you're not interested in a debate, so Im not going to dig it up for you : p
X Pirms 21 dienas
@uhm179 Source? None.
Abhishek Bhadola
Abhishek Bhadola Pirms Mēneša
where them karens at?
spambot71 Pirms Mēneša
weird seeing COVID analysis before masks were identified as helpful
Erdogan Gunes
Erdogan Gunes Pirms Mēneša
Would you care to add the effect of vaccination to these simulations?
Thế Sơn Lương
Thế Sơn Lương Pirms 2 Mēnešiem
You forget to take in consideration those who can recontract the disease. Nice illustration tho.
BigFluffyDragon Pirms 2 Mēnešiem
The simulations were too real. This was damn near prophetic, except you didn't count on one thing: anti masker Karens spitting on people andarching through target
A Darkling's Hope!
A Darkling's Hope! Pirms 2 Mēnešiem
That's nice, but there are also many ethical questions when it comes to such measures. Also very disturbing is the lack of critical journalism when it comes to the nation responsible for the pandemic and how the WHO top officials were bribed
r schwarz
r schwarz Pirms 2 Mēnešiem
lol u increase/decrease the radius on a little cartoon pi and say "think of this as...." it's a pulsing circle. im gonna go ahead and think this is a silly little cartoon for a fun youtube video
Marcel Telang
Marcel Telang Pirms 2 Mēnešiem
I used one of the fan-made simulations and ran the simulations in the intro on that (I ran it 3 times and took the average) and this is what a found: Nothing: ~10% (control) Social Distancing: ~1% Social Distancing and Central Location: ~35% Quarantine: ~1% Quarantine 80%: ~1% Multiple Communities: ~63% Multiple Communities and Temporary Social Distancing: ~65%
Fanning Pirms 2 Mēnešiem
only ended up here because of my biology assignment /;
B4119812B Pirms 2 Mēnešiem
Now that Pfizer and Moderna have FDA approved vaccines, can you update your simulation to include vaccines or immune?
M D Pirms 2 Mēnešiem
You should do a follow-up up how to get to here immunity fastest, in other words who to vaccinate first (to get to lowest death toll) Is it the elderly because they are vulnerable. Or will they be better protected if you vaccinate for example shopkeepers, doctors ect' first because they have the most daily contacts? (... This in order to reduce cases quickly in general population and then vaccinate the elderly next off course)
Adam Abele
Adam Abele Pirms 2 Mēnešiem
Thank you for making this video. It probably has saved some lives.
tobsam Pirms 2 Mēnešiem
I love this channel... My university frequently refers to your videos as a good learning resource and I absolutely agree! (Also, I've known this channel for years, so I'm happy to see that my university approves it as a good source :) )
hunt Bobo
hunt Bobo Pirms 2 Mēnešiem
Wonderful video. You predicted it. We didn’t flatten the curve enough and now many of our healthcare institutions are overwhelmed. Too many people are sick at the same time. I wish you would revisit this subject and introduce the effect of vaccination. That would help me plan for the future. Thanks again, Hunt
Gato Quantico
Gato Quantico Pirms 2 Mēnešiem
Thus, tracking people who are infected is useless assuming a
david muñoz
david muñoz Pirms 20 dienām
@X Yes of course they are. I don't think it would be very healthy to get yourself vaccinated e.g twice a year for each time the strain changes significantly. Stopping the problem means absolutely no cases and you can't do that world wide. In the hypothetical case that the UK didn't have any cases, the moment people start travelling there, we are going to be back in square one and PCRs aren't failproof.
X Pirms 21 dienas
@Gato Quantico No, quarantining does stop the problem given virtually every other graph with quarantine rates above 50%, Norway's current lack of covid, etc. The mRNA vaccines aren't hindered by the mutations. You spew nonsense and just dig yourself deeper with every reply. Log off.
Gato Quantico
Gato Quantico Pirms 21 dienas
@X Well I guess anyone they detect is going to go into quarantine??? Makes sense doesn't it. Shutdowns only delay the problem. They do not solve it. The problem is the deaths. Vaccine is not going to solve that. They get a new one out and by that time it doesn't work due to mutations, etc. Finding a way to boost the immune system, however, is key as it has an internal machinery which holds similarities with machine learning.
X Pirms 23 dienām
Useless? No. He says quarantining 50% only. Hence the need for shutdowns, masks, and social distancing
Matthew Maldonado
Matthew Maldonado Pirms 2 Mēnešiem
0:10 are the removed PIs dead or recovered
Hilfigertout Pirms 23 dienām
This was answered in the video, but the answer is “either way.” How many are dead and how many are recovered depends on the actual death rate of the hypothetical disease.
Diomache G.
Diomache G. Pirms 2 Mēnešiem
Science won again. Too bad that politicians don't understand science and so many people have to die.
Аня Квасниця
Аня Квасниця Pirms 2 Mēnešiem
That is how plague stopped: All infected people got removed.
Saif Ullah
Saif Ullah Pirms 2 Mēnešiem
Effect of vaccination of small population of some cities???
Viva El Toro
Viva El Toro Pirms 2 Mēnešiem
I love it👍🏼👍🏼👍🏼🎗🎗🎗
41 41
41 41 Pirms 2 Mēnešiem
Very informative and comparable simulations. I look forward to the vdo that you will explain the equations behind these simulations.
Aarush Mahesh
Aarush Mahesh Pirms 2 Mēnešiem
This did not age well
andrew cobb
andrew cobb Pirms 2 Mēnešiem
Masks for all, visors for the mask intolerant, keep the shops open - was the logical conclusion for the UK from these simulations, back in.. March. Just saying old UK duffer here :)
Gustav Hultman
Gustav Hultman Pirms 2 Mēnešiem
Great video! Would you mind sharing what simulation software you're using? :)
AL Coll
AL Coll Pirms 2 Mēnešiem
He writes all the software himself. Check the description, you might find something there
mrcitrus6 Pirms 2 Mēnešiem
made march 2020 first covid death outside china feb 2020... that was fast... big pharma plan or what ????
rabidsamfan Pirms 2 Mēnešiem
Hot topic modelling because of high interest.
Jim Hill
Jim Hill Pirms 2 Mēnešiem
I would love to see this same video with a variable vaccine rollouts. How might different strategies affect overall infection rate?
Albin B
Albin B Pirms 2 Mēnešiem
Just an observation. I think there has been a mistake made at 14:03 in comparing two different cases side by side as if only the trigger case had changed. You seemingly changed both the travel rate and the trigger case. 100 cases, 0,005 travel rate. 50 cases, 0,0020 travel rate.
Ghost Brian
Ghost Brian Pirms 3 Mēnešiem
ThIs Is A hOaX bY tHe GoVeRnMeNt
Nícolas Janke
Nícolas Janke Pirms 3 Mēnešiem
6:30 he made a lockdown with a full environmental cleaning to wipe the virus adhered in surfaces
Yeetmeat_ Pirms 3 Mēnešiem
I think it would be more accurate if you added a two and a half week time until the dots quarantine, since the symptoms of any disease don’t come immediately, like corona, you could be infected for two weeks until you start having symptoms, and probably would take a few days to start to notice the pattern
NeuroWhAI Pirms 3 Mēnešiem
Well... Now the last month of 2020 year. But the new cases of one day are still higher than yesterday.. :/
Benjamin Borh
Benjamin Borh Pirms 3 Mēnešiem
Max Vazquez
Max Vazquez Pirms 2 Mēnešiem
Tiny Desk Engineer
Tiny Desk Engineer Pirms 3 Mēnešiem
I thought this was a primer video
Dave Wilson
Dave Wilson Pirms 3 Mēnešiem
I would very much like to see a follow up to this video with information on how the models fared in predicting our world 10 months on, as well as hopefully providing information on why people need to keep trying. Where I live people are getting more and more militant about not wearing masks and that it's all a hoax and and how their rights and freedoms are being infringed upon. I'm going insane because I'm terrible at explaining all this stuff because I'm only educated enough in them to trust them as opposed to teaching them. Cheers!
Filthy Blue
Filthy Blue Pirms 3 Mēnešiem
Now how does it look when you involve CNN?
Noway Noway
Noway Noway Pirms 3 Mēnešiem
what are you even implying, it's a left wing news channel as per media bias.
Đức Trần Anh
Đức Trần Anh Pirms 3 Mēnešiem
Vietnamese government: Looks familiar.
Big Gay Dinosaur
Big Gay Dinosaur Pirms 3 Mēnešiem
america needs to FUCKING WATCH THIS
unbekannt unbekant
unbekannt unbekant Pirms 3 Mēnešiem
so if we make corona virus deadlyer than the virus dies also 😀
Hilfigertout Pirms 23 dienām
Well, kinda. The big problem with COVID is that so many cases are asymptomatic and contagious for so long. If you get the flu, you normally show symptoms the next day or two. If you get COVID, you might spread it for a week before you realize you have it. A deadlier virus with the same asymptomatic property as COVID wouldn’t die out as fast, though people might take it more seriously. The virus that presents symptoms sooner can be caught faster, even if it’s deadlier. (See: Ebola.)
J T Pirms 3 Mēnešiem
Krzychu Pirms 3 Mēnešiem
Wow, I absolutely love this! Can U provide code for your simulations? I recently tried sth simmilar and had simmilar results (although sims. were not at all as complex as this). I would love to learn how you solved those problems from the code perspective.
Joshua Green
Joshua Green Pirms 3 Mēnešiem
Your content is amazing and sorely needed. Thank you!
냘코 Pirms 3 Mēnešiem
한국이 방역이 잘되는 이유 중 하나일듯
Samurai IV
Samurai IV Pirms 3 Mēnešiem
Было бы классно показать это по телевизору вместо пусть говорят
Kiana Liu
Kiana Liu Pirms 3 Mēnešiem
Dear May I know if your video needs translation and dubbing?
Konverzaktion Pirms 3 Mēnešiem
There are few big central hubs and anyway not everyone converge there; indeed there are several hubs (many more small than big) where subgroups may interact; then there are shared routes (public transportation as "mobile" hubs). Accessing hubs can be controlled, in time and density, before going to full lockdown. Likely it is easier to find a less impacting behavior to stop the spreading of agents because the real nature of social interaction is so complex, and not in spite of it being so complex. Also, if the agents are mostly causing mild symptoms and affect hard only specific groups, these need to be protected more effectively, and there are no strong reasons to enforce countermeasures which have a so large impact on everybody. Few big "central hubs" can be cut off, smaller hubs controlled (basic rules as masks and handwashing, limited accesses on a larger time - the opposite of what is done somewhere), people at higher risk must limit themselves more than others. Letting agents circulate is good - not at the beginning and not if you count the deaths as unbearable (let the world population grow and become older as we are doing now, and we'll see what the future will be in term of deaths and "social distancing"...). Stopping them so hard is something really new, and we don't know exactly where it's bringing us, but we do know that we must be grateful that we hadn't these needs in ancient times, otherwise we would have changed our same evolution - and I bet we wouldn't have been better: we would have been weaker, and less smart. As we are now! Ops, so, well, never mind: it's the same and only a real worldwide unstoppable catastrophe could save the human species from itself and make the civilization drive away from the madness of the transhumanism.
Victor Luigi
Victor Luigi Pirms 3 Mēnešiem
I'm 8 months in the future and I can say that this guy foresaw the future
TN in English
TN in English Pirms 3 Mēnešiem
Click like when your not a dot in a box in plauge inc
Bernardo Torres Arvizu
Bernardo Torres Arvizu Pirms 3 Mēnešiem
DaSmoools Pirms 3 Mēnešiem
Amazing. Would also love to see a model including say the effects of Quarantine or Lock down as well. Since the economy is becoming rather crippled, the longer the virus is around, the longer the lockdown is enforced, the more damage the Economy takes and ultimately the more people we may have perishing from Poverty, starvations or other altercations due to the effects of said Lockdown. Quite a crappy lose-lose we have here. Don't lock down? people are going to perish. Lock down? More people are going to Perish. It's quite literally a numbers game of, how many people will perish without vs how many will perish with.
Lunatic _
Lunatic _ Pirms 3 Mēnešiem
Its pretty self-evident how an epidemic spreads, therefore I don't need to watch this video.
Clive Wells
Clive Wells Pirms 3 Mēnešiem
It's crazy how nobody else is here because the W.H.O. is simulating a pandemic!
Noway Noway
Noway Noway Pirms 3 Mēnešiem
@Clive Wells any proof on man made virus claim?
Clive Wells
Clive Wells Pirms 3 Mēnešiem
@Noway Noway I believe Fauchi gave 2million to have China develop it and Chinese spies were found stealing secrets from the Canadian deadly disease research center. They are just blowing it's fatality numbers sky high to justify this lockdown and financial / social crisis. The rich aren't worried by poverty and suffering - it's their bread and butter.
Noway Noway
Noway Noway Pirms 3 Mēnešiem
It's crazy how people still thinks it's a man-made pandemic!
Javier Borda
Javier Borda Pirms 3 Mēnešiem
Now explain Koch's postulates and why all of this doesn't make sense without them being met. Math is useful, it can give you your sperm count. When it comes to establishing why it's so low, it's a different story.
felixccaa Pirms 3 Mēnešiem
I would very much appreciate a follow up which takes into consideration, what happens to a "real" population, wich in my mind would change their habbits. What happens after lockdown, or partially ppl just staying at home most of the times, or keepinf distance?
Diego Otero
Diego Otero Pirms 3 Mēnešiem
This didn't age well
Martin Wood
Martin Wood Pirms 3 Mēnešiem
Can u simulate dempanic
Adam Chapman
Adam Chapman Pirms 3 Mēnešiem
I think a big take away, and something I suspected anyway, was that any kind of social distancing is good. Keeping in mind 100% is unobtainable and require a large amount of force, it shouldn't matter that your neighbors aren't social distancing. There is no need to really force anything, you just require 50% participation or most people complying 50% of the time.
Armemer Pirms 3 Mēnešiem
Jasper Bayless
Jasper Bayless Pirms 3 Mēnešiem
Right about now you can be saying "I TOLD YOU SO!!!"
quail Lord
quail Lord Pirms 3 Mēnešiem
this reminds me of the channel primer
Exponential growth and epidemics
The Coronavirus Curve - Numberphile
6. Monte Carlo Simulation
Skatījumi 1 milj.
The Art of Code - Dylan Beattie
Hamming codes and error correction
Skatījumi 7 milj.