(I U El1 Pfa) HWCHP - 2 PDF
(I U El1 Pfa) HWCHP - 2 PDF
(I U El1 Pfa) HWCHP - 2 PDF
Homework Assignment #4
IENG461
Due Date:
Solve the following exercises from chapter 8 of your Textbook 3rd edition:
f(x) ={
Solution:
F(x)= = , -<x<0
And
F(x)= + = { - { = - +
Therefore; F(x) = {
Exercise-2: Develop a generation scheme for the triangular distribution with pdf:
(x-2), 2x3
0, otherwise.
Generate 10 values of the random variate, compute the sample mean, and compare it to the true mean
of the distribution.
Solution:
Step 1.
cdf = F (x)= 1 - x + x2 /4, 2 = x<3
x - x2 /12 - 2, 3 <x= 6
X= {
( )
I generated 10 random numbers by excel and Ill use them to generate values for the random Variate X:
Exercise-4.
Develop a generator for a triangular distribution with range (1, 10) and a mean of 4.
Therefore: b=1
0, xa
( )
F(x) = ( )(
, a<xb
)
( )
1 ( )(
, b<xc
)
1, x>c
Step-1:
Therefore:
| 0, x1
( )
F(x)= | 1- , 1<x10
|1, 10<x
Step-2:
X= 10 81(1-R), 0 R1
Exercise-5.
Given the following cdf for a continuous variable with range -3 to 4, develop a generator for the
variable.
0, x -3.
+ x/6, -3<x 0.
1, 4<x.
Solution:
6(R-1/2), 0<R
X= ( ) <R1
Exercise-9.
( )( )
F(x) = ( )( )
x = 1, 2, ......, n
Solution:
F(1)=6/180= 0.033, F(2)= 30/180= 0.167, F(3)= 84/180= 0.467, and F(4)=1.
X 1 2 3 5
F(x) 0.033 0.167 0.467 1
Therefore;
Exercise-11.
Data have been collected on service times at a drive-in bank window at the Shady Lane National Bank.
This data are summarized into intervals as follows:
Set up a table for generating service times by the table-lookup method and generate five values of
service time using four-digit random numbers.
Solution:
X = x(i-1)+ ai(R- (i-1)/n), for any R such that (i-1)/n < R i/n, n = 7, and i= 1,2,..,7.