Can You Generate Samples from f(x2) Based on f(x1)?

  • Level: Graduate 
  • Thread starter Thread starter benjaminmar8
  • Start date Start date
  • Tags Tags
    Pdf
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 2K views
benjaminmar8
Messages
10
Reaction score
0
Hi,all,

I have a problem of computing pdf of some random variables. Assuming x1, x2... xN are some random variables. Now, I know the pdf of x1, which is f(x1). For the pdf of x2, it is given as a function of x1, in this case, how do I compute pdf of x2? Or, rather, how do I generate samples from f(x2)?

Thks
 
Last edited:
Physics news on Phys.org
One way is simply to generate a sample from x1, and compute what it gets transformed to in x2.
 
If you *have* to get the pdf of x2, the easiest way is to use the cumulative distribution and then take the derivative.