Questions tagged [uniform]

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

Filter by
Sorted by
Tagged with
48
votes
3answers
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 ...
122
votes
6answers
57k views

Why are p-values uniformly distributed under the null hypothesis?

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.,...
16
votes
2answers
9k views

Simulating draws from a Uniform Distribution using draws from a Normal Distribution

I recently purchased a data science interview resource in which one of the probability questions was as follows: Given draws from a normal distribution with known parameters, how can you simulate ...
28
votes
6answers
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 ...
17
votes
1answer
1k views

Non-uniform distribution of p-values when simulating binomial tests under the null hypothesis

I heard that under the null hypothesis the p-value distribution should be uniform. However, simulations of binomial test in MATLAB return very different-from-uniform distributions with mean larger ...
15
votes
1answer
3k views

Advantages of Box-Muller over inverse CDF method for simulating Normal distribution?

In order to simulate a normal distribution from a set of uniform variables, there are several techniques: The Box-Muller algorithm, in which one samples two independent uniform variates on $(0,1)$ ...
4
votes
1answer
1k views

Sufficient statistics for Uniform $(-\theta,\theta)$

So, I know that $\max(-X_{(1)},X_{(n)})$ is a sufficient statistic for the parameter $\theta$. But can I also say that $(X_{(1)},X_{(n)})$ are jointly sufficient for the parameter $\theta$ ? In other ...
18
votes
2answers
19k views

Why is the CDF of a sample uniformly distributed

I read here that given a sample $ X_1,X_2,...,X_n $ from a continuous distribution with cdf $ F_X $, the sample corresponding to $ U_i = F_X(X_i) $ follows a standard uniform distribution. I have ...
28
votes
4answers
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 ...
15
votes
2answers
4k views

Generate three correlated uniformly-distributed random variables

Suppose we have $$X_1 \sim \textrm{unif}(n,0,1),$$ $$X_2 \sim \textrm{unif}(n,0,1),$$ where $\textrm{unif}(n,0,1)$ is uniform random sample of size n, and $$Y=X_1,$$ $$Z = 0.4 X_1 + \sqrt{1 - 0.4}...
33
votes
5answers
11k 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 ...
5
votes
1answer
2k views

If ϵ is uniformly distributed, then a linear probability model is appropriate? Can I find any Literature?

A latent variable model involving a binomial observed variable $Y$ can be constructed such that $Y$ is related to the latent variable $Y^*$ via $ Y = \begin{cases} 0, & \mbox{if }Y^*...
30
votes
8answers
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 ...
15
votes
3answers
16k views

Generate pairs of random numbers uniformly distributed and correlated

I would like to generate pairs of random numbers with certain correlation. However, the usual approach of using a linear combination of two normal variables is not valid here, because a linear ...
18
votes
2answers
3k views

Uniform random variable as sum of two random variables

Taken from Grimmet and Stirzaker: Show that it cannot be the case that $U=X+Y$ where $U$ is uniformly distributed on [0,1] and $X$ and $Y$ are independent and identically distributed. You should not ...
17
votes
2answers
474 views

What's the distribution of $(a-d)^2+4bc$, where $a,b,c,d$ are uniform distributions?

I have four independent uniformly distributed variables $a,b,c,d$, each in $[0,1]$. I want to calculate the distribution of $(a-d)^2+4bc$. I computed the distribution of $u_2=4bc$ to be $$f_2(u_2)=-\...
9
votes
2answers
4k views

Expectation of square root of sum of independent squared uniform random variables

