1. Learn
  2. /
  3. Courses
  4. /
  5. Discrete Event Simulation in Python

Exercise

Randomizing values

In this exercise, you will apply and examine different randomization methods. The objective is to make you comfortable with different methods and how they impact the way random numbers are generated. Each of these methods will be useful in different situations, so it is important to understand their differences.

Imagine you have a business process that takes about 15 minutes to complete. However, you know that the actual duration varies by approximately five minutes (up or down). Apply the different randomizing methods from the random package to generate variations of this duration in a controlled way.

Instructions

100 XP
  • Generate 1000 random process durations as integer numbers based on the information provided.
  • Generate 1000 random process durations as float numbers based on the information provided.
  • Generate 1000 pseudo-random durations as float numbers based on a Gaussian distribution with a mean and standard deviation of 15 and 5, respectively.
  • Generate 1000 pseudo-random durations as float numbers based on an exponential distribution with a lambda parameter of 1.5 (positive) and a peak at 15.