# Questions tagged [uniform]

The uniform distribution describes a random variable that is equally likely to take any value in its sample space.

594 questions
Filter by
Sorted by
Tagged with
59k views

Recently, I have found in a paper by Klammer, et al. a statement that p-values should be uniformly distributed. I believe the authors, but cannot understand why it is so. Klammer, A. A., Park, C. Y.,...
8k views

### Consider the sum of $n$ uniform distributions on $[0,1]$, or $Z_n$. Why does the cusp in the PDF of $Z_n$ disappear for $n \geq 3$?

I've been wondering about this one for a while; I find it a little weird how abruptly it happens. Basically, why do we need just three uniforms for $Z_n$ to smooth out like it does? And why does the ...
4k views

### Fake uniform random numbers: More evenly distributed than true uniform data

I'm looking for a way to generate random numbers that appear to be uniform distributed -- and every test will show them to be uniform -- except that they are more evenly distributed than true uniform ...
46k views

### Why is Entropy maximised when the probability distribution is uniform?

I know that entropy is the measure of randomness of a process/variable and it can be defined as follows. for a random variable $X \in$ set $A$ :- $H(X)= \sum_{x_i \in A} -p(x_i) \log (p(x_i))$. In ...
8k views

### Why is generating 8 random bits uniform on (0, 255)?

I am generating 8 random bits (either a 0 or a 1) and concatenating them together to form an 8-bit number. A simple Python simulation yields a uniform distribution on the discrete set [0, 255]. I am ...
12k views

### Is there an explanation for why there are so many natural phenomena that follow normal distribution?

I think this is a fascinating topic and I do not fully understand it. What law of physics makes so that so many natural phenomena have normal distribution? It would seem more intuitive that they would ...
4k views

### Brain-teaser: What is the expected length of an iid sequence that is monotonically increasing when drawn from a uniform [0,1] distribution?

This is an interview question for a quantitative analyst position, reported here. Suppose we are drawing from a uniform $[0,1]$ distribution and the draws are iid, what is the expected length of a ...
6k views

### Is there a plateau-shaped distribution?

I am looking for a distribution where the probability density decreases quickly after some point away from the mean, or in my own words a "plateau-shaped distribution". Something in between the ...
27k views

### Are there default functions for discrete uniform distributions in R?

Most standard distributions in R have a family of commands - pdf/pmf, cdf/cmf, quantile, random deviates (for example- dnorm, pnorm, qnorm, rnorm). I know it's easy enough to make use of some ...
1k views

### R: Problem with runif: generated number repeats (more often than expected) after less than 100 000 steps

After executing the code RNGkind(kind="Mersenne-Twister") # the default anyway set.seed(123) n = 10^5 x = runif(n) print(x[22662] == x[97974]) ...
7k views

### How can I test the fairness of a d20?

How can I test the fairness of a twenty sided die (d20)? Obviously I would be comparing the distribution of values against a uniform distribution. I vaguely remember using a Chi-square test in ...
22k views

### How does one measure the non-uniformity of a distribution?

I'm trying to come up with a metric for measuring non-uniformity of a distribution for an experiment I'm running. I have a random variable that should be uniformly distributed in most cases, and I'd ...
27k views

### From uniform distribution to exponential distribution and vice-versa

This is probably a trivial question, but my search has been fruitless so far, including this wikipedia article, and the "Compendium of Distributions" document. If $X$ has a uniform distribution, does ...
4k views

### Are differences between uniformly distributed numbers uniformly distributed?

We roll a 6-sided die a large number of times. Calculating the difference (absolute value) between a roll and its preceding roll, are the differences expected to be uniformly distributed? To ...
2k views

### Distribution of the largest fragment of a broken stick (spacings)

Let a stick of length 1 be broken in $k+1$ fragments uniformly at random. What is the distribution of the length of the longest fragment? More formally, let $(U_1, \ldots U_k)$ be IID $U(0,1)$, and ...
4k views

### Why is the mean of the natural log of a uniform distribution (between 0 and 1) different from the natural log of 0.5?

For a uniformly distributed variable between 0 and 1 generated using rand(1,10000) this returns 10,000 random numbers between 0 and 1. If you take the mean, it ...
5k views

3k views

### Why is the sum of probabilities in a continuous uniform distribution not infinity?

The probability density function of a uniform distribution (continuous) is shown above. The area under the curve is 1 - which makes sense since the sum of all the probabilities in a probability ...
If I were to define the coordinates $(X_{1},Y_{1})$ and $(X_{2},Y_{2})$ where $$X_{1},X_{2} \sim \text{Unif}(0,30)\text{ and }Y_{1},Y_{2} \sim \text{Unif}(0,40).$$ How would I find the expected ...