Questions tagged [random]

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

Filter by
Sorted by
Tagged with
54
votes
5answers
39k 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 ...
17
votes
2answers
18k views

Summing (0,1) uniform random variables up to 1 [duplicate]

Possible Duplicate: choose a random number between 0 and 1 and record its value. and keep doing it until the sum of the numbers exceeds 1. how many tries? So I'm reading a book about simulation, ...
45
votes
5answers
16k 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'...
17
votes
3answers
9k views

Average norm of a N-dimensional vector given by a normal distribution

I'm interested in knowing what is the expected value of the norm of a vector obtained from a gaussian distribution in function of the number of dimensions $N$ and $\sigma$, i.e: $$E[\|x\|_2],\quad x\...
10
votes
3answers
3k 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 ...
9
votes
1answer
6k 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.
31
votes
7answers
19k 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 ...
78
votes
3answers
4k views

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 ...
8
votes
2answers
2k views

Probability that a sequence repeats itself

Given an infinite sequence $a_n$ of uniformly random integers $0$ to $9$, what is the probability there exist an integer $m$ such that the sequence $a_1$ to $a_m$ is equal to that from $a_{m+1}$ to $...
2
votes
2answers
250 views

Is getting a random integer even possible?

On googling I got Random numbers are numbers that occur in a sequence such that two conditions are met: (1) the values are uniformly distributed over a defined interval or set, and (2) it is ...
71
votes
15answers
41k views

What's the difference between stochastic and random?

What's the difference between stochastic and random?
23
votes
4answers
18k 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 ...
16
votes
2answers
7k 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. ...
5
votes
3answers
1k views

What's the chance of an explicit series of integers in a limited random distribution?

Say I collect 40 perfectly random integers between 1 and 400. What's the chance that any integer is repeated consecutively six times in such a random draw? What I'm looking for is the chance of ...
185
votes
25answers
16k 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 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 ...
34
votes
7answers
8k 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 ...
22
votes
8answers
4k views

3 random numbers to describe point on a sphere [duplicate]

I'm currently working on a problem involving computer graphics and got into a discussion about whatever or not constructing a 3d vector out of 3 random points uniformly distributed points between -1 ...
7
votes
2answers
3k views

The parking problem riddle

Assume a street of 300 meters, that you can park your car alongside the pavement. Assume that there is a big parking problem in the area. Assume that the pavement is continuous, without interruptions, ...
13
votes
4answers
919 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 ...
16
votes
6answers
17k views

Choosing two random numbers in $(0,1)$ what is the probability that sum of them is more than $1$?

Choosing two random numbers in $(0,1)$ what is the probability that sum of them is more than $1$? Also what is probability of sum of them being less than $1$? I think the answer should be $\frac{1}{...
6
votes
2answers
842 views

Does an infinite random sequence contain all finite sequences?

If we have a finite alphabet, with each letter having a non-zero probability of being selected, will an infinite sequence of letters selected from that alphabet contain all finite sequences of letters ...
29
votes
8answers
5k views

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 ...
23
votes
9answers
17k views

Is it possible to generate truly random numbers using a computer? [closed]

I know that there are many algorithms to generate pseudorandom numbers but is it possible to generate truly random numbers using a computer program?
12
votes
2answers
543 views

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)$ ...
6
votes
3answers
2k views

Algorithm to generate an uniform distribution of points in the volume of an hypersphere/on the surface of an hypersphere.

I am searching two simple/efficient/generic algorithms to generate a uniform distribution of random points: in the volume of a n-dimensional hypersphere on the surface of a n-dimensional hypersphere ...
1
vote
1answer
355 views

How to code oscillator driven by Gaussian white noise? Edit: How to convert ODE to a system of SDE's?

I have written some python code which was designed to try to solve the following differential equation: $$\ddot{x}+\omega_0^2x=\eta(t),$$ where $\eta(t)$ is the gaussian white noise, with mean 0 and ...
8
votes
1answer
1k views

Distribution of a random real with i.i.d. Bernoulli(p) binary digits?

