To learn more about EpiX Analytics' work, please visit our modeling applications, white papers, and training schedule.

Page tree

Different types of asphalt are considered for the resurfacing of a road from City A to City B. The current road has two types of asphalt, called "Grey" and "Black". For the government, safety is the major consideration when choosing the type of asphalt that has to be used for resurfacing. The performance of asphalt of course depends to a large extend on the specific weather and climate circumstances. Both types of asphalt have been used for the current road and we can therefore compare the risks of an accident per mile of Grey asphalt with that of Black asphalt. The historic data are:



Number of car miles (in millions)



Number of accidents



  1. Which asphalt is the safest?

  2.  How different would the number of accidents be if we resurfaced the road with one or other asphalt type?

  3. What percentage change in the number of accidents can we expect after resurfacing the road with the Black asphalt?

Question 1: Which asphalt is the safest?

The file Asphalt provides a solution.

The first step is to determine the underlying accident rates per million miles for the two types of asphalt. We assume a Poisson process for the accidents which is probably reasonable, but will not be entirely correct if random (rather than repeated seasonal) effects change the Poisson intensity, in which case it would be a mixture process. Then the exposure t is the millions of car miles that passed, and the number of observed events a is the number of accidents. The estimate of the accident rate is then l = Gamma(0,1/t,a) accidents/million car miles, using the Bayesian estimate with an uninformed prior (the technique is exactly the same if you use a classically derived uncertainty distribution for l).

A Gamma distribution estimate of l is constructed for each tarmac type. The two distributions are plotted below:

The density plot on the left shows that there is considerable overlap between the two distributions, which means that we cannot know for sure which accident rate is highest, although the cumulative plot shows that the Black asphalt is first order stochastic dominant and should therefore be preferred by the government.

A random sample from these distributions represent possible accident rates: if a value for Grey tarmac is less than for Black tarmac in an iteration, then this scenario gives Grey tarmac as being safer. An IF function compares the generated values from the two rates and returns a 1 if the Black asphalt is safer (lower rate than Grey) and a value of 0 if not. Simulation results for this IF function would be equivalent to a Bernoulli(p) distribution, where p is the confidence the analysis gives us that Black asphalt is safer than Grey. The mean of that Bernoulli is just p: the value we are interested in. We therefore use a function to report the mean of all simulated p's to report the p value directly into Excel at the end of a simulation. In this case, we have an 87% confidence that Black asphalt is better than Grey asphalt.

Numerical integration

This model is an example of Numerical Integration: a broad technique that has many applications in risk analysis. The confidence value we are looking for is, in words, the confidence of rate(Black) = x AND rate(Grey) > x, summed over all value of x. In equation terms this is:

p(\lambda_{black}<\lambda_{grey})\int\limits_0^\infty f_{\lambda black}(x)\big(1-F_{\lambda grey}(x)\big)dx

where f(x) is the Gamma pdf and F(x) is the Gamma cdf.

In the simulation software package model we are effectively using frequencies of the value that are generated as a replacement for an integration: flblack(x) is replaced by the frequency with which the Black Gamma distribution generates a value x, and Flgrey(x) is replaced by the frequency with which the Grey Gamma distribution generates a value greater than x, and therefore produces a 1 from the IF function.

A more efficient approach

Bearing in mind the numerical integration equation equivalent of this analysis, we could make a model that is much more efficient:

Create a Gamma(0,1/159,201) distribution for Black's accidents/million car miles rate.

Then calculate the confidence that Grey's rate would be greater:

Cell X: =1-GAMMADIST(Gamma(0,1/159,201),120,1/84,1)

Cell Y: =CB.GetForeStatFN(Cell X,2)

The GAMMADIST(,,,1) function returns the cdf for the Gamma distribution for Grey's rate.

Running a simulation will give the confidence that Black is better in Cell Y.

Questions 2: How different would the number of accidents be if we resurfaced the road with one or other asphalt type?

This question is answered in the Asphalt file.

The difference in rate is (λgrey-λblack), and the exposure is (84+159) so the difference in the expected number of accidents is therefore (λgrey-λblack)*(84+159).

Questions 3: What percentage change in the number of accidents can we expect after resurfacing the road with the Black asphalt?

This is a simple calculation, provided in the Asphalt file.

The links to the Asphalt software specific models are provided here:

  • No labels