# How do micromorts add up?


```python
import numpy as np
import matplotlib.pyplot as plt
```

Micromorts are a convenient way to measure the dealiness of human activity.
They are defined as the amount of activity resulting in a 1:1 000 000 chance of dying.

These low probablities can be added up, due to the taylor expansion

$\begin{align}
p_{not\_dead} &= (1 - p)^N \\
              &=  1 - N \cdot (1 -0) \cdot p + O(p^2)\\
              &\approx 1 - Np
\end{align}$

But this is clearly not valid for $N\approx \frac{1}{p}$, as $p_{not\_dead} = 0$ in this case.

So, lets simulate some numbers!


```python
n_long = np.logspace(1, 6.5, 100)
p_not_death = np.power(1 - 10**-6, n_long) 
plt.plot(n_long, p_not_death, label='exact')

n = np.logspace(1, 6, 100)
taylored_not_death = 1 - n * 10**-6
plt.plot(n, taylored_not_death, label='taylored')
plt.legend()
plt.show()
```

As we can see, the exact probablity to zero asymptotically, and is about zero at $N\approx \frac{3}{p}$, while the taylored formula is exactly zero at $N = \frac{1}{p}$.

But for which quantities of N can we use the first-order taylored formula?


```python
n = np.logspace(1, 5.7, 1000)
p_not_death = np.power(1 - 10**-6, n) 
plt.plot(n, p_not_death, label='exact')

taylored_not_death = 1 - n * 10**-6
plt.plot(n, taylored_not_death, label='taylored')
plt.legend()
plt.show()
```

It's probably safe for $N<\frac{1}{p}/10$, and roughly correct for $N<\frac{1}{p}/5$, 100 000 and 500 000 for the micromorts in this case.

What if we add up bigger lumps of micromorts?


```python
n_long = np.logspace(1, 4.5, 100)
p_not_death = np.power(1 - 10**-4, n_long) 
plt.plot(n_long, p_not_death, label='exact')

n = np.logspace(1, 4, 100)
taylored_not_death = 1 - n * 10**-4
plt.plot(n, taylored_not_death, label='taylored')
plt.legend()

plt.figure()
n = np.logspace(1, 3.7, 1000)
p_not_death = np.power(1 - 10**-4, n) 
plt.plot(n, p_not_death, label='exact')

taylored_not_death = 1 - n * 10**-4
plt.plot(n, taylored_not_death, label='taylored')
plt.figure()
plt.show()
```

For bigger lumps, the results are the same, just shifted downwards - i.e., we can add up 1000 doses of 100 micromorts safely.

95545caf432bdba659531f1b390e7fde650c8db2
ipynb
Jupyter Notebook
micromort_scaling.ipynb
lukaselflein/micromort_scaling
5f3da2e355aadc47cfe298c1d2ba6c1485765368
MIT
micromort_scaling.ipynb
lukaselflein/micromort_scaling
5f3da2e355aadc47cfe298c1d2ba6c1485765368
MIT
micromort_scaling.ipynb
lukaselflein/micromort_scaling
5f3da2e355aadc47cfe298c1d2ba6c1485765368
MIT
Qwen/Qwen-72B
1. YES
2. YES