Articles of random

Easy way to generate random numbers?

How random this numbers look, 21081461046286104621816 Here the system I used to get them, first pick the seed, 13128 then add the value of the 2nd number to the 1st and write it between them and the 3rd to 2nd and write it between them and etc. 143213218 and repeat again 2nd to 1st etc. […]

Are there any random variables so that E and E exist but E doesn't?

Are there any random variables so that E[X] and E[Y] exist but E[XY] doesn’t?

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 moment) $m_{c_2}$ and second raw moment $m_2$. I try to use sample mean $\overline{x}=\frac{1}{N}\sum_{i=1}^Nx_i$ as an estimator of the true mean. So I want to find its’ […]

Probability of picked cards to be smaller than the largest picked card

I have an assignment for my algorithms module that requires us, amongst other things, to find the equations for the following question. Edit – Question Updated You have n cards with pairwise different integer values from 1 to n , shuffled randomly on a pile. You pick cards from the pile, one after another, and […]

Generate a number with a die that has three 0s and three 1s

Let’s say I have a regular fair die, but instead of digits 1 through 6, there are three 0s and three 1s. I can generate a random $n$-digit binary number as follows: if initially I roll a zero (or a series of them), I ignore them; then what is left to do is just roll […]

Simple algorithm for generating Poisson distribution

I found a very simple algorithm that draws values from a Poisson distribution from this project. The algorithm’s code in Java is: public final int poisson(double a) { double limit = Math.exp(-a), prod = nextDouble(); int n; for (n = 0; prod >= limit; n++) prod *= nextDouble(); return n; } nextDouble() is a function […]

nonlinear transform of Gaussian random variable that preserves Gaussianity

I recently know that following results. suppose that $x_1, x_2, x_3$ are independent real Gaussian random variables with $\mathcal{N}(0, 1)$. Then $$ \frac{x_1 + x_2 x_3}{\sqrt{1+x_3^2}} \sim \mathcal{N}(0, 1) $$ We can prove this result by direct computing. But I am wondering if there is a simpler way. Also, since this result is interesting. I […]

Looking for strictly increasing integer sequences whose gaps between consecutive elements are “pseudorandom”

I am doing some tests with strictly increasing integer sequences whose gaps between consecutive elements show a “pseudorandom” behavior, meaning “pseudorandom” that the gaps do not grow up continuously, but they change from a bigger value to a smaller one and vice versa due to the properties of the sequence without an easy way of […]

What is the mathematical notation for a random number in a certain range?

In school, I was taught to denote a random variable like so: $$R=\{_{0}^{1}$$ This only goes for a random choice between two integers, like a coin flip. How do I write a variable that is equal to a random integer in a certain range, such as, $5$ to $10$?

How to efficiently generate a set uniformly distributed numbers that add to $n$.

I am in need of a more generalized solution to this problem. I have a random number generator that generates numbers from 0 to 1. Using this, I want to find $r$ numbers that add to $n$. How do I do this efficiently, and such that the numbers are uniformly distributed? For my specific case, […]