Sunteți pe pagina 1din 7

Mohamed Ayman Sbaih 20160713

Modeling and Simulation – Activity (4)

1. Consider the following discrete distribution of the random variable X whose probability
mass function is p(x).

a) Determine the CDF F(x) for the random variable, X.

Solution : The condition of cumulative Density Function (CDF) is


f(x) = P(x<=k)
x 0 1 2 3 4
P(x) 0.3 0.2 0.2 0.1 0.2
CDF(x) 0.3 0.3+0.2=0.5 0.5+0.2=0.7 0.7+0.1=0.8 0.8+0.2=1.0

.
b) Create a graphical summary of the CDF.

Series 1
1.2

1 1

0.8 0.8
0.7
0.6
0.5
0.4
0.3
0.2

0
Category 1 Category 2 Category 3 Category 4 Category 5

Series 1
c) Create a look-up table that can be used to determine a sample from the discrete
distribution, p(x).
d) Generate 3 values of X using the sequence of (0,1) random numbers in Table 1 (starting
with
the first row, reading across).

U1 = 0.943 X=4
U2 = 0.398 X=1
U3 = 0.372 X=1
2. Suppose that customers arrive at an ATM via a Poisson process with mean 7 per hour.
Determine the arrival time of the first 6 customers using the data given in Table (1) (starting
with the first row). Use the inverse transformation method.

Table (1)
0.943 0.398 0.372 0.943 0.204 0.794
0.498 0.528 0.272 0.899 0.294 0.156
0.102 0.057 0.409 0.398 0.400 0.997
Customers arrive at an ATM with mean 7 per hour
So , 7 = ‫ג‬
Then , the CDF is :
F(x) =1-e− ‫ ג‬x
V = 1-e− ‫ ג‬x
−1
F−1 (V )= *ln(1-v)
‫ג‬

Arrived time of first six customers can be calculated as

Customer Vi Intu Arrival Arrival time


time
1 0.943 0.4092 0.4092
2 0.498 0.0985 0.4092+0.0985=0.5077
3 0.102 0.0154 0.5077+0.0.0154=0.5231
4 0.398 0.0725 0.5231+0.0725=0.5956
5 0.528 0.1073 0.5956+01073=0.7029
6 0.057 0.0084 0.7029+0.0084=0.7113
3. A component has an exponential time-to-failure distribution with mean 10,000 hour. The
component has already been in operation for its mean life. What is the probability that it will
fail by 15,000 hour?
Answer:

X is the time to failure, and is exponentially distributed with mean 10,000 hours

This gives us a cumulative distribution


−x
F(x)=1- e 10000

1
Here the failure rate = ‫=ג‬
10000
−5000
We want P(X ≤15000 | X > 10000)= P(X ≤ 5000) =1 - e 10000 =0.3935

4. A bus arrives every 20 minute from 6:40AM to 8:40AM. Ahmed arrives randomly and
uniformly between 7:00AM and 7:30AM. What is the probability that Ahmed is waiting for
bus more than 5 minutes?
Answer:
1
E(x) = 20 min =
‫ג‬
1
‫= ג‬
20
p(x > 5) = 1 – p(x ≤ 5 ) = 1- 0.222 = 0.778
5 −x
1 −x
p(x ≤ 5 ) = ∫ e 20 = 1 - e 20 = 0.222
0 20
5. The reference desk at a library receives request for assistance at an average rate of 10 per
hour (Poisson distribution). There is only one librarian at the reference desk, and he can
serve customers in an average of 5 minutes (exponential distribution). What are the
measures of performance for this system?

Answer:
10 = ‫ג‬req/hour , µ = 12 customer
‫ג‬ 10
L= = = 5 customer.
µ− ‫ ג‬12−10
‫ג‬2 100
LQ = = = 4.167 customer
µ(µ−‫ ) ג‬24
1 1
W= = 0.5 minutes
µ− ‫ ג‬12−10
‫ג‬ 10 10
WQ = = = = 0.417
µ(µ−‫ ) ג‬12(12−10) 24
10
P0 = (1 – ƿ) ƿ0 = 1 - = 0.167
12
Thanks

S-ar putea să vă placă și