That distribution is quite PERT!

There are a lot of useful probability distributions that are not featured in standard statistical textbooks. Some of them have distinctive names. In the past year I have had contact with SAS customers who use the Tweedie distribution, the slash distribution, and the PERT distribution. Often these distributions are used as part of a simulation study. This article describes how to simulate from the PERT distribution in SAS.

I had never heard of the PERT distribution prior to last week, but apparently it is related to the Project Evaluation and Review Technique (PERT), which is "a statistical technique for measuring and forecasting progress in research and development programs." Suppose management wants to know how long a project will take. This might be hard to estimate if the project consists of several interrelated tasks. However, perhaps you can estimate the length of each task and use those estimates to estimate the duration of the full project, hopefully with a statistical confidence interval.

To estimate the length of a task, you ask the manager (or some other expert) to tell you the minimum time it will take, the maximum time it will take, and the most likely time to complete the task. You might get an answer such as, "It will take at least five weeks, but probably more like eight weeks. Even in the worst case scenario, it'll be done in 20 weeks."

The PERT distribution turns those three numbers into a probability distribution, as shown in the following image. The minimum value of the distribution is 5, the maximum value is 20, and the mode of the distribution (the location of the peak) is at 8.

The PERT distribution isn't really a new distribution; it is a translated and scaled version of the well known beta distribution. The beta distribution is defined on the interval [0,1], but a simple linear transformation scales and translates the distribution onto any interval [min, max]. The beta distribution has two parameters, α and β, which determine the shape of the distribution. If I tell you that I want a beta distribution with a certain mean and a certain mode, you can find the values of α and β that satisfy my request. The mode is one of the parameters that the expert provides. The PERT distribution specifies that the mean is a certain weighted sum of the minimum, maximum, and mode.

Consequently, it is easy to simulate from the PERT distribution:

  • Specify the parameters min, mode, and max. These are used to determine the mean of the distribution.
  • Apply a linear transformation to determine the corresponding mode and mean for the beta distribution on [0,1]. Solve for the corresponding parameters, α and β.
  • Simulate data from the Beta(α, β) distribution. Translate and scale the data onto the interval [min, max].

The following DATA step simulates 2,000 observations from a PERT distribution with min=5, mode=8, and max=20. The UNIVARIATE procedure is used to plot the resulting histogram and to overlay the underlying beta distribution:

data PERT;
keep y;
call streaminit(123);
N = 2000; 
a = 5;  /* min  */
b = 8;  /* mode */
c = 20; /* max  */
mu = (a + 4*b + c)/6; /* mean as weighted sum of parameters */
/* find parameters for Beta distribution on [0,1] */
alpha = (mu-a)*(2*b-a-c)/((b-mu)*(c-a));
beta = alpha*(c-mu)/(mu-a);
do i = 1 to N;
   y = rand("Beta", alpha, beta); /* y in [0,1] */
   y = a + (c-a)*y;               /* translate to [min, max] */
/* display histogram and fit to translated and scaled Beta */
proc univariate data=PERT;
  histogram y / beta(theta=5 sigma=15 alpha=1.8 beta=4.2) endpoints=(5 to 20);

The graph (shown earlier in this article) shows the probability distribution of the duration of the task. Suppose that there are three sequential tasks, A, B, and C. Task A must be completed before B can begin, and Task B must be completed before C can begin. You can simulate the distribution of project duration times by simulating a time for each task and adding the three times together. Do this many times and you have an approximate distribution for the duration of the project.

The same process provides confidence intervals and probabilities for the duration of the project. For example, in the single-task case of the PERT distribution, you can estimate the probability that the task will take 12 weeks or longer:

data Prob;
   set PERT;
   Delay = (y>12);  /* indicator var: 1 if task takes more than 12 weeks */
proc freq data=Prob;
   table Delay / nocum; /* what percent of times took more than 12 weeks? */

