Download Assignment 3

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
MTH 511A : Statistical Simulation and Data Analysis-2017
Assignment 3
1.
Give a method for generating a random variable having density function
f ( x)  e x /(e  1), 0  x  1 .
2.
Give a method to generate a random variable having density function
x2
if 2  x  3

.
f ( x)   2
2

x
/
3

if 3  x  6
 2
3.
Use the inverse transform method to generate a random variable having distribution function
x2  x
F ( x) 
, 0  x  1.
2
4.
Give a method for generating a Weibull random variable having distribution function
F ( x)  1  exp( x  ), 0  x  
5.
Give a method for generating a random variable having density function
2x
  x  0
e ,
f ( x)   2 x
.
0 x
e ,
6.
Let X be an exponential random variable with mean 1. Give an efficient algorithm for simulating a
random variable whose distribution is the conditional distribution of X given that X < 0.05. That is,
its density function is
e x
f ( x) 
, 0  x  0.05 .
1  e0.05
Generate 1000 such variables and use them to estimate of E[ X | X  0.05]. Then determine the
exact value of E[ X | X  0.05].
7.
Suppose it is relatively easy to generate random variables from any of the distributions
Fi , i  1,..., n. How could we generate a random variable having the distribution function
n
F ( x)   pi Fi ( x)
i 1
where pi , i  1,..., n are nonnegative numbers whose sum is 1?
[This is Composition Method]
8.
Give algorithms for generating random variables from the following distributions using
Composition Method.
x  x3  x5
(a) F ( x) 
, 0  x 1
3
1  e2 x  2 x
if 0  x  1

3
(b) F ( x)  
2 x
 3  e if 1  x  
 3
n
n
(c) F ( x)  i 1i xi ,0  x  1, where i  0, i 1i  1 .
9.
A casualty insurance company has 1000 policyholders, each of whom will independently
present a claim in the next month with probability .05 . Assuming that the amounts of the
claims made are independent exponential random variables with mean $800, use simulation to
estimate the probability that the sum of these claims exceeds $50,000.
10.
Suppose it is easy to generate random variable from any of the distribution Fi , i  1,.., n. How
can we generate from the following distributions ?
n
(a) F ( x)  i 1 Fi ( x)
(b) F ( x)  1  i 1[1  Fi ( x)] .
n
11.
12.
13.
Give two methods for generating a random variable having density function
f ( x)  xe x , 0  x  
and compare their efficiency.
Suppose that we want to generate a random variable X whose density function is
1
f ( x)  x 2e  x x  0
2
by using the rejecting method with an exponential density having rate  . Find the value of 
that minimizes the expected number of iterations of the algorithm used to generate X .
Give an algorithm that generate a random variable having density
f ( x)  30( x 2  2 x3  x 4 ), 0  x  1.
Discuss the efficiency of this approach.
14.
Write an algorithm to generate a random variable conditional on its value exceeding 5 from the
following gamma density function xe x (0  x  ) and 0 otherwise.
14.
Let (X, Y) be uniformly distributed in a circle of randius1. Show that if R is the distance from the
center of the circle to (X, Y) then R 2 is uniform on (0,1).
15.
Write a program that generates the first T time units of a Poisson process having rate  .
16.
Buses arrive at a sporting event according to a Poisson process with rate 5 per hour. Each bus is
equally likely to contain either 20, 21,…, 40 fans, with the numbers in the different buses being
independent. Write an algorithm to simulate the arrival of fans to the event by time t = 1.