This topic provides an example of determining the joint distribution of uncertainty for parameters of a fitted distribution. We have created this Bayesian estimation example as an extension of the Weibull (0,Scale, Shape) distribution MLE fitting example and also used censored data.

Four spreadsheets are provided for the four different types of data censoring that you might encounter. Whilst the Weibull distribution is used here, the models are equally applicable to any other two parameter distribution.

All four models work in the same way:

1. A prior distribution is chosen for Shape and Scale (we have used Uniform distributions);

2. A range of the parameter's Shape and Scale are set using the start and increment values.

3. A table calculates the likelihood function for the observed data using each combination of alpha and beta;

4. The marginal distribution (the distribution of the parameter looked at in isolation, i.e. with the uncertainty of all other parameters integrated out) for the Shape is determined by summing over all likelihoods for the tested values of the Scale, and multiplied by the prior density.

5. The marginal distributions are graphed, normalizing to set their peaks to unity.

6. To simulate a value for Shape, a General distribution is constructed from the calculated marginal densities for Shape. The resulting value is plotted as a red diamond.

7. The conditional distribution for Scale is determined by looking up the generated Shape value within the table and interpolating to get the necessary Scale density. The plot is shown with a dashed blue line.

8. To simulate a value for Scale, a General distribution is constructed from the calculated marginal densities for Scale. The resulting value is plotted as a blue diamond.

### Correlation of Shape (b) and Scale (a)

The mean of a Weibull distribution is given by:

\mu = \frac{\beta}{\alpha}\Gamma\bigg(\frac{1}{\alpha}\bigg) |

which means that if we roughly know the mean (which is the first moment that one can estimate with accuracy as one acquires more data) then for a high value of alpha we must also have a high value for beta to maintain the same mean. Thus, you will notice from the model that if the generated value for alpha is in the high end of its uncertainty distribution, the conditional distribution (dashed blue line) for beta will also be high relative to the marginal distribution (full blue line). Scatter plots of alpha and beta values generated from the General distributions show a strong correlation pattern.

*The models:*

*The models:*

Note that the distribution of Scale is conditional on the value of the Shape in each iteration (see point 7 above).

The links to the software specific models are provided here: