# Random angles on the interval [0, 2Pi]

1. Sep 28, 2011

### Barnak

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 (Text):

|       | |                               |   |                   |
| |       | | |     | |     |     |       | | | |   | |   |     | | |     |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
0                                                                            2Pi

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

Any idea how to do this with Mathematica ?

2. Sep 28, 2011

### Stephen Tashi

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.

3. Sep 28, 2011

### Barnak

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.

4. Sep 28, 2011

### Stephen Tashi

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.

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?)

5. Sep 28, 2011

### Barnak

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.

6. Sep 28, 2011

### Stephen Tashi

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.

7. Sep 28, 2011

### Barnak

Isn't "Perlin noise" what I'm looking for ? I don't know how to define the Perlin noise with Mathematica, though.

8. Sep 29, 2011

### chiro

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.

9. Sep 29, 2011