Random number from a unknown distribution

AI Thread Summary
To generate random numbers from an unknown distribution, it is essential to create a histogram of the data, which can then be used to approximate the distribution. Techniques like the Metropolis-Hastings algorithm can be employed to sample from this histogram. It is important to ensure that the histogram is defined over a finite interval to capture the majority of the distribution. Sufficient samples are necessary to construct an accurate histogram for effective random number generation. Implementing these methods will allow for the creation of a new set of random numbers that reflect the original distribution.
aihaike
Messages
52
Reaction score
0
Dear all,

I apologize if it is the wrong place, I don't know where I had to post this question since I'm not a mathematician.

Well, suppose you have a set of numbers which can be describe by a unknown distribution.
I just like to know whether we can use those numbers to generate a set of random number so that they will have the same probability distribution.

More precisely, I have a set of atomic velocities which do not obey to the Maxwell distribution. I'd like to generate a new (random) set of velocity. I thought about multiplying each initial value by a uniform random number between -1 and 1 but it does not seem to work.

Thank you,

Éric.
 
Mathematics news on Phys.org
Hey aihaike.

In terms of generating a random number process that generates something from an arbitrary distribution, there are techniques for doing this, but you need to be able to describe your distribution at least by some sort of histogram. It doesn't need to be an analytic one, but it needs to have at least some kind of bin-representation (i.e. histogram). You could fit a curve to the histogram but this is not necessary.

Once you have enough samples to build a good histogram, you can then use something like the Metropolis-Hastings algorithm to generate a random number from your histogram distribution.

http://en.wikipedia.org/wiki/Metropolis–Hastings_algorithm

You will need to implement some code to get the maximum and I recommend you use the uniform distribution where the constant * the uniform PDF "boxes in" your histogram distribution.

Also you will need to have your histogram be defined on a finite-interval. If it's defined on the entire real line or equivalent in multiple dimensions, you need to create a finite-interval that captures the majority of the distribution that's good enough. For example getting five standard deviations from the mean of a normal is going to be more than enough for most purposes.

Once you use MH and use the right test distribution taking into account your histogram and making sure the assumptions are good for using MH (there are other techniques you can look into), then this is your random number generator for your histogram distribution.

Just make sure you get a lot of samples to construct the histogram.
 
Hey Chiro,

Thank you for your quick and useful reply!
I looks like exactly what I was looking for.
I'll try it out.
Thanks again.

Éric.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Thread 'Imaginary Pythagoras'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...

Similar threads

Replies
97
Views
13K
Replies
3
Views
1K
Replies
1
Views
973
Replies
5
Views
2K
Replies
13
Views
2K
Back
Top