Random angles on the interval [0, 2Pi]

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
8 replies · 4K views
Barnak
Messages
62
Reaction score
0
Using Mathematica, I need to define a discrete probability distribution of N equally spaced angles on the interval [0, 2Pi], which isn't exactly uniform. More precisely, I need the distribution to feature a "Poisson-like" behavior : the angles should be randomly selected by random "packs" distributed on the interval, a bit like the rough "diagram" below :

Code:
    |       | |                               |   |                   |
  | |       | | |     | |     |     |       | | | |   | |   |     | | |     |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
0                                                                            2Pi

I don't want the distribution to be fully uniform...

Any idea how to do this with Mathematica ?
 
Physics news on Phys.org
If you select angles from a uniform distribution, you will get random places where angle values are selected more than once. You'll have to be precise about what "Poisson-like" behavior means if you wan't something different than that.
 
Stephen Tashi said:
If you select angles from a uniform distribution, you will get random places where angle values are selected more than once. You'll have to be precise about what "Poisson-like" behavior means if you wan't something different than that.

An uniform distribution means that each angle has the same probability as any other angle. The angles will then be picked-up at the same "rate". This is not what I need. Some angles must be more probable than others, and the angles should show some "packs", randomly distributed on the whole interval (without having an uniform distribution). Poissonian statistics shows something similar. Look again at the "graphics" I've drawn in my first post.
 
Barnak said:
An uniform distribution means that each angle has the same probability as any other angle. The angles will then be picked-up at the same "rate".

This does not imply that the realizations from a uniform distribution create an even pattern. In fact, for a small number of realizations, it is unlikely that they would.


This is not what I need. Some angles must be more probable than others, and the angles should show some "packs", randomly distributed on the whole interval (without having an uniform distribution). Poissonian statistics shows something similar. Look again at the "graphics" I've drawn in my first post.

The graphics show you have an intuitive concept, not that you understand the Poisson distribution. You haven't managed to define a precise mathematical requirement. It isn't clear from your graphics whether they are supposed to represent a distribution for one realization of a random variable or whether they are supposed to represent a typical sample of 21 independent realizations of the same random variable.

The Poisson distribution is often used as an approximation for the binomial distribution where the probability of "success" is small. If you use a uniform distribution for the angles, the probability that a given angle is realized is 1/180. The probability it is realized k times is n draws is given by the binomial distribution for n trials with probability 1/N of success evaluated at k successes. In what sense, do you think that using a uniform distribution will fail to produce "Poissonian statistics" ? What specific statistics you are talking about?)
 
The distribution I'm looking for will be used for a large number of trials, so the uniform distribution will give an ... uniform distribution of points. I don't want this.

The angular distribution will be used to define points on a ring. I don't want the points to be uniformly distributed on the ring. I need the points to form "packs" here and there. The packs themselves should be random. Again, an uniform distribution can't do this, on a large set of points.
 
Then it isn't clear to me why you don't simply make up a "clumpy" distribution of angles and use it. Your requirement is too vague to imply a specific method.
 
Isn't "Perlin noise" what I'm looking for ? I don't know how to define the Perlin noise with Mathematica, though.
 
Bacle, you need to provide some concise constraints for your distribution.

Maybe what you should do is use a statistical package like R and create a custom distribution by supplying some kind of transformation. One method you could do is to create a function that takes the input of a uniform random number generator and uses that to create your custom distribution. Since you have a finite number of possibilities, you just map one finite interval from your uniform input to another finite interval in your custom distribution.

The above should take you probably 10 to 20 minutes at the most, and then you can do all kinds of statistical analysis based on this custom distribution.
 
chiro said:
Bacle, you need to provide some concise constraints for your distribution.

Maybe what you should do is use a statistical package like R and create a custom distribution by supplying some kind of transformation. One method you could do is to create a function that takes the input of a uniform random number generator and uses that to create your custom distribution. Since you have a finite number of possibilities, you just map one finite interval from your uniform input to another finite interval in your custom distribution.

The above should take you probably 10 to 20 minutes at the most, and then you can do all kinds of statistical analysis based on this custom distribution.

I don't understand your suggestion.

I don't have any constraint on my distribution, except that it's almost uniform, with random packs of "concentration" here and there. I need the points on the circle to feel "natural", i.e. randomly distributed without giving the impression of an uniform distribution if there's a large number of points.

I can define the "packets" on the circle by hand, but it won't feel very "natural".

I have the impression that "Perlin noise" is the solution, but I know nothing about this.
 
Last edited: