Introduction to Statistics in Python
Maggie Matsui
Content Developer, DataCamp
Probability of time between Poisson events
Examples
Also uses lambda (rate)
Continuous (time)
In terms of rate (Poisson):
In terms of time between events (exponential):
from scipy.stats import expon
scale
= $1/\lambda$ = $1/0.5$ = $2$$P(\text{wait} < \text{1 min})$ =
expon.cdf(1, scale=2)
0.3934693402873666
$P(\text{wait} > \text{4 min})$ =
1- expon.cdf(4, scale=2)
0.1353352832366127
$P(\text{1 min} < \text{wait} < \text{4 min})$ =
expon.cdf(4, scale=2) - expon.cdf(1, scale=2)
0.4711953764760207
Variable whose logarithm is normally distributed
Examples:
Introduction to Statistics in Python