the probabilities

During the pandemic I came across a meme which represents a set of covid 19 survival probabilities. Grouped in sets, so the numbers look really great. The human mind doesn’t understand probabilities well, so I found a nice way to visualize it.

Let me explain the application and what it shows. The best way to do it, is an example. Have a look at the following table. In case everybody catches the virus the probability, that somebody will die is shown, as calculated in the application above.

People added Probabilities of at least one death
Oneself 0.03 %
Partner and kids 0.07 %
Parents 5.19 %
Brothers & sisters 5.30 %
Aunts and uncles 18.11 %
Friends and colleagues 22.46 %

The probabilities are getting really awful in just a small number of steps, so everyone should be careful about the ongoing pandemic. It is way more dangerous, than the death rates look at the first glance. And as society we decided to contain the pandemic to protect our loved family and friends.

  • Stay home
  • Wear masks
  • Wash your hands

Application internals

Data

The data used for the application are official death and survival rates from Bavarian (Germany).

Application

The application is written in clojurescript and can be found on github. Feel free to review and improve this small application.

Math

I am not a math major or came across probability theory during my career. So this is the math I used for the calculation.

(defn prob-or
  ([x] x)
  ([x & t] (- 1.0 (* (- 1.0 x)
                     (- 1.0 (apply prob-or t))))))
                     
(defn prob-pow [x n]
  (- 1.0 (Math/pow (- 1.0 x) n)))

I don’t expect an error in this equations so the calculations should be accurate.