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

# Questions tagged [random]

1726 questions

**189**

votes

**25**answers

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

This morning, I wanted to flip a coin to make a decision but only had an SD card:
Given that I don't know the bias of this SD card, would flipping it be considered a "fair toss"?
I thought if I'm just as likely to assign an outcome to one side as…

Andrew Cheong

- 2,335
- 2
- 17
- 23

**85**

votes

**16**answers

### What's the difference between stochastic and random?

What's the difference between stochastic and random?

Red Banana

- 22,266
- 17
- 83
- 172

**79**

votes

**3**answers

### Mathematicians shocked(?) to find pattern in prime numbers

There is an interesting recent article "Mathematicians shocked to find pattern in "random" prime numbers" in New Scientist. (Don't you love math titles in the popular press? Compare to the source paper's Unexpected Biases in the Distribution of…

Tito Piezas III

- 47,981
- 5
- 96
- 237

**57**

votes

**5**answers

### 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 the sphere?
Since I'm unable to answer my own…

MHK

- 573
- 1
- 5
- 5

**47**

votes

**5**answers

### 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't know how can I pick a random point on a surface…

hyperknot

- 825
- 1
- 7
- 11

**40**

votes

**3**answers

### Why does this not seem to be random?

I was running a procedure to be like one of those games were people try to guess a number between 1 and 100 where there are 100 people guessing.I then averaged how many different guesses there are.
from random import randint
def averager(times):
…

David Greydanus

- 648
- 6
- 19

**37**

votes

**3**answers

### 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 element may be picked more than once, but counted…

Howard

- 473
- 4
- 6

**36**

votes

**10**answers

### How to mentally flip a coin?

If you've ever played rock-paper-scissors, and you are reading this on math.stackexchange, you probably know that always playing $1$ of the $3$ choices at random (more precisely: uniformly at random and independently of previous choices) guarantees…

Anonymous

- 5,656
- 4
- 16
- 44

**36**

votes

**7**answers

### Method of generating random numbers that sum to 100 - is this truly random?

I am writing a computer program that involves generating 4 random numbers, a, b, c, and d, the sum of which should equal 100.
Here is the method I first came up with to achieve that goal, in pseudocode:
Generate a random number out of 100. (Let's…

ajq88

- 363
- 1
- 3
- 7

**35**

votes

**7**answers

### 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 clear but rather broad question that might be…

al-Hwarizmi

- 3,746
- 1
- 15
- 35

**32**

votes

**8**answers

### 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 direction within that cone. I would also like to support…

Trillian

- 571
- 1
- 5
- 11

**31**

votes

**15**answers

### Why is the roll of a die considered random?

I've been reading articles on pseudo-randomness in computing when generating a random value. They all state that the generated numbers are pseudo-random because we know all the factors that influence the outcome, and that the roll of a die is…

Max Koretskyi

- 721
- 1
- 8
- 21

**31**

votes

**4**answers

### uniform random point in triangle in 3D

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 convex combination of the vertices:
$P = (1 -…

dsg

- 1,301
- 2
- 10
- 20

**30**

votes

**8**answers

### Is there a *simple* example showing that uncorrelated random variables need not be independent?

Is there a simple example showing that given $X,Y$ uncorrelated
(covariance is zero), $X,Y$ are not independent?
I have looked up two references, however, I am dissatisfied with both.
In Reference $1$, $X,Y$ are assumed to be independent…

Olórin

- 5,156
- 1
- 32
- 62

**27**

votes

**4**answers

### Markov process vs. markov chain vs. random process vs. stochastic process vs. collection of random variables

I'm trying to understand each of the above terms, and I'm having a lot of trouble deciphering the difference between them.
According to Wikipeda:
A Markov chain is a memoryless, random process.
A Markov process is a stochastic process, which…

DilithiumMatrix

- 746
- 1
- 8
- 19