(Failure) probability calculation I am working on mortality in 12 hospitals performing cardiac surgery in babies. The dataset is available here: Surg dataset. The dataset is structured in this way:
  n   r  hospital
 47   0     A
148  18     B
119   8     C
...  ...   ...

where $n$ is the number of operations and $r$ the number of deaths. My aim is to calculate the failure probability for each hospital $p_i$. The tutorial I am following (WinBUGS) reports that 
$r_i  \sim Binomial(p_i, n_i)$
but my question is: why $p_i$ can not be simply calculated as $p_i = r_i/n_i$?
 A: You can use the formula you quote, but it seems you choose to use Bayesian estimation method that includes prior information in the statistical model. Those are two different ways of doing statistics. Check this question for learning more on what is Bayesian model.
Actually if you compute the likelihoods of different $p_i$'s you will find that they have the greatest peaks at $r_i/n_i$ points. On the plot below you see likelihood profiles for individual hospitals and the vertical lines are point estimates of $r_i/n_i$.

Notice that with using uninformative prior $\pi(\theta) = 1$ (or $Beta(1,1)$), then Bayesian estimates of $\pi(\theta|x) \propto f(x | \theta) \pi(\theta)$ are the same as with using likelihood-based approach, so the three approaches would lead to the same point estimates.
So using "something more" then $r_i/n_i$ is helpful for handling uncertainty of parameters as @jaradniemi noticed in comment. On another hand, more sophisticated approach could be used if (a) you wanted to build a hierarchical model where there is some general probability of failure and site-specyfic effects, or (b) you could use Bayesian approach to include some out-of-data information in your model as an informative prior.
A: As @jaradniemi pointed out, $r_i/n_i$ are just estimates of the $p_i$. The bayesian model sets up the framework to handle the uncertainty of the $p_i$
