3 ms·
Assume a Tesla vehicle has a constant risk of catching fire per mile. That is, we have a exponential distribution `P(catch fire after t miles | hazard rate) = P
by nshepperd 13y ago
Assume a Tesla vehicle has a constant risk of catching fire per mile. That is, we have a exponential distribution `P(catch fire after t miles | hazard rate) = P(t|a) = a exp(-at)` where `a` is the hazard rate (average fires per mile). Furthermore we'll assume an exponential prior on `a`: `P(a) = w exp(-wa)`. `w` is a parameter that expresses how much prior knowledge we have of `a`. In the limit `w=0` we know nothing at all, except that it's nonnegative.
Our data is the fact that we went 100 million miles before a fire, after which exactly one fire happened, so we want to find the distribution `P(a|t = 100 million)` which tell us everything we want to know about `a`.
Then use Bayes' theorem: `P(a|t) = P(t|a) P(a) / P(t) = aw exp(-a(t+w)) / P(t)`. The normalization factor `P(t)` involves an integral over `P(t|a) P(a) da` from 0 to ∞, which wolfram alpha tells me evaluates as w / (t+w)^2.
So our posterior probability is `P(a|t) = a (w+t)^2 exp(-a(t+w))`, but we can take the limit `w -> 0` at this point for a fully uninformative prior: `P(a|t) = a t^2 exp(-at)`.
So we can just set `t=100e6 miles`, and now calculate things like the expectation of the distribution: `E[a] = 2/t = 2e-8 per mile`. Or the probability that the hazard rate is less than other cars, which is the integral from 0 to 1/(20 million miles): `P(a < b) = 1 - exp(-bt) (bt + 1) = 0.96`.