Horizontal axis is how many engines failed, and vertical axis is how many times that number of engines failed in the simulation.
The code that generated this is:
from scipy.stats import *
from pylab import *
failures = [binom(9,p).rvs() for p in beta(1,1,1e5) if binom(9,p).rvs() == 1]
hist(failures, bins=9, range=(0,9))
show()
The way this code works is it first picks a `p` from the prior. This `p` represents the failure probability for a single engine. Then we simulate the number of engines that fail when you have 9 of them, and filter out just the worlds where that number is equal to 1 as in the SpaceX launch. Or equivalently, we annihilate all the worlds that have a different observation than ours -- this is a central tenet in Bayesian statistics in contrast to frequentist statistics: we only base our inferences on the things that happened and not on things that hypothetically could have happened but didn't. In a slogan you could say "our fantasies are irrelevant". Then in the worlds that remain, where the same observation was made as in our world, we simulate the number of engines that fail on a new rocket launch and collect the results in a histogram.
So the posterior probability on the entire rocket failing for uniform prior is around 25%. Uniform prior means that you believe that all single engine failure probabilities are equally likely: you think it's equally likely that engines fail with 10% probability as with 63% probability. Tweak the first two parameters to beta to change your prior belief. If you've seen n engines fail in your life and k engines succeed, then setting the first parameter to n+1 and the second to k+1 is a reasonable choice (so the current setting corresponds to not having seen any rocket launches prior to this one). For example if you've seen 2 engines fail and 99 engines succeed you use `beta(3,100,1e5)`: https://dl.dropbox.com/u/388822/rocketfailuredistr_for_optim... Hardly any probability mass left for entire rocket failure :)
Horizontal axis is how many engines failed, and vertical axis is how many times that number of engines failed in the simulation.
The code that generated this is:
The way this code works is it first picks a `p` from the prior. This `p` represents the failure probability for a single engine. Then we simulate the number of engines that fail when you have 9 of them, and filter out just the worlds where that number is equal to 1 as in the SpaceX launch. Or equivalently, we annihilate all the worlds that have a different observation than ours -- this is a central tenet in Bayesian statistics in contrast to frequentist statistics: we only base our inferences on the things that happened and not on things that hypothetically could have happened but didn't. In a slogan you could say "our fantasies are irrelevant". Then in the worlds that remain, where the same observation was made as in our world, we simulate the number of engines that fail on a new rocket launch and collect the results in a histogram.So the posterior probability on the entire rocket failing for uniform prior is around 25%. Uniform prior means that you believe that all single engine failure probabilities are equally likely: you think it's equally likely that engines fail with 10% probability as with 63% probability. Tweak the first two parameters to beta to change your prior belief. If you've seen n engines fail in your life and k engines succeed, then setting the first parameter to n+1 and the second to k+1 is a reasonable choice (so the current setting corresponds to not having seen any rocket launches prior to this one). For example if you've seen 2 engines fail and 99 engines succeed you use `beta(3,100,1e5)`: https://dl.dropbox.com/u/388822/rocketfailuredistr_for_optim... Hardly any probability mass left for entire rocket failure :)