Let $X_1,\dots,X_n \sim U(0,1)$ be independent and identicallly distributed standard uniform random variables. $$\text{Let }\quad Y_n=\sum_i^nX_i^2 \quad \quad \text{I seek: } \quad \mathbb{E}\big[\...
7
votes
1answer
401 views

Is there a parametric joint distribution such that $X$ and $Y$ are both uniform and $\mathbb{E}[Y \;|\; X]$ is linear?

Is there a parametric joint distribution such that $X$ and $Y$ are both uniform on $[0, 1]$ (i.e. a copula) and $\mathbb{E}[Y | X = x]$ is linear (by which I mean affine) in $x$? That is, $$\mathbb{E}...
43
votes
5answers
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 ...
16
votes
1answer
33k views

Generating random samples from a custom distribution

I am trying to generate random samples from a custom pdf using R. My pdf is: $$f_{X}(x) = \frac{3}{2} (1-x^2), 0 \le x \le 1$$ I generated uniform samples and then tried to transform it to my custom ...
13
votes
1answer
3k views

Jointly Complete Sufficient Statistics: Uniform(a, b)

Let $\mathbf{X}= (x_1, x_2, \dots x_n)$ be a random sample from the uniform distribution on $(a,b)$, where $a < b$. Let $Y_1$ and $Y_n$ be the largest and smallest order statistics. Show that ...
10
votes
1answer
3k views

What is the benefit of using permutation tests?

When testing some null versus alternative hypotheses by a test statistic $U(X)$, where $X = \{ x_i, ..., x_n\}$, apply the permutation test with the set $G$ of permutations on $X$ and we have a new ...
7
votes
1answer
6k views

Covariance matrix of uniform spherical distribution

I need to figure out the covariance matrix of a uniform spherical distribution. But there I can't even find a closed form of the distribution. This link says it is $\frac{1}{n}\mathbf{I}$, where $\...
13
votes
2answers
2k views

Discrete uniform random variable(?) taking all rational values in a closed interval

I just had an (intellectual) panic attack. A continuous random variable that follows a uniform in a closed interval $U(a,b)$: a comfortably familiar statistical concept. A continuous uniform r.v. ...
3
votes
1answer
1k views

CDF of Z=XY with X~Uniform(0.5,1.5) and Y~Uniform(0.8,1.5)

I am looking for the CDF of the product of two independent random variables (X and Y) with uniform distributions. Both random variables uniform distributions have interval boundaries (upper and lower ...
1
vote
1answer
264 views

Finding maximum likelihood estimator, symmetric uniform distribution

Let $X_1, ...X_n$ be IID random variables with uniform$[ -\theta , \theta ]$ . I need to find the Maximum Likelihood estimator (MLE) of $\theta$. My work is as follows, The likelihood function is , ...
29
votes
3answers
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 ...
22
votes
3answers
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 ...
31
votes
3answers
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 ...
15
votes
3answers
819 views

Why does the number of continuous uniform variables on (0,1) needed for their sum to exceed one have mean $e$?

Let us sum a stream of random variables, $X_i \overset{iid}\sim \mathcal{U}(0,1)$; let $Y$ be the number of terms we need for the total to exceed one, i.e. $Y$ is the smallest number such that $$X_1 +...
35
votes
11answers
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 ...
8
votes
1answer
7k views

Distribution of a ratio of uniforms: What is wrong?

Suppose that $X$ and $Y$ are two i.i.d. uniform random variables on the interval $[0,1]$ Let $Z=X/Y$, I am finding the cdf of $Z$, i.e. $ \Pr(Z\leq z) $. Now, I came up with two ways of doing this. ...
9
votes
2answers
2k views

Conditional Distribution of uniform random variable given Order statistic

I have the following question at hand: Suppose $U,V$ are iid random variables following Unif$(0,1)$. what is the conditional distribution of $U$ given $Z:=\max(U,V)$ ? I tried writing $Z=\Bbb{I}\...
18
votes
4answers
372 views

Draw integers independently & uniformly at random from 1 to $N$ using fair d6?

I wish to draw integers from 1 to some specific $N$ by rolling some number of fair six-sided dice (d6). A good answer will explain why its method produces uniform and independent integers. As an ...
7
votes
2answers
2k views

Jeffreys prior for continuous uniform distribution

A nonnegative random variable $x$ has a continuous uniform distribution in the interval $(0,\theta)$. Therefore, the likelihood is given by: $f(x|\theta) = \frac{1}{\theta}I(x\leq\theta)$, where $I$ ...
4
votes
1answer
4k views

PDF of cosine of a uniform random variable

There is a formula for the density of the cosine of random variable that's a uniform on $(-\pi,\pi)$ as discussed in this page: $f_{Y}(y) = \dfrac{1}{\pi \sin(\cos^{-1}y)}, y \in\ [-1,1]$ Can anyone ...
2
votes
2answers
18k views

Determine density of $\min(X,Y)$ and $\max(X,Y)$ for independently uniform distributed variables

Two independent random variables, $X$ and $Y$, are uniformly distributed on the unit interval $(-1,1)$. Determine the density for $U=\min(X,Y)$ and for $W=\max(X,Y)$
6
votes
2answers
452 views

How to simulate a uniform distribution of a triangular area?

I have three random real numbers: x1, x2 and x3 Each has the constraint x > 0.1 And together they follow the constraint x1 + x2 + x3 = 1 I want to simulate a uniform distribution of all ...
5
votes
2answers
2k views

How to perform goodness of fit test and how to assign probability with uniform distribution? [duplicate]

I have to demonstrate that a generator of VoIP calls generates calls uniformly distributed between callers. In particular the distribution is the uniform (min, max) one where the volume per caller ...
3
votes
1answer
151 views

Claims and questions regarding $n$-ball distribution?

CONTEXT In my research, I am utilizing an $n$-ball distributions along with two related distributions. I'd like to make certain I have a firm handle on the way to describe my three distributions. I ...
5
votes
1answer
605 views

Computing variance of squared difference of i.i.d. uniform random variables

When $U$ and $U'$ are two i.i.d. uniformly distributed random variables on $[0, 1]$, show that $$\mbox{Var} \left( (U-U')^2 \right) = 0.04 $$ I tried plugging in the formula $\mbox{Var}(U^2)=E(U^4)-E(...
5
votes
2answers
1k views

Asymptotic distribution of uniform order statistics

It can be shown that for an iid sample from a Uniform(0, 1) distribution, \begin{equation} n(1-U_{(n)}) \rightarrow exp(1) \\ n(U_{(1)}) \rightarrow exp(1) \end{equation} To see this just try finding ...
4
votes
4answers
1k views

Difference between Excel's RAND(), RAND()*RAND(), etc

I plotted below the standarized results of: RAND() RAND() * RAND() ... RAND() * RAND() * RAND() * RAND() * RAND() * RAND() It seems that the results are getting to zero, is that because you're ...
4
votes
1answer
2k views

Estimating Uniform distribution endpoints using data with errors

Suppose I have a random variable $X$ ~ $Unif(0,\theta)$ where I want to estimate $\theta$. I draw a sample $X_1,...,X_n$.One way is to get a point estimate using e.g. maximum likelihood estimation ...
3
votes
1answer
121 views

Conditional expectation of $\mathbb{E}(X - Y | (X, Y)\in\mathcal{A})$

Given two independent random variables $X \sim \mathcal{U}[-1,5]$ and $Y \sim \mathcal{U}[-5,5]$, what is $$\mathbb{E}\{Y - X | X \le 1, Y > X, Y \in [-1,1] \}\,?$$ I managed to compute the ...
2
votes
1answer
216 views

How to compute the CDF of this random variable?

I'm working on a game theory model of incomplete information, where players observe certain attributes via noisy signals. Specifically, one player has the opportunity to choose any value $\eta$ from ...
0
votes
1answer
51 views

Reference books on uniform spherical distributions in multiple dimensions [duplicate]

QUESTION What is a citation of a book whose scope includes the uniform distribution [1] that is generalized to an $n$-ball [2]? Among other things, I'd like to read a book that include such ...
34
votes
8answers
45k 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 ...
16
votes
1answer
656 views

Maximum gap between samples drawn without replacement from a discrete uniform distribution

This problem is related to my lab's research in robotic coverage: Randomly draw $n$ numbers from the set $\{1,2,\ldots,m\}$ without replacement, and sort the numbers in ascending order. $1\le n\le m$...
20
votes
3answers
4k views

How is $\theta$, the polar coordinate, distributed when $(x,y) \sim U(-1,1) \times U(-1,1)$ and when $(x,y) \sim N(0,1)\times N(0,1)$?

Let the Cartesian $x,y$ coordinates of a random point be selected s.t. $(x,y) \sim U(-10,10) \times U(-10,10)$. Thus, the radius, $\rho = \sqrt{x^2 + y^2}$, isn't uniformly distributed as implied by $...