Random number from a unknown distribution

In summary, Éric is looking for a way to generate a set of random numbers with the same probability distribution as a given set of numbers. Chiro suggests using the Metropolis-Hastings algorithm to generate random numbers from a histogram of the distribution. It is important to have a good histogram and to use the right test distribution when implementing this method. Éric thanks Chiro for the helpful response.
  • #1
aihaike
55
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
  • #2
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.
 
  • #3
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.
 

1. What is a random number from an unknown distribution?

A random number from an unknown distribution refers to a number that is chosen from a set of numbers with an unknown probability distribution. This means that the likelihood of each number being chosen is not known.

2. How is a random number from an unknown distribution generated?

A random number from an unknown distribution is typically generated using a random number generator, which is a mathematical algorithm that produces a sequence of numbers that appear to be random. The numbers are chosen without any specific pattern or bias, making them unpredictable.

3. What is the significance of a random number from an unknown distribution in scientific research?

A random number from an unknown distribution is important in scientific research as it allows researchers to simulate real-world scenarios and make statistically valid inferences. It can also help to identify patterns or trends in data and make predictions about future outcomes.

4. Can a random number from an unknown distribution be used in place of a known distribution?

No, a random number from an unknown distribution cannot be used in place of a known distribution. This is because the probability distribution of the unknown numbers is not known, so it cannot be compared to a known distribution for accuracy or validity.

5. How can a random number from an unknown distribution be tested for validity?

A random number from an unknown distribution can be tested for validity through statistical analysis. This involves comparing the generated numbers to known distributions and using techniques such as hypothesis testing to determine if the numbers are truly random or if there is a bias present.

Similar threads

  • Programming and Computer Science
Replies
1
Views
638
Replies
97
Views
10K
Replies
1
Views
2K
  • General Math
Replies
3
Views
1K
Replies
12
Views
736
Replies
2
Views
2K
Replies
5
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
339
Replies
4
Views
3K
Back
Top