Undergrad Beta Distributed Random Variates

BOAS
Messages
546
Reaction score
19
Hello,

I am looking at different methods for generating random numbers from the beta distribution. I am a bit confused about the following statement:

"It is known that if ##a, b ∈ N_{>0} = \{1, 2, 3, . . .\}##, ##Y = \frac{\sum_{i=1}^a X_i}{\sum_{j=1}^{a+b}X_k}## is ##\mathrm{Be}(a, b)##-distributed where ##X_1, X_2, . . .## are IID Exp(1) random variates."

What I am confused by is the different intervals of support that the beta distribution and exponential distribution have. The beta distribution is supported on [0,1] whereas the exponential distribution on [0, inf).

It seems that this method for generating samples from the beta distribution results in values greater than 1 which should otherwise be zero.

So what does one typically do in this situation?
Generate samples from a truncated exponential?
Throw away samples that are outside the support interval of the beta distribution?

I hope my question is clear,

thank you
 
Physics news on Phys.org
BOAS said:
Hello,

I am looking at different methods for generating random numbers from the beta distribution. I am a bit confused about the following statement:

"It is known that if ##a, b ∈ N_{>0} = \{1, 2, 3, . . .\}##, ##Y = \frac{\sum_{i=1}^a X_i}{\sum_{j=1}^{a+b}X_k}## is ##\mathrm{Be}(a, b)##-distributed where ##X_1, X_2, . . .## are IID Exp(1) random variates."
append: ##[0,1]## uniform random variables.

- - - -
Try that instead. With respect to a conjugate prior in Bayesian Inference, order statistics, and even a combinatorial interpretation of the the Beta integral (for the normalizing constant), the interpretation is always for uniform random variable over ##[0,1]## -- or ##(0,1)##. I have a hunch that that is what was being aimed at here.
- - - -
In general I'm not such a fan of opaque 'it is known that statements', especially when they are wrong. There are plenty of built-in libraries for generating from Beta, so I'm not really sure what you're aiming to do here.
 
Last edited:
StoneTemplePython said:
append: ##[0,1]## uniform random variables.

- - - -
Try that instead. With respect to a conjugate prior in Bayesian Inference, order statistics, and even a combinatorial interpretation of the the Beta integral (for the normalizing constant), the interpretation is always for uniform random variable over ##[0,1]## -- or ##(0,1)##. I have a hunch that that is what was being aimed at here.
- - - -
In general I'm not such a fan of opaque 'it is known that statements', especially when they are wrong. There are plenty of built-in libraries for generating from Beta, so I'm not really sure what you're aiming to do here.

Thank you, that looks much better!

I know that there are libraries for sampling from many of these distributions but I am learning a bit about different methods of doing so. The point is to generate the samples.
 
BOAS said:
Thank you, that looks much better!

I know that there are libraries for sampling from many of these distributions but I am learning a bit about different methods of doing so. The point is to generate the samples.

A couple other thoughts:the beta integral itself has a very nice probability interpretation which may help you get some intuition for what's going on here. I know I enjoy this video from MIT's 6.041x on edx (video hosted on youtube)



- - - -
if you are interested in computing, and have ever looked at building a Spam vs Ham classifier (a very simple Naive Bayes project) the Beta pdf comes up very naturally as a (conjugate) prior.

And finally, to the extent you are interested in ranking things like sports teams, you may find it interesting to see the Beta distribution lurking in part 3 of the below link, under "The Basic Statistic — Laplace’s Method". The Colley ranking system is used in BCS system for ranking college football -- its simple, transparent and unreasonably effective.

http://www.colleyrankings.com/matrate.pdf
 
Last edited:
BOAS said:
"It is known that if ##a, b ∈ N_{>0} = \{1, 2, 3, . . .\}##, ##Y = \frac{\sum_{i=1}^a X_i}{\sum_{j=1}^{a+b}X_k}## is ##\mathrm{Be}(a, b)##-distributed where ##X_1, X_2, . . .## are IID Exp(1) random variates."

It seems that this method for generating samples from the beta distribution results in values greater than 1 which should otherwise be zero.
Both the numerator and denominator contain the common summand ##( X_1 + X_2 + ...X_a) = S ## So the fraction is of the form ##Y = \frac{S}{S+p} ## where ##p = \sum_{j=a+1}^{a+b} X_j##.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K