For this one task, the probability that it will take more than 12 weeks is 19%. In the case of a single task, you can use the QUANTILE function to compute probabilities from the beta distribution, but in general the project time is the sum of several beta random variables, each with different parameters, so you need to use the simulated sampling distribution to estimate the probability.

I can see how techniques like this would be very useful for keeping track of big projects. Apparently this technique was used in the 1960's for estimating the length of projects in the US Navy and for projects leading up to the 1968 (Grenoble) Olympics.

tags: Simulation


  1. Mark Bailey Mark Bailey
    Posted October 24, 2012 at 1:31 pm | Permalink

    Great story. In case you have any readers who are JMP users and want to take a sample from the PERT distribution, I wrote this script to mimic your SAS program.

    dlg# = New Window( "PERT Sample",
    	< <Modal,
    	Panel Box( "Population",
    		Lineup Box( N Col( 2 ),
    			Text Box( "Minimum" ),
    			neb1# = Number Edit Box( 5 ),
    			Text Box( "Mode" ),
    			neb2# = Number Edit Box( 8 ),
    			Text Box( "Maximum" ),
    			neb3# = Number Edit Box( 20 )
    	Panel Box( "Sample",
    		Lineup Box( N Col( 2 ),
    			Text Box( "Size" ),
    			neb4# = Number Edit Box( 2000 )
    	H List Box(
    		Button Box( "OK",
    			minPERT# = neb1# << Get;
    			modePert# = neb2# << Get;
    			maxPERT# = neb3# << Get;
    			nSamples# = neb4# << Get;
    		Button Box( "Cancel", 
    // check if user decides to quit.
    If( dlg#["Button"] == -1,
    	Throw( "User cancelled" )
    // process information returned from dialog.
    mu# = (minPERT# + 4 * modePERT# + maxPERT#) / 6; alpha# = (mu# - minPERT#) * (2 * modePERT# - minPERT# - maxPERT#) /
    	((modePERT# - mu#) * (maxPERT# - minPERT#)); beta# = alpha# * (maxPERT# - mu#) / (mu# - minPERT#);
    // output as data table
    New Table( "PERT Sample",
    	New Table Variable( "Minimum", minPERT# ),
    	New Table Variable( "Mode", modePERT# ),
    	New Table Variable( "Maximum", maxPERT# ),
    	New Table Variable( "Mean", mu# ),
    	New Table Variable( "Alpha", alpha# ),
    	New Table Variable( "Beta", beta# ),
    	New Property( "Distribution",
    			Stack( 1 ),
    			Continuous Distribution(
    				Column( :Y ),
    				Horizontal Layout( 1 ),
    				Vertical( 0 ),
    				Fit Distribution( Beta )
    	New Column( "Y",
    			minPERT# + (maxPERT# - minPERT#) *
    			J( nSamples#, 1, Random Beta( alpha#, beta# ) )
  2. Posted October 29, 2012 at 9:37 pm | Permalink

    Hunh. I thought PERT used the triangular distribution. You learn something new every day.

  3. nico spadoni
    Posted January 30, 2015 at 9:03 am | Permalink

    Hi Rick,
    PERT has another param, lambda. The λ (lambda) parameter controls the scale of the distribution (the peakedness).
    Is possible adding λ in your procedure?

    • Posted January 30, 2015 at 9:29 am | Permalink

      You didn't supply a reference, but I suspect you want something like these two statements:

      lambda = 4;
      mu = (a + lambda*b + c)/(lambda+2); /* mean as weighted sum */
  4. Mathias
    Posted December 19, 2016 at 8:11 am | Permalink

    This formula doesn't work when 2*b-a-c = 0


    a  0.0026
    b  0.0031
    c  0.0036

    • Posted December 19, 2016 at 8:38 am | Permalink

      Yes. If 2*b-a-c=0 then alpha=beta=0 and the beta distribution is degenerate. If you click on the link the "the PERT distribution" in the first paragraph, you will find an article that describes limitations of the PERT distribution. Included in that article is a generalization of the PERT distribution that can eliminate some of the degeneracies. See also the comment just prior to yours.

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>