Exponenciální rozdělení¶

In [43]:
import numpy as np
import matplotlib.pyplot as plt

hustota pravděpodobnosti: $$ f(x|\tau) = \left \{ \begin{matrix} \frac{1}{\tau}\exp\left (-\frac{x}{\tau}\right ) & \text{pro } x\ge 0\\ 0 & \text{pro } x< 0\\ \end{matrix} \right . $$

distribuční funkce:
$$ F(x|\tau) = \left \{ \begin{matrix} 1-\exp\left (-\frac{x}{\tau}\right ) & \text{pro } x\ge 0\\ 0 & \text{pro } x< 0\\ \end{matrix} \right . $$

In [44]:
tau=100
x=np.linspace(0,5*tau,1000)
In [45]:
plt.plot([-tau,0,0],[0,0,1/tau],c='blue')
plt.plot(x,1/tau*np.exp(-x/tau),c='blue', label="hustota pravděpodobnosti")
plt.xlabel('x')
plt.ylabel('f(x)')
plt.legend()
plt.show()
No description has been provided for this image
In [46]:
plt.plot([-tau,0],[0,0],c='blue')
plt.plot(x,1-np.exp(-x/tau),c='blue', label="distribuční funkce")
plt.xlabel('x')
plt.ylabel('F(x)')
plt.legend()
plt.show()
No description has been provided for this image