Question

In: Statistics and Probability

3. Consider the following pdf:                                    Q(x) = {3x^2 / 2 -1

3. Consider the following pdf:

                                   Q(x) = {3x^2 / 2 -1? x ?1

                                              {0 otherwise

a. Set up an acceptance-rejection algorithm for this distribution. Use the majorizing function g(x) = 3/2.

b. Assuming a linear congruential generator with parameters a: 21, m: 100, c: 13, and x0: 7, generate two random variates from the distribution q(x).

c. Can you make any comments about the potential period of the LCG in part b?                                                                                                        

Solutions

Expert Solution

Let random variable X has a pdf

Let   has common support with X

a generic accept/reject algorithm to generate draws from a random variable X is given by

  1. Generate a draw from and from U from uniform distribution
  2. Accept X=V if , else return to step 1

We have been given the majorizing function g(x) = 3/2.. We want to find a pdf h(x) such that

Let c=3

let us get the pdf using

h(x) is a uniform distribution in the interval [-1,1]

That means we have

Finally

The steps then to generate 1 random variable from Q(x) is

  1. Generate a draw from h(v) using and  
  2. Accept X=V if , else return to step 1

b) Generating random numbers using LCG

with a=21, m = 100 c=13 and

we can get the following

and so on.

We convert this into a draw from uniform [0,1] by deviding by m=100, that is a draw from uniform (0,1)

To generate a draw from uniform [a,b], we use or

to generate from [-1,1] use

The following table shows the output for 10 random numbers

x
60
73
46
79
72
25
38
11
44
37
90

Following are the simulatins

  1. Simulation 1
    1. X1 = 60, V= -1+2*60/100 = 0.2
    2. X2=73, U = 73/100 = 0.73
    3. Q(V)/(3/2) = v^2= 0.2^2 = 0.04
    4. 0.73<0.04? False, reject V
  2. sim 2
    1. X3 = 46, V= -0.08
    2. X4=79, U = 79/100 = 0.79
    3. Q(V)/(3/2) = v^2= 0.0064
    4. U<0.0064? False, reject V

We do the following in excel

The output for 2 numbers is

0,80 and 0,52 are the first 2 numbers genaretd from f(x)

c) this period of LCG in part a is m=100 due to the following conditions

  • c=13 is relatively prime to m=100
  • a-1= 21-1=20 and the prime factors of m=100 are 5 and 2. 20 is divisible by both 5 and 2
  • a-1 = 20 is a multiple of 4 and m=100 is a multiple of 4

Related Solutions

Consider f(x) = 2 + 3x^2 − x^3
Consider f(x) = 2 + 3x2 − x3 a) Find local max and min values b) Find intervals of concavity and infection points
Consider ​z = x ​ 1 ​ 2 ​ - 3x ​ 1 ​ x ​...
Consider ​z = x ​ 1 ​ 2 ​ - 3x ​ 1 ​ x ​ 2 ​ + 3x ​ 2 ​ 2 ​ + 4x ​ 2 ​ x ​ 3 ​ + 6x ​ 3 ​ 2 ​ . 1)Find the extreme values, if any, of the above function. 2)Check whether they are maxima or minima.
1) Let P(x) = 3x(x − 1)3 (3x + 4)2 . List the zeros of P...
1) Let P(x) = 3x(x − 1)3 (3x + 4)2 . List the zeros of P and their corresponding multiplicities. 2) Let f(x) = −18(x + 3)2 (x − 2)3 (x + 71)5 . Describe the end behavior of f by filling in the blank below. As x → −∞, f(x) → . As x → ∞, f(x) → . 3) The polynomial of degree 4, P(x) has a root of multiplicity 2 at x = 3 and roots of...
A. In the following parts, consider the function f(x) =1/3x^3+3/2x^2−4x+ 7 (a)Find the intervals on which...
A. In the following parts, consider the function f(x) =1/3x^3+3/2x^2−4x+ 7 (a)Find the intervals on which f is increasing/decreasing and identify any local extrema. (b) Find the intervals on which f is concave up/down and find any inflection points. B. Consider the function f(x) = sin(x) + cos(x). Find the absolute minimum and absolute maximum on the interval [−π,π].
Let X have the pdf fX(x) = 3(1 − x) 2 , 0 < x <...
Let X have the pdf fX(x) = 3(1 − x) 2 , 0 < x < 1. (a) Find the pdf of Y = (1 − X) 3 . Specify the distribution of Y (name and parameter values). (b) Find E(Y ) and Var(Y ).
For the function f(x) = x^2 +3x / 2x^2 + 6x +3 find the following, and...
For the function f(x) = x^2 +3x / 2x^2 + 6x +3 find the following, and use it to graph the function. Find: a)(2pts) Domain b)(2pts) Intercepts c)(2pts) Symmetry d) (2pts) Asymptotes e)(4pts) Intervals of Increase or decrease f) (2pts) Local maximum and local minimum values g)(4pts) Concavity and Points of inflection and h)(2pts) Sketch the curve
For the function f(x) = x^2 +3x / 2x^2 + 7x +3 find the following, and...
For the function f(x) = x^2 +3x / 2x^2 + 7x +3 find the following, and use it to graph the function. Find: a)(2pts) Domain b)(2pts) Intercepts c)(2pts) Symmetry d) (2pts) Asymptotes e)(4pts) Intervals of Increase or decrease f) (2pts) Local maximum and local minimum values g)(4pts) Concavity and Points of inflection and h)(2pts) Sketch the curve
Suppose that a random variable X has a pdf f(x) = ke^(-3x^2+6x-5), -infinity < x <...
Suppose that a random variable X has a pdf f(x) = ke^(-3x^2+6x-5), -infinity < x < infinity (a) Find k. (b) Find the mean and variance of X. (c) Find the probability that X is between 1 and 1.5.
Suppose that a random variable X has a pdf f(x) = ke^(-3x^2+6x-5), -infinity < x <...
Suppose that a random variable X has a pdf f(x) = ke^(-3x^2+6x-5), -infinity < x < infinity (a) Find k. (b) Find the mean and variance of X. (c) Find the probability that X is between 1 and 1.5.
Suppose that a random variable X has a pdf f(x) = ke^(-3x^2+6x-5), -infinity < x <...
Suppose that a random variable X has a pdf f(x) = ke^(-3x^2+6x-5), -infinity < x < infinity (a) Find k. (b) Find the mean and variance of X. (c) Find the probability that X is between 1 and 1.5.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT