Consider the following pdf: where > 0 and > 0 are the parameters of the
Question:
Consider the following pdf:
where θ > 0 and τ > 0 are the parameters of the model. [This pdf is suggested for modeling waiting time in the article “A Model of Pedestrians’ Waiting Times for Street Crossings at Signalized Intersections” (Trans. Res. 2013: 17–28).]
a. Write a function to simulate values from this distribution, implementing the inverse cdf method. Your function should have three inputs: the desired number of simulated values n and values for the two parameters for h and s.
b. Use your function in part (a) to simulate 10,000 values from this wait time distribution with θ = 4 and τ = 80. Estimate E(X) under these parameter settings. How close is your estimate to the correct value of 16?
Step by Step Answer:
Modern Mathematical Statistics With Applications
ISBN: 9783030551551
3rd Edition
Authors: Jay L. Devore, Kenneth N. Berk, Matthew A. Carlton