Search code examples
pythonrandomstatisticsdistribution

Random values from a PERT distribution in Python


I'd like to generate in Python 10,000 random values from a PERT distribution that has the following parameters low=6898.5, peak= 7338.93, high=7705.87

How can I do that?


Solution

  • using pertdist from PyPi, Python 3.9 Win10 x64

    Code

    from pert import PERT
    import seaborn as sns
    
    low=6898.5
    peak=7338.93
    high=7705.87
    
    pert = PERT(low, peak, high)
    sns.kdeplot(pert.rvs(100000))
    

    produced graph below

    enter image description here