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.

2007-12-20 05:54:35 · 2 answers · asked by Anonymous in Science & Mathematics Mathematics

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

2007-12-20 06:01:10 · update #1

2 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 explicity 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.

http://books.google.com/books?id=AfeEAAAACAAJ&lr=

2007-12-21 14:15:11 · answer #1 · answered by Merlyn 7 · 0 0

definite....The uniform distribution is used for the two. you in basic terms rework the uniform distribution. See wikipedia ref. decrease than... right this is a random established transformation for uniform: pick the flow randn( ) /* established random from -a million to a million by potential of _randf uniform 0->a million */ { static int iset=0; static pick the flow gset; pick the flow fac,r,v1,v2; if( first_time) init_rand(); if( !iset ) { do { v1=2.0*_randf()-a million.0; v2=2.0*_randf()-a million.0; r=v1*v1+v2*v2; } whilst (r>=a million.0); fac=sqrt(-2.0*log(r)/r); gset=v1*fac; iset=a million; return( v2*fac); } iset=0; return( gset ); }

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

fedest.com, questions and answers