Problem 6 The density of a Betaa1 o2 random variable is defi
Problem 6. The density of a Beta(a1, o2) random variable is defined as B) CY B-1 a 1 (1 (a) 0 S S 1, a 0, B 0 I (a) (6) Where (a 1S a Constant equal to te dr. For a positive integer n we have l (n 1. Describe and perform the algorithm of generating a Beta(01, a2) random variable via the acceptance rejection method. 2. The density function of a Gamma (a, random variable is given as f(r) -Aara-ie An/T(a). Recall (or check! the following fact: If Yi Gamma (a1, 1), Y2 Gamma(a2, 1) and are independent, then the random variable 2, defined as is distributed Beta(a1, a2). Assume a1 4 and a2 3. Based on the above propose another algorithm of simulating Beta (a1, a2) random variable. Compare two algorithms from 1. and 2. and construct 95% confidence intervals for estimating the expectation of Beta(a1, a2)
Solution
1.
As we already know, ?nding an explicit formula for F?1(y) for the cdf of a rv X we wish to generate, F(x) = P(X ? x), is not always possible. Moreover, even if it is, there may be alternative methods for generating a rv distributed as F that is more e?cient than the inverse transform method or other methods we have come across. Here we present a very clever method known as the acceptance-rejection method. We start by assuming that the F we wish to simulate from has a probability density function f(x); that is, the continuous case.
Acceptance-Rejection Algorithm for continuous random variables
. Generate a rv Y distributed as G (G is probabilitydistribution )
. Generate U (independent from Y).
. If
U ? f(Y) /cg(Y), then set X = Y (
