As far as I can tell, every tech company around has gone absolutely slop wild.
If your brain is still working, you probably realize that you need to have some actual people check the output from time to time. But human attention is expensive. You can take batches of output and sample from them. This is about how to use statistics to figure out if your failure rate is good enough
Posterior = prior + data
Bayesian analysis is a little three-step dance that goes like this:
|
probability distributions 🤔 more references
|
Beta(1, 1) prior
$\underbrace{\mu}{\text{Our prior on the rate}} \sim \underbrace{Beta(\alpha_0, \beta_0)}{\text{is a Beta distribution with params } \alpha_0, \beta_0}$
You can interpret the prior parameters as “hypothetical data” that summarizes your beliefs about the rate.
|
other choices 🤔 Tell me more
|
Update equation
|
conjugate prior 🤔 What if I can't use a conjugate prior
|
$\underbrace{\mu \mid y, n}{\text{The posterior of the rate given the data}} \sim \underbrace{Beta(\alpha_0 + y, \beta_0 + N - y)}{\text{is given by this beta distribution}}$
Beta(a, b) and 95% CI on fail rate
|
sampling and differencing from scipy.stats import beta y = 40 n = 1000 a_0 = 1./3 b_0 = 1./3 posterior = beta(a_0 + y, b_0 + n - y) n_simulations = 100000 posterior_samples = posterior.rvs(n_simulations) print('Monte carlo estimate of P(Rate) < 5%: ', sum(posterior_samples < .05) / len(posterior_samples)) print('CDF(5%) = ', posterior.cdf(.05))🤔 What about
|
Beta binomial (n, a, b) and failure count
|
sampling simulation 🤔 What about
|