Questions tagged [random]

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

1726 questions
16
votes
1 answer

Flaw or no flaw in MS Excel's RNG?

I have a question about my understanding of an article of B.D. McCullough (2008) about Excel's implementation of the Wichmann-Hill random number generator (1982). First, a bit of context The Wichmann-Hill algorithm is given in AS 183 here. As one…
15
votes
2 answers

Does $\pi$ satisfy the law of the iterated logarithm?

It is widely conjectured that $\pi$ is normal in base $2$. But what about the law of the iterated logarithm? Namely, if $x_n$ is the $n$th binary digit of $\pi$, does it seem likely (from computer experiments for example) that the following holds?…
15
votes
5 answers

Sum of independent Binomial random variables with different probabilities

Suppose I have independent random variables $X_i$ which are distributed binomially via $$X_i \sim \mathrm{Bin}(n_i, p_i)$$. Are there relatively simple formulae or at least bounds for the distribution $$S = \sum_i X_i$$ available?
Lagerbaer
  • 3,256
  • 2
  • 22
  • 29
14
votes
0 answers

Random domino tilings: Is this distribution well-defined, and how can it be sampled from?

I'd like to ask questions about a "random domino tiling of the plane". However, it's not quite obvious how to go about precisely specifying what this means. My first instinct was to do something like "the center of a random tiling of a large…
RavenclawPrefect
  • 11,664
  • 2
  • 19
  • 79
13
votes
2 answers

$e$ popping up in topic I'm unfamiliar with

I programmed up a little algorithm that goes like this: Fix two positive, real numbers, call them $\alpha$ and $\beta$. Generate a new, random, real number, $x \in [0,1]$ Set $\alpha$ = $x\alpha\beta$, Repeat 2 and 3 until $\alpha$ is equal to the…
13
votes
4 answers

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 possible? Edit: I do want the numbers to be…
Cisplatin
  • 4,297
  • 7
  • 31
  • 54
13
votes
3 answers

Generation of unimodular matrices with bounded elements

Does anybody know what is the algorithm for generating random unimodular matrices (integer matrices with determinant $\pm 1$) whose elements do not exceed a given bound? Such an algorithm is mentioned here, and the following reference is provided:…
user67833
  • 131
  • 3
13
votes
1 answer

Fitting a parabola to separate two classes of points in the plane

Suppose we have a set of points $(x,y)$ in the plane where each point is either boy or a girl. Does there exists a randomized linear-time algorithm to determine if we can fit a parabola (given by a polynomial $ax^2+bx+c$) that separates the boys…
kenny
  • 135
  • 5
12
votes
2 answers

Random 3D points uniformly distributed on an ellipse shaped window of a sphere

How can I generate random points uniformly distributed on the surface of a sphere such that a line that originates at the center of the sphere, and passes through one of the points, will intersect a plane within a circle. Following are more…
12.yakir
  • 221
  • 1
  • 5
12
votes
3 answers

Understanding Sobol sequences

Can someone explain to me in simple terms, how Sobol sequences work? The wikipedia article is fairly technical. They look pretty interesting. So I shall describe (whatever little I know) in short the results to someone who is not aware of what Sobol…
12
votes
1 answer

Expectation number of cycles in a Erdős–Rényi random directed graph $G(n,p)$

Let $G \sim G(n,p)$ be a directed Erdős–Rényi random graph with $n$ vertices and the probability $p$ that there is a directed edge between any two ordered pairs of vertices. What is the expected number of cycles in $G$? Is there an exact formula…
Anders
  • 121
  • 1
  • 3
12
votes
4 answers

Are irrational numbers completely random?

As far as I know the decimal numbers in any irrational appear randomly showing no pattern. Hence it may not be possible to predict the $n^{th}$ decimal point without any calculations. So I was wondering if there is a chance that somewhere down the…
12
votes
2 answers

Will the energy of a randomly driven harmonic oscillator grow to infinity or oscillate about a finite value?

The equation of motion for an undamped harmonic oscillator, with driver $f=f(t)$ is given by: $$\ddot{x}+x=f.$$ Let the initial conditions be given by: $$x(0)=\dot{x}(0)=0.$$ If $f=\cos(t)$ then the solution is: …
Peanutlex
  • 809
  • 4
  • 11
11
votes
2 answers

How can I randomly generate trees?

I want to randomly generate trees, i.e. undirected acyclic graphs with a single root, making sure that all possible trees with a fixed number of nodes n are equally likely.
Juan A. Navarro
  • 302
  • 3
  • 11
11
votes
3 answers

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 mean to exclude silly things like «generate a looong…
Mariano Suárez-Álvarez
  • 126,294
  • 9
  • 223
  • 348