114k views
0 votes
You have determined that waiting times at a toll booth are uniformly distributed over the interval 20 to 60 seconds. What formula would you use in Excel to generate random values in this range that follow the uniform distribution?

User JohnnyRose
by
6.2k points

1 Answer

1 vote

Answer:

"=RAND()*(40) + 20"

Explanation:

When we say that a random variable X follows an uniform distribution
X \sim Unif(a,b) where a is the lower limit and the upper limit we are saying that each value on the interval (a,b) have the same probability of occur, and the density function is given by:


f(x) =(1)/(b-a) , a \leq x \leq b

And
f(x) = 0 for any other case.

For this special case we know that the random variable T="Waiting times at a toll booth" follows this distibution:


T \sim Unif (a=20, b =60)

And we can use the excel to create random values on this range. So then the code to do this is given by:

"=RAND()*(b-a) + a"

"=RAND()*(60-20) + 20"

"=RAND()*(40) + 20"

User ArekBulski
by
5.6k points