# Questions tagged [random]

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

1,716 questions
Filter by
Sorted by
Tagged with
24 views

### Smooth / replace random system from lootbox reward in game

I am creating a game and dislike the usual random system of reward a lot. Id like to drop a specific item with a chance of 1%. The usual methode would be to call a random function 0-100 and check if 1 ...
1 vote
25 views

### Combinatorial identity in deriving expected absolute sum of Rademacher RV

I was studying on getting the bound for the expectation of absolute sum of Rademacher RV. Please refer the following link. https://mathworld.wolfram.com/RandomWalk1-Dimensional.html. I encountered the ...
684 views

### If someone wins 3000 rounds of a game out of 100000 numbered rounds of a game, what is the expected no. of last-3-digits of a round that they solved?

I participate in r/picturegame on Reddit. Each round is numbered from Round 0 (1 actually, but let's say it was 0) up to Round 111400 at the moment. Suppose the top player of this game had won 3000 ...
25 views

### How do I normalize a vector such that the sum of its squared elements is some arbitrary c?

I am trying to generate points (vectors) from the $L^2$ unit norm hypersphere uniformly at random. This post says to: Generate a random Gaussian $d$-dimensional vector $v$. Generate a random uniform ...
28 views

### Generate random number from $\log(f(x))$ rather than $f(x)$

There are many tricks to be played when generating random numbers from a given distribution with density $f(x)$, ususally cases where you can perform an inverse transform of the primitive analytically,...
27 views

### What is $\mathbb{E} \bigg\lvert \int f(x)\Pi(dx)\bigg\rvert^2$ for a random measure $\Pi$?

As mentioned in this wiki page we know that $$\mathbb{E}\int f(x)\Pi(dx)=\int f(x)\mathbb{E}\Pi(dx)=\int f(x)\nu(dx),$$ where $f$ is any measurable function and $\Pi$ is a random measure with ...
11 views

### How to test a particular test in dieharder

I have 2 questions while run the Dieharder test. What is the command to run dieharder test for particular test package. I tried the command \textit{dieharder -f filename.txt -a} . This command ...
11 views

### The degree of a vertex in the grapf of a erdos graph

I have the following question: Consider a random graph on nvertices, where between any two vertices there is an edge with probability p = c/n, (alternatively, no edge with probability 1-p) all edges ...
1 vote
39 views

### Rarity ratio for an object

I'm not sure of the terms, but let me explain the problem with a simple example. Suppose there is a certain set of parameters for random generation of an object, in this case a colored geometric ...
17 views

### How unique is this generated key?

I am building a small app. I want to generate a random and unique key for each user. If this thing takes off, I might have millions of users! [Coincidentally, this happening is about 1 chance in many ...
25 views

### 3 color ball problem

I have essentially infinite number of balls, ⅓ each of 3 colors. How many must I blindly draw to be 95% confident I have 1 or each color? I think the answer is 11, but I'd like the equation.
56 views

### Probability statement of a 16-bit random number generator.

I am trying to understand the actual implications for the following statement regarding a 16-bit random number generator for the tag from the EPC Generation 2, UHF RFID specification, section 6.3.2.7. ...
18 views

### Probability density function invariant under unitary transformation

Recently I have been studying Mehta's book on Random Matrices (3rd edition). In this book the author defines the Gaussian Unitary Ensemble in the set of hermitian matrices with 2 specific properties. ...
32 views

### Generating random numbers in MATLAB

Edit: The code is edited and new result is pasted. I am trying to generate random numbers using randi command in MATLAB. I am generating 100, 1000 and 100,000 random numbers, respectively, between 50 ...
38 views

### What is the probability of your next choice that make your choices uniformly distributed

Given an #n of balls. you are only allowed to pick between two balls at a time with a probability $P_{i}=0.5$ with i being the number of the ball. For example: you're presented with a black ball and a ...
67 views

### How to prove that the sum of two random high dimensional vectors is close to $\sqrt2$?

We've noticed a detail in our program that we don't directly know how to prove. Take two 'random' vectors x and y with a large dimension d. Both vectors are created by generating d random numbers ...
25 views

### How to distribute $N$ items into $M$ groups the "most" random way?

There are $N$ "items" $s_1, s_2, ..., s_N$ and $M$ "buckets" with capacities $c_1, c_2, ..., c_M$ such that $\sum_{j=1}^{M}c_j = N$. In a document I'm reading (some industry ...
36 views

### Given all permutations of N-digits, what is the ratio of random-seeming vs non-random-seeming sequences?

My question is inspired by the comment in this article that the 20 digit sequence 03729563829603547134 seems "more random" than 99999999999999999999. One could use some measure of ...
20 views

### Is there any bias choosing a random number $1\ldots n$ in C as $1+(\mbox{rand}()\%n)$

I need random numbers $1\ldots n$ in a program written in C. The library rand() function returns numbers in the range $0\ldots\mbox{RAND_MAX}$, where $\mbox{RAND_MAX}$ is typically $\sim2^{31}-1$. So ...
26 views

### Expected Value of Distance of Objects moving in Random Motion (Simplified Brownian Motion)

Recently I wrote a problem like this: Chloe starts at the origin. For each step, she moves $1$ unit in a random direction. Let $f(n)$ be the expected value of the her distance from origin after $n$ ...
28 views

### Independence of product of random variables

Suppose I have three independent random variables $X, Y, Z$ that are all exponentially distributed with not necessarily different parameters $\lambda$. How can I show that $X\cdot Y$ and $Z$ are ...
1 vote
44 views

### More "formal" description for an experiment

I have an experiment with $n$ elements. Each one have a different probability $p_i \in [0,1]$ of being chosen (all the probabilities can sum more than 1). Finally, $m$ of these $n$ elements are chosen ...
36 views

### Can someone explain why odd moments vanish for centered, symmetric-about-0 random variables?

(as in the title). I'm particularly interested in whether there's an intuitive way to understand this. I've done a handful of calculations with moments, but the concept is still a bit new to me.
51 views

### Is indistinguishable probabilities still indistinguishable even if randomness is allowed?

We say that a function $f:\mathbb N\to\mathbb R$ is negligible if for all positive integer $k$, there is $N\in\mathbb N$ such that for all $n\geq N$, \begin{equation} |f(n)| < \frac{1}{n^k}\...
93 views

### Randomized algorithm for finding a prime number between $n$ and $2n$

I have already seen some threads conjecturing that there is at least one prime between $n$ and $2n$. I am given an exercise, where I have relaxed this conjecture to the assumption that between $n$ and ...
18 views

### Path Lengths and Random Walk - Generalization of the Uncut Spaghetti Game

The following is a kind of generalization of the interesting Uncut Spaghetti game (https://mathpickle.com/project/uncut-spaghetti-number-patterns/): Consider a 2D integer lattice where each point has ...
19 views

### Calculating Distribution Probability by a certain criteria

Each of 1000 balls is thrown and lands randomly into one of 1000 pots. What is the probability that at least one pot will have 34 or more balls?
1 vote
28 views

23 views

### Does constraint on seed characters limit randomness of Mersenne twister?

I have a code in python3 and as stated in source: Python uses the Mersenne Twister as the core generator. For random.seed() which initializes the generator, I am ...
21 views

### Probability of Choosing Higher Number From 2 sets of N Numbers?

Given two sets of N numbers with equal length, how would I calculate the probability of picking a higher number from the first set than the second set? For example, given the sets {4, 5, 6, 7} and {2,...
76 views

### Picking a special function from the set of random functions

Consider a fixed integer $q$. Consider the set of all functions from $\{0, 1\}^{n+1}$ to $\{0, 1\}^{m}$. Let us pick one function from this set uniformly at random. Now, let's say we want functions $f$...
1 vote
24 views

### What is the probability that a random function has no collisions?

Let $N = 2^{n}$ and $M= 2^{m}$. Consider a random function picked uniformly at random from the set of functions given by $$\{f: \{0, 1\}^{m} \rightarrow\{0,1\}^{n} \}.$$ What is the probability that ...
95 views

### Generating distinct random numbers from uint256 in range

My goal is to generate around 1500 distinct random numbers, from range 8000. I receive (blockchain ChainLink VRF - connected to random oracle, but that's not important): variable array of uint256[] <...
24 views

### Training neural networks | Monte Carlo Methods

Assume that we have a dataset D = {(x_1, y_1), ... , (x_n, y_n)}. We want to train a neural network and update the weights with gradients computed on every mini-batch. If we shuffle our mini-batches ...
21 views

### How to add a random value to a normalized value

Suppose I have a signal (that is not normalized) and some random noise value to add to it (also not normalized). And suppose the proportion to the signal and the noise must be maintained. Both the ...
146 views

### A straw of length 1 is first broken into two pieces uniformly at random...

Question: Consider the following game. A straw of length 1 is first broken into two pieces uniformly at random, so that the length of one piece is uniform random variable on $[0,1]$. Only one of the ...
21 views

### Sampling data from a PDF

Within a given simulation, I'm able to specify properties such as arrival times using a probability density function. However, I'm confused as to how the actual sampling is done from within the ...
28 views

### Stochastic Differential equations for random loads

I was studying the SDE and their numerical implementation. In every SDE, the randomness is accounted for by Brownian motion and the Euler-Maruyama method, and higher-order methods are derived with ...
65 views

### A correct transformation that's wrong

I bumped into the following problem and can't see how I am supposed to calculate divide the intergral into correct areas of definition. The problem is as follows: $X$ and $Y$ are random variables with ...
27 views

### Is a submatrix of a Wishart distributed matrix a Wishart distributed matrix?

I have a Wishart matrix $S$ formed from multiplying a GUE distribuited matrix $X$ with its hermitian conjugate, i.e. $S=X X^\dagger$, with the entries of $X_{ij}\in \mathcal{CN}(\mu=0,\sigma =1)$. If ...
44 views

### Is there any way of generating a random number on the positive integers?

If we first ask the question of choosing a random real number, say in the interval [0, 1], then one could come up with a similar process : in 1/2 second, choose a random digit from 0 to 9 in 1/4 ...
66 views

### Knowing sample's expected value what can we say about the distribution probabilities?

Let's suppose we have a fair coin toss game with two outcomes, each with 50% probability. If I end up with outcome A, I earn 1, for the opposite, I lose 1. The expected value is then 0. Now suppose I ...
1 vote
21 views

### Specify a random process such that $R_Y=3+u, R_Y=-2+u,$ and $R_Y[k]=u$ otherwise.

there is a problem that I should specify a real-valued random process $Y[n]$ such that the autocorrelation function $R_Y[k]$ satisfies R_Y=3+u,\ R_Y=R_Y[-1]=-2+u,\ \text{and}\ R_Y[k]=u, |k|>...
Question (tl;dr) How do we know that even for extremely large numbers like even far past $32^{15}$ (any bigint, or any number really), that as you increment the sequence from $0$ to $n$, $n$ being the ...