Given some random number function rand, and some numbers $x$ and $y$, how do you find a random number $r$ such that $r\geq x \wedge r \leq y$? Previously i’ve tried (and somewhat failed) with formulas like $$ r = \text{rand()}\bmod \frac{x}{y} $$ or $$ r = \text{rand()}\bmod x + 1 $$ or, given that […]

(Somewhat inspired by this website, particularly Section III. Also, I might be using a different definition of entropy than usual; what I am using is closest to the physics definition (the one I encountered first) of the amount of disorder in a system.) Consider the following two “random” 256-bit strings: 1110001011010010101000001111001100001100011111000111011011101000000000000001111110010110010100011101010010111110000010010101001001101100111110011000000110111111000111101111000011010100001001100010010010011000000011101110000000110001101100000110111001100011 …created via RNG, and: […]

Imagine we have two fixed values $a,b \in \mathbb{Z}_p$ and a uniformly random value $r\leftarrow \mathbb{Z}_p$, for large prime number $p$. Question: Is $v=a+b\cdot r$ an uniformly random value in $\mathbb{Z}_p$?

With “random number” I mean an independent uniformly distributed random number. One Picking one random number is easy: When I pick a random number from $x$ to $y$, the average value is $(x+y)/2$. Two I’m no maths expert, nevertheless I was able to work out a solution for whole numbers: When I pick the highest […]

I’m in process of learning ‘gap test’ for random numbers in discrete event system simulation. I happened to have the fourth edition of this book by Jerry Banks. Unfortunately , this edition doesn’t have any info about this test. I’m trying to learn more of it from the net but details are very scarce. So, […]

The von Mises-Fisher distribution is a probability distribution on the ($p-1$)-sphere. I’m interested in the efficient generation of this distribution for a relatively high dimension ($1000$ or greater) for application in a search step in a meta-heuristic. ¿Is there a numerical algorithm to efficiently generate such a distribution? I’ll be sampling a lot of vectors, […]

My Question For continuous random variables / continuous distributions, it is defined that the probability of any point has probability $0$. The most common proof for this is as follows: $$\Pr(X=a)=\Pr(a\leq X\leq a) = \int_a^af(x) \, dx=0$$ I am looking for a proof other than this. Below I included the definition of a continuous distribution […]

Let: $$R_{n+1} = (mR_n + b) \bmod{a} $$ Assume we know the values of $R_1, R_2, \ldots, R_L $. What is the minimum value of $L$ (if it exists) such that we can determine $R_0, m, b$ and $a$?

Say I have a 3-ball with radius $R$. If I randomly pick 2 points from the inside of the ball, the probability that the euclidean distance between the points (labeled 1 and 2) takes on a particular value $r = r_{12} = r_{21}$ is given by the probability density function (PDF) \begin{equation} P_3 (r) = […]

$N+M$ people play a game of balls. Initially, N people hold N green balls (each person holds a ball), and M people hold no balls. Assume $M<N$. Then, M red balls are divided randomly – each ball is given to a person selected at random from among all M+N people. Whenever a person that accepts […]

Intereting Posts

Quaternions as roots
Finding a combinatorial proof of this identity: $n!=\sum_{i=0}^n \binom{n}{n-i}D_i$
nondimensionalization of predator-prey model
How to find a smallest group generator
Question about solving absolute values.
Conformal mapping between regions symmetric across the real line
Is this a correct way to prove by induction?
Compute $\mathrm{Tor}_{n}^{\mathbb{Z}_{8}}(\mathbb{Z}_{4},\mathbb{Z}_{4})$
Finding the kernel of a linear map
Is there an accepted symbol for irrational numbers?
Rudin Theorem 3.27
Physics: Uniform Motion
Is there a lower-bound version of the triangle inequality for more than two terms?
How do I explain 2 to the power of zero equals 1 to a child
What is the topological dimension of the Peano curve?