sample from arbitrary continuous distribution

8 Ansichten (letzte 30 Tage)
Xin
Xin am 8 Jan. 2017
Kommentiert: Xin am 20 Feb. 2017
Say I have a very complicated probability distribution function: x^(-2)*y^(-3)*exp(-z/t), where x y z t are all continuous positive numbers. The integration in x,y,z,t space is not 1, so there has to be some scaling factor. How can I devise a function, or is there a convenient function with some symbolic that allows me to sample a random, continuous set of numbers from this distribution? What if I want to sample a full conditional distribution, say x, with y,z,t as known?
Many thanks.
  1 Kommentar
the cyclist
the cyclist am 8 Jan. 2017
Are your x, y, and z correlated with each other, or independent?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

the cyclist
the cyclist am 8 Jan. 2017
Bearbeitet: the cyclist am 9 Jan. 2017
There are two key elements to your problem:
  • Sampling from an arbitrary distribution
  • Sampling from a multivariate distribution (and are those variables correlated?)
To do the first part -- for example just getting samples from x^(-2) -- there is a method using the inverse of the cdf. I suggest you take a look at this thread in the old MATLAB forum to get started.
If you have independent variables, then you can just multiply the distributions of each variable. If you have dependent variables, then your best bet is to use the copula approach.
There are examples in that documentation that will help you get started. I suggest that you try some baby steps for each of these two parts, so that you build your understanding, rather than trying to solve your whole problem at once.
  1 Kommentar
Xin
Xin am 20 Feb. 2017
Thank you for your answer, I have got it working.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by