Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

ESE503 - Simulation Modeling & Analysis (Homework #9) University of Pennsylvania ESE 503

Rating
-
Sold
-
Pages
17
Grade
A+
Uploaded on
11-04-2023
Written in
2022/2023

ESE503 - Simulation Modeling & Analysis (Homework #9) Spring Semester, 2021 M. Carchidi ——————————————————————————————————————— Problem #1 (15 points) - An Empirical Continuous Distribution Data have been collected on service times at a drive-in bank window at the Shady Lane National Bank. This data are summarized into time intervals as follows. Interval (seconds) Frequency 15-30 10 30-45 20 45-60 25 60-90 35 90-120 30 It is desirable to run a simulation using these service times and we want the service times to be continuous from 0 to 300 seconds. Using a linear interpolation scheme, develop a random-variate generator for this service-time distribution. ——————————————————————————————————————— Problem #2 (15 points) - Simulate the Random Variable Suppose that the lifetime of a device is to be modeled by the random variable X having pdf fx  e−4x  3xe−2x2 over the range space 0 ≤ x. Develop a method for generating a random sample for X, given two random numbers R1 and R2 from U0, 1. Run a simulation checking your result against EX and X. ——————————————————————————————————————— Problem #3 (15 points) - A Discrete Distribution Develop a random-variate generator for a discrete random variable X with pmf px  2x  1 x2x  12 for x  1, 2, 3,…. Your final answer should involve the ceiling function and you may use the identity 2x  1 x2x  12  1 x2 − 1 x  12 when computing Fx. You should check your answer by computing EX and comparing it to a simulation. ——————————————————————————————————————— ——————————————————————————————————————— Problem #4 (15 points) - Generating Random Samples Consider a single-channel queue having customer interarrival times given by the pdf fx  6x2125 − x3 15625 for 0 ≤ x ≤ 5 minutes, and service times distributed as given by the gx  2x22x  3 135 for 0 ≤ x ≤ 3 minutes. Run a simulation of 2000 customer arrivals and use your simulation to calculate: (a) the average customer waiting time, (b) the probability that a customer must wait, (c) the fraction of the time the server is idle, (d) the average service time, (e) the average time between arrivals, (f) the average time a customer spends in the system, (g) the average number of customers in the system, and (h) the average number of customers waiting in line. Note that you need not compute the theoretical values here. ——————————————————————————————————————— Problem #5 (20 points) - An Unusual Random Variable Suppose that a random variable X has a pdf given by fx  0, for x ≤ −a bx  a/a, for −a ≤ x ≤ 0 be−x, for 0 ≤ x where a, b and  are positive constants with ab  2. A typical plot of this is shown in the following figure

Show more Read less
Institution
Course

Content preview

ESE503 - Simulation Modeling & Analysis (Homework #9)
Spring Semester, 2021 M. Carchidi
———————————————————————————————————————
Problem #1 (15 points) - An Empirical Continuous Distribution
Data have been collected on service times at a drive-in bank window at the Shady Lane
National Bank. This data are summarized into time intervals as follows.
Interval (seconds) Frequency
15-30 10
30-45 20
45-60 25
60-90 35
90-120 30
120-180 20
180-300 10
It is desirable to run a simulation using these service times and we want the service times
to be continuous from 0 to 300 seconds. Using a linear interpolation scheme, develop a
random-variate generator for this service-time distribution.
———————————————————————————————————————
Problem #2 (15 points) - Simulate the Random Variable
Suppose that the lifetime of a device is to be modeled by the random variable X having pdf
2
fx  e −4x  3xe −2x
over the range space 0 ≤ x. Develop a method for generating a random sample for X,
given two random numbers R 1 and R 2 from U0, 1. Run a simulation checking your result
against EX and X.
———————————————————————————————————————
Problem #3 (15 points) - A Discrete Distribution
Develop a random-variate generator for a discrete random variable X with pmf
px  22x  1 2
x x  1
for x  1, 2, 3, … . Your final answer should involve the ceiling function and you may use
the identity
2x  1  1 − 1
2 2 2
x x  1 x x  1 2
when computing Fx. You should check your answer by computing EX and comparing
it to a simulation.
———————————————————————————————————————

,———————————————————————————————————————
Problem #4 (15 points) - Generating Random Samples
Consider a single-channel queue having customer interarrival times given by the pdf
6x 2 125 − x 3 
fx 
15625
for 0 ≤ x ≤ 5 minutes, and service times distributed as given by the
2x 2 2x  3
gx 
135
for 0 ≤ x ≤ 3 minutes. Run a simulation of 2000 customer arrivals and use your
simulation to calculate: (a) the average customer waiting time, (b) the probability that a
customer must wait, (c) the fraction of the time the server is idle, (d) the average service
time, (e) the average time between arrivals, (f) the average time a customer spends in the
system, (g) the average number of customers in the system, and (h) the average number of
customers waiting in line. Note that you need not compute the theoretical values here.
———————————————————————————————————————
Problem #5 (20 points) - An Unusual Random Variable
Suppose that a random variable X has a pdf given by
0, for x ≤ −a
fx  bx  a/a, for −a ≤ x ≤ 0
be −x , for 0 ≤ x
where a, b and  are positive constants with ab  2. A typical plot of this is shown in the
following figure.




Typical Plot of fx versus x

Determine how to sample X given a random number R  U0, 1 and run a 2000 Sample
Monte-Carlo Simulation checking your result against EX and X.
———————————————————————————————————————




2

, ———————————————————————————————————————
Problem #6 (20 points) - An Acceptance-Rejection Algorithm
a.) (10 points) Develop an acceptance-rejection algorithm for generating a continuous
random variable X having pdf
  1    1 
fx  x 1 − x  

for 0  ,  and 0  x  1 and zero otherwise. For example, a plot of f versus x for   3
and   1 for 0 ≤ x ≤ 1 is shown in the figure below.


y 2.0
1.5


1.0


0.5


0.0
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
x

Plot of f versus x using   3 and   1

If 1000 samples of X are desired, on average, how many times must your algorithm be
repeated ?
b.) (10 points) Assuming that   3 and   1, test your algorithm developed in part (a)
using an EXCEL spreadsheet by comparing the simulated mean and standard deviation
(using 1000 values for R 1 and 1000 values for R 2 ) to the theoretical values of
  EX and  EX 2  − EX 2 .
Also check that your simulated value of c computed in part (a) agrees with the theoretical
value of
fx
c  max .
0≤x1 gx

———————————————————————————————————————




3

Written for

Course

Document information

Uploaded on
April 11, 2023
Number of pages
17
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$9.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
ExamsConnoisseur Self
Follow You need to be logged in order to follow users or courses
Sold
587
Member since
3 year
Number of followers
344
Documents
1492
Last sold
3 weeks ago

4.2

68 reviews

5
40
4
11
3
13
2
1
1
3

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions