Path: blob/main/Lessons/Lesson 10 - Simulation/Self_Assess_Solns_10.ipynb
871 views
Lesson 10 - Self-Assessment Solutions
Self-Assessment: Simulation - Solution
Answer: True
Self-Assessment: Simulating a System - Solution
Answer: True
Self Assessment: Simulation and Time - Solution
Answer: True
Self-Assessment: Generalizing Simulation Results - Solution
Answer: False. Generalizing beyond he conditions of the simulation could lead to erroneous results.
Self-Assessment: Type of Simulation - Solution
Answer:
a. The number of products sold over time. (yes)
b. The air pressure in submarine during its time under the water. (no)
c. The arrival of customers to a queue. (yes)
d. Whether is rains or not in a day over a 10-year period. (yes)
e. The temperature of an engine over a period of operation. (no)
Self-Assessment: Discrete-Event Simulation - Solution
(b) A baseball pitcher who throws a strike 60 percent of the time and a ball 40 percent of the time.
Let 0 <= rand <= 0.6 correspond to strikes and 0.6 < rand <= 1 correspond to balls.
Random observations:
0.3039 = strike
0.7914 = ball
0.8543 = ball
0.6902 = ball
0.3004 = strike
0.0383 = strike
Note that the results would be different if you make the arbitrary choice that 0 to 0.4 corresponds to balls and 0.4 to 1 correspond to strikes.
(c) The color of a traffic light found by a randomly arriving car when it is green 40 percent of the time, yellow 10 percent of the time, and red 50 percent of the time.
One way is to let 0 <= rand <= 0.4 correspond to green lights, 0.4 < rand <= 0.5 correspond to yellow lights, and 0.5 < rand <=1 correspond to red lights.
Random observations:
0.3039 = green
0.7914 = red
0.8543 = red
0.6902 = red
0.3004 = green
0.0383 = green
Self-Assessment: Discrete-Event Simulation 2 - Solution
(a) Since the data for sales covers 25 days, the number of days for each number of sales can be used to estimate the probability of selling that number of stoves on any given day as
, , , , .
(b) For a discrete random variable like this, the mean is computed analytically as
.
(e) See the following cell for the simulation. How close is the simulated answer to the exact answer given in part (b)?
Alternately you can use numpy.random.choice
as follows:
Self-Assessment: Simulation Results - Solution
Answer: False. Simulations have inherent variability, so they provides only statistical estimates rather than exact results.
Self-Assessment: Simulating Outcomes - Solution
Answer: random number generator.
*Self-Assessment: Random Variables in Simulation - Solution
Answer: False. An effort should be made to determine a distribution that most closely models the physical process.
Self-Assessment: Simulation Reproducibility - Solution
Answer: seed.