Uniform Distribution: Equal Density, Interval Probability, and Simulation
How can probability be spread evenly across a continuous interval?
How this lesson unfolds.
Begin with Does the outcome live on points or across an interval? The sequence then connects Uniform is the bridge from sums to integrals and builds toward Simulation connects exact theory to computation.
Does the outcome live on points or across an interval?
A discrete variable has countable outcomes and uses sums. A continuous variable can take any real value in an interval and assigns probability through interval areas.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionUniform is the bridge from sums to integrals
What replaces point probabilities on a continuum?
A probability mass function assigns mass to discrete points. A probability density function supplies height, while integration converts that density into probability over an interval.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionDensity is probability packed per unit length
Is the height f(x) itself a probability?
No. For a continuous variable, a single point has probability zero. The probability of a short interval is approximately density times width, and exact probability is area under the density curve.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionUniform is one continuous distribution among many
Does continuous automatically mean uniform?
No. Continuous describes the possible values; uniform describes a flat density on one interval. Normal, exponential, gamma, and beta distributions are continuous but have different shapes.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionEqual widths need equal areas
Why are human heights continuous but not uniform?
Height can vary continuously, but equal-width height ranges are not equally likely. A uniform model gives equal probability to equal-length subintervals; height data concentrate near a typical range.
Height can vary continuously, but equal-width height ranges are not equally likely.A uniform model gives equal probability to equal-length subintervals; height data concentrate near a typical range.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionA flat density makes equal lengths equally likely
What exactly is uniform about Uniform(a, b)?
The density is constant at 1/(b-a) between a and b and zero outside. Every equal-length subinterval inside the support has the same probability—not every individual real number.
Every equal-length subinterval inside the support has the same probability—not every individual real number.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionInterval probability is length divided by total length
How do we calculate a probability under a flat density?
For X uniform on [a,b], P(c≤X≤d)=(d-c)/(b-a) whenever a≤c≤d≤b. Endpoints do not affect continuous probabilities.
For X uniform on [a,b], P(c≤X≤d)=(d-c)/(b-a) whenever a≤c≤d≤b.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionIntegration adds continuously varying contributions
Why do continuous models need integration?
Ordinary addition handles finitely many pieces. An integral is the limit of adding increasingly thin contributions across a complete interval.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionA Riemann sum becomes exact in the limit
What does the integral symbol actually mean?
Partition [a,b] into widths Δx, add rectangle areas f(x_i)Δx, and let the maximum width approach zero. The limiting sum is the integral.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionIntegration completes the idea of summation
How does a finite sum turn into continuous addition?
More, thinner rectangles give better area approximations. In the limit, the sum of tiny areas becomes an exact integral over the continuum.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionDifferentiation and integration reverse each other
How are rates and accumulated totals connected?
The Fundamental Theorem of Calculus links a density-like rate to its accumulated area: differentiating an integral recovers the integrand, subject to standard continuity conditions.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionVariance averages squared distance from the mean
How do tiny intervals contribute to continuous variance?
At x, the squared distance is (x-μ)^2. Multiplying by f(x)dx weights that distance by the tiny interval's probability; integrating adds every contribution.
At x, the squared distance is (x-μ)^2.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionUniform mean sits at the midpoint
Where is the balance point of Uniform(a, b)?
Symmetry places the mean at μ=(a+b)/2. The probability to the left and right of the midpoint is equal.
Symmetry places the mean at μ=(a+b)/2.The probability to the left and right of the midpoint is equal.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionSums and integrals express the same variance idea
What changes between discrete and continuous variance?
Discrete variance sums squared distances times point probabilities. Continuous variance integrates squared distances times density. The concept stays fixed while the addition rule changes.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionUniform variance depends only on interval length
Why does uniform variance equal L²/12?
After centering at the midpoint and averaging squared distances across the flat interval, the integral evaluates to L^2/12 where L=b-a. Shifting the interval changes the mean but not its variance.
After centering at the midpoint and averaging squared distances across the flat interval, the integral evaluates to L^2/12 where L=b-a.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionStandard deviation returns to the original units
How large is the spread on the data's own scale?
Taking the square root of uniform variance gives σ=(b-a)/√12. Variance uses squared units; standard deviation uses the same units as X.
Taking the square root of uniform variance gives σ=(b-a)/√12.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionA pseudorandom generator evolves a deterministic state
Where do computer-generated uniform samples begin?
A seeded pseudorandom number generator repeatedly transforms an internal state into new bit patterns. The same seed reproduces the same sequence; the sequence can still have strong statistical properties.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionA tiny recurrence makes the state idea visible
Can we run a toy generator by hand?
Using s_next=(7s+5) mod 100 produces a deterministic cycle. It is useful for seeing state updates, but its short cycle and uneven behavior make it unsuitable as a real random generator.
Using s_next=(7s+5) mod 100 produces a deterministic cycle.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionScaling a uniform integer grid creates a uniform float grid
How does an integer become a number in [0, 1)?
If K is uniform on {0,…,2^53-1}, then U=K/2^53 is uniform on a grid of 2^53 representable values in [0,1). It approximates, but does not sample, every real number.
If K is uniform on {0,…,2^53-1}, then U=K/2^53 is uniform on a grid of 2^53 representable values in [0,1).
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionSimulation connects exact theory to computation
What should we remember when software returns a uniform number?
The mathematical model has a flat continuous density; software returns one of finitely many floating-point values designed to behave uniformly. Theory explains interval probabilities, while simulation lets us test them empirically.
- Helpful foundationsfractions · area of a rectangle · basic probability
- Next connectionSampling distributions and continuous models