# Tag Info

Accepted

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

TL;DR: The sharp contrast between the bits and coins is that in the case of the coins, you're ignoring the order of the outcomes. HHHHTTTT is treated as the same as TTTTHHHH (both have 4 heads and 4 ...
• 92.6k

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

This is another illustration of Jensen's inequality $$\mathbb E[\log X] < \log \mathbb E[X]$$ (since the function $x\mapsto \log(x)$ is strictly concave] and of the more general (anti-)property ...
• 107k
Accepted

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

Consider two values symmetrically placed around $0.5$ - like $0.4$ and $0.6$ or $0.25$ and $0.75$. Their logs are not symmetric around $\log(0.5)$. $\log(0.5-\epsilon)$ is further from $\log(0.5)$ ...
• 286k
Accepted

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

Here are some general hints on solving this question: You have a sequence of continuous IID random variables which means they are exchangeable. What does this imply about the probability of getting a ...
• 129k
Accepted

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

It is not the case that exponentiating a uniform random variable gives an exponential, nor does taking the log of an exponential random variable yield a uniform. Let $U$ be uniform on $(0,1)$ and let ...
• 286k
Accepted

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

No it is not uniform You can count the $36$ equally likely possibilities for the absolute differences ...
• 40.5k
Accepted

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

The documentation of R on random number generation has a few sentences at its end, that confirm your expectation of 32-bit integers being used and might explain what you are observing: Do not rely ...
• 451
Accepted

### Generating random points uniformly on a disk

The problem is due to the fact that the radius is not uniformly distributed. Namely, if $(X,Y)$ is uniformly distributed over $$\left\{ (x,y);\ x^2+y^2\le 1\right\}$$ then the (polar coordinates) ...
• 107k

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

Using only the most basic axioms about probabilities and real numbers, one can prove a much stronger statement: The difference of any two independent, identically distributed nonconstant random ...
• 328k

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

Entropy in physics and information theory are not unrelated. They're more different than the name suggests, yet there's clearly a link between. The purpose of entropy metric is to measure the amount ...
• 61.8k

### A three dice roll question

Because the point to an interview question is to demonstrate your thinking, I want to emphasize two things: Finding a simple, clear, analysis using minimal calculation and straightforward notation. ...
• 328k

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

You almost have it back to front. You asked: "If $X$ has a uniform distribution, does it mean that $e^X$ follows an exponential distribution?" "Similarly, if $Y$ follows an exponential distribution,...
• 40.5k
Accepted

• 651
Accepted

• 311
Accepted

### Relation between independence and correlation of uniform random variables

Independent implies uncorrelated but the implication doesn't go the other way. Uncorrelated implies independence only under certain conditions. e.g. if you have a bivariate normal, it is the case that ...
• 286k
Accepted

• 286k

### Continuous random variables - probability of a kid arriving on time for school

Write $X \sim U(15,45)$ and $Y \sim U(30,40)$, then can write what you are trying to solve for as $P(X+Y<60)$. I am using the starting time here as 6:00AM and therefore need the sum of time passed ...
• 2,289

### What distribution to sample X from to get an uniform distribution in Y?

maybe i misunderstand your question, but why don't you sample from a uniform distribution and set X to the arccos of your samples? in R, this would be ...
• 521

### Why is the CDF of a sample uniformly distributed

Here's some intuition. Let's use a discrete example. Say after an exam the students' scores are $X = [10, 50, 60, 90]$. But you want the scores to be more even or uniform. $h(X) = [25, 50, 75, 100]$ ...
• 131
### How is $\theta$, the polar coordinate, distributed when $(x,y) \sim U(-1,1) \times U(-1,1)$ vs. when $(x,y) \sim N(0,1)\times N(0,1)$?
You're referring to a transformation from a pair of independent variates $(X,Y)$ to the polar representation $(R,\theta)$ (radius and angle), and then looking at the marginal distribution of $\theta$. ...