Let $X_1, X_2, X_3, \ldots$ be an infinite sequence of i.i.d. Bernoulli($p$) random variables, and define the random real number $X = (0.X_1X_2X_3\ldots)_2$. Question(s): What can be proved about ...
10
votes
1answer
2k views

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 ...
8
votes
2answers
1k views

Accessible Intro to Random Matrix Theory (RMT)

I read this fascinating article: http://www.newscientist.com/article/mg20627550.200-enter-the-matrix-the-deep-law-that-shapes-our-reality.html Unfortunately all the other papers I find googling are ...
2
votes
2answers
462 views

How to calculate the exact probability that the second player wins?

Consider a game that uses a generator which produces independent random integers between 1 and 100 inclusive. The game starts with a sum S = 0. The first player adds random numbers from the generator ...
8
votes
2answers
9k views

Probability of Random number repeating

In the situation of having a high entropy random number generator, that generates numbers in the range of 0 and 2,147,000,000. If i have a list of 1,000,000 integer values, what are the chances that ...
7
votes
3answers
25k views

Repeating something with (1/n)th chance of success n times

Is there anything that can be said about how many attempts it will take to correctly guess a random number out of 1000 numbers? If the number wouldn't change the probability would just increase every ...
4
votes
2answers
1k views

Probability a product of $n$ randomly chosen numbers from 1-9 is divisible by 10.

I'm working on a problem where each number is chosen randomly from 1-9. Given $n$ numbers chosen in this manner, we multiply all of these together. I'm looking for the probability that this product is ...
3
votes
2answers
584 views

Variance of sample mean (problems with proof)

Assuming that I have $\{x_1,\ldots, x_N\}$ - an iid (independent identically distributed) sample size $N$ of observations of random variable $\xi$ with unknown mean $m_1$, variance (second central ...
5
votes
2answers
3k views

Connection to Normal distribution

I've been working on finding the probability for the event, that the sum of $n$ independent random variables are less than $s$, when they are evenly distributed on $[0,1)$. I've used the law of total ...
3
votes
1answer
90 views

[Probability]need help to understand the following expression

So assume $Y$ and $X$ are exponentially distributed with parameters $y_1$, and $x_1$ respecitively. assume c is a constant. I am having huge trouble to understand the integration of the following ...
0
votes
2answers
59 views

Finding derivative of this integral function.

I need help on finding the derivative of this: $$g(x) = \int_1^{x^2} (x-t)\sin^2(t)dt$$ I thought about taking out x and having it as a constant but how?
25
votes
2answers
30k views

Difference between logarithm of an expectation value and expectation value of a logarithm

Assuming I have a always positive random variable $X$, $X \in \mathbb{R}$, $X > 0$. Then I am now interested in the difference between the following two expectation values: $E \left[ \ln X \right]...
33
votes
10answers
2k views

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 ...
27
votes
4answers
14k views

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 ...
41
votes
3answers
6k views

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. <...
32
votes
7answers
26k views

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 ...
10
votes
2answers
5k 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 ...
4
votes
2answers
231 views

What is the probability that $THTH$ occurs before $HTHH$ in an infinite sequence of coin flips? [duplicate]

What is the probability that $THTH$ occurs before $HTHH$ in an infinite sequence of coin flips? The expected number of flips until you first see $THTH$ is $6$, while the expected number until you ...
36
votes
3answers
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 ...
15
votes
4answers
16k views

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 ...
11
votes
3answers
3k views

what's the difference between RDE and SDE?

what's the difference between random differential equation and stochastic differential equation? does stochastic differential equations include random differential equation?
6
votes
4answers
662 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 ...
16
votes
1answer
765 views

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 ...
7
votes
1answer
276 views

Mentally generating a (pseudo)random {0,1}-sequence with uniform distribution

I want to learn of good ways by which to generate $\{0,1 \}$-sequences in my head which are (pseudo)random with uniform distribution, so that I may simulate flipping a fair two-sided, standard coin. I ...