English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Devise an inverse transformation that converts the U(0,1) into a beta with parameters alpha, beta. I need help on figuring out the formula which I will then put into excel.

Start with a random number from the uniform(0,1) distribution.

2007-12-20 05:59:37 · 3 answers · asked by Anonymous in Science & Mathematics Engineering

3 answers

The goal is to generate Y ~ beta(a, b) from uniform random variables we have the following.

let U and V be uniform random variables on (0,1)

we will restrict the beta density f_Y(y) to a "box" with side 1 and c ≥ max_y f_Y(y). if can be shown that:

P( V ≤ y and U ≤ 1/c f_Y(V)) = 1/c P(Y ≤ y)

this is good, P(Y ≤ y) is the CDF of the beta random variable we are interested in.

further it can be shown that

P( Y ≤ y ) = P( V ≤ y | U ≤ 1/c f_Y(y) )

thus we can generate Y ~ beta ( a , b ) by

1) Generate U ~ Uniform(0,1)
2) Generate V ~ Uniform(0,1)
3) if U ≤ 1/c f_Y(y) set Y = V; otherwise return to step 1

unfortunately I don't think that Excel has the Beta function which is needed for finding f_Y(y), nor does it have the gamma function. if you can do numeric integrals in excel then you can explicitly define the Beta function and solve this problem. Or you can use the Beta Distribution functions in Excel, but that will not be doing this by generating the random variable via two uniform random variables.

-----
page 251 of this book has a wonderful step by step method for doing this.

the book is Statistical Inference by Casella and Berger.

---

2007-12-22 07:55:59 · answer #1 · answered by Merlyn 7 · 0 0

First, you need to place in the "diagnosis Toolpack" upload-in (in case you haven't any longer already. Then decrease than the kit menu go with data diagnosis. go with Random extensive form technology and additionally you gets a menu of innovations to get purely what you like.

2016-11-04 03:35:54 · answer #2 · answered by ? 4 · 0 0

Yes....The uniform distribution is used for both.
You simply transform the uniform distribution.
See wikipedia ref. below...

Here is a random normal transformation for uniform:

float randn( ) /* normal random from -1 to 1 via _randf uniform 0->1 */
{
static int iset=0; static float gset;
float fac,r,v1,v2;

if( first_time) init_rand();
if( !iset )
{
do {
v1=2.0*_randf()-1.0;
v2=2.0*_randf()-1.0;
r=v1*v1+v2*v2;
}
while (r>=1.0);
fac=sqrt(-2.0*log(r)/r);
gset=v1*fac;
iset=1;
return( v2*fac);
}
iset=0;
return( gset );
}

2007-12-20 08:49:20 · answer #3 · answered by Robert L 4 · 0 0

fedest.com, questions and answers