# Tagged Questions

Questions relating to (pseudo)randomness, random oracles, and stochastic processes.

14k views

### Picking random points in the volume of sphere with uniform probability

I have a sphere of radius $R_{s}$, and I would like to pick random points in its volume with uniform probability. How can I do so while preventing any sort of clustering around poles or the center of ...
2k views

### The pseudoness of pseudorandom number generators

Is there a reasonable statistic test one can do to standard random number generators (say, one of those that come built in in Python libs) which shows they are not really random? (By reasonable I ...
6k views

### How to find a random axis or unit vector in 3D?

I would like to generate a random axis or unit vector in 3D. In 2D it would be easy, I could just pick an angle between 0 and 2*Pi and use the unit vector pointing in that direction. But in 3D I don'...
3k views

### Choose a random number between 0 and 1 and record its value. Keep doing it until the sum of the numbers exceeds 1. How many tries do we have to do?

Choose a random number between 0 and 1 and record its value. Do this again and add the second number to the first number. Keep doing this until the sum of the numbers exceeds 1. What's the expected ...
7k views

### Generate a random direction within a cone

I have a normalized $3D$ vector giving a direction and an angle that forms a cone around it, something like this: I'd like to generate a random, uniformly distributed normalized vector for a ...
4k views

### How can I pick a random point on the surface of a sphere with equal distribution?

I've got a random number generator that yields values between 0 and 1, and I'd like to use it to select a random point on the surface of a sphere where all points on the sphere are equally likely. ...
950 views

### Are squares of independent random variables independent?

If X and Y are independent random variables both with the same mean (0) and variance, how about $X^2$ and $Y^2$? I tried calculating E($X^2Y^2$)-E($X^2$)E($Y^2$) but haven't been able to get anywhere.
12k views

### Can a coin with an unknown bias be treated as fair?

This morning, I wanted to flip a coin to make a decision but no coins were in reach. There was however an SD card on my desk: Given that I don't know the bias of this SD card, would flipping it be ...
3k views

### Are primes randomly distributed?

There is a famous citation that says "It is evident that the primes are randomly distributed but, unfortunately, we don't know what 'random' means." R. C. Vaughan (February 1990) I have this very ...
639 views

### How to efficiently generate five numbers that add to one?

I have access to a random number generator that generates numbers from 0 to 1. Using this, I want to find five random numbers that add up to 1. How can I do this using the smallest number of steps ...
883 views

5k views

### uniform random point in triangle

Suppose you have an arbitrary triangle with vertices $A$, $B$, and $C$. This paper (section 4.2) says that you can generate a random point, $P$, uniformly from within triangle $ABC$ by the following ...
6k views

### Making 400k random choices from 400k samples seems to always end up with 63% distinct choices, why?

I have a very simple simulation program, the sequence is: Create an array of 400k elements Use a PRNG to pick an index, and mark the element (repeat 400k times) Count number of marked elements. An ...
339 views

### What is in clear mathematical terms the definition for a sequence of integers, to be called *random*?

Sequences of integers might be ordered, totally ordered,... For all such attributes we find definitions in clear mathematical terms. (1) But what is in clear mathematical terms the established and ...
1k views

### Apparent Paradox in the Idea of Random Numbers

This question is a bit less than rigorous, but it's only because I don't know how to formulate it rigorously. Suppose there was some machine, or function, or whatever that could output a random ...
2k views

### Pseudo Random Number Generation on the GPU

Idea For a Path Tracing application I need to generate good quality pseudo random numbers in the closed range [0~1]. Because I'm doing this on the GPU (HLSL Shader Model 5) I can only use 32bit ...