Solving Sampling Problem: How to Sample from Q(x,y) with Rejection Method?

  • Context: Graduate 
  • Thread starter Thread starter Alamino
  • Start date Start date
Click For Summary
SUMMARY

This discussion focuses on the implementation of the rejection sampling method to sample from a distribution Q(x,y) derived from another distribution W(x,y). The relationship between the two distributions is defined as Q(x,y) = W(x,y) F(y), where F(y) can be calculated for given values of y. The proposed method involves selecting a vector from W, calculating F(y), and using it as a probability to either accept or reject the sampled vector, ensuring that the final values conform to the distribution Q(x,y).

PREREQUISITES
  • Understanding of probability distributions, specifically W(x,y) and Q(x,y).
  • Familiarity with rejection sampling techniques in statistics.
  • Knowledge of how to compute F(y) for given y values.
  • Basic programming skills to implement the sampling algorithm.
NEXT STEPS
  • Research the mathematical foundations of rejection sampling methods.
  • Learn about the properties of probability distributions and their transformations.
  • Explore programming libraries that facilitate sampling from distributions, such as NumPy in Python.
  • Investigate case studies or examples of rejection sampling applied in real-world scenarios.
USEFUL FOR

Statisticians, data scientists, and researchers involved in probabilistic modeling and sampling techniques will benefit from this discussion.

Alamino
Messages
69
Reaction score
0
I would appreciate if someone could give me some idea about how to solve this sampling problem. I have a distribution W(x,y) of fields x and y characterized by a population of N vectors (x,y). I have to sample x and y fields according to a second distribution Q(x,y) which is related to W by:

Q(x,y) = W(x,y) F(y),

where given some y, I know how to calculate F(y). Now, I can sample from W simply by choosing a vector from my population and then, I can calculate F(y). I am hoping I can use something similar to the rejection method to sample from Q.

Does anyone has some idea about that?

Cheers,
Roberto.
 
Physics news on Phys.org
Uhm... I'm not sure I understood what actually IS your problem. Do you have just a bunch of values, or an analytical shape for W(x,y)? Anyway, I think you could do like this:

1) Pick a vector from W(x,y)
2) Calculate F(y)
3) Use it as a probability and make a random sort; if it's "yes", then keep the value; otherwise, reject it and pick another one. Like, if F(y) (normalized) is 0.7, then you have a 70% probability you'll keep the vector.In this way, final values should be distributed following Q(x,y). And it's some sort of rejection method.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 30 ·
2
Replies
30
Views
5K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 17 ·
Replies
17
Views
3K
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K