π Session 4.4 β Continuous Uniform Distribution
π§ Why uniform? Two quick, real-life connections
Engineering β tolerance window (drilled hole)
A CNC operation is set to drill a hole and auto-reject if itβs outside 12.50 Β± 0.10 mm. With process control keeping outcomes spread fairly evenly in the allowed window, a quick first model is
X ~ Uniform(12.40, 12.60). Then any sub-intervalβs probability is just its length divided by 0.20.
Student life β random quiz question number
Your instructor lets a script randomly pick the starting question number from 1 to 10 uniformly. The chance it starts between 3 and 6 is length 4 over total length 10 β 4/10 = 0.4.
Definition:
A continuous random variable X has a Uniform Distribution on the interval [a, b] if its probability density function (PDF) is:
f(x) = 1 / (b β a), for a β€ x β€ b
π Properties
Mean:E(X) = (a + b) / 2
Variance:Var(X) = (b β a)2 / 12
π Example 4.7 β Uniform Current
Context: The current X in a wire is uniformly distributed between 4.9 and 5.1 milliamperes. The PDF is:
f(x) = 5 for 4.9 β€ x β€ 5.1 Question: What is the probability that X is between 4.95 and 5.0?
Solution: P(4.95 < X < 5.0) = β«4.955.0 5 dx = 5 Γ (5.0 β 4.95) = 0.25
π§ͺ Try it yourself (theory vs simulation)
Theoretical: Simulated:
Theory for Uniform is simply length of interval divided by total length: (UβL)/(bβa), clipped to [0,1].
π Cumulative Distribution Function (CDF)
The cumulative distribution function F(x) is:
F(x) = 0 for x < a
F(x) = (x β a) / (b β a) for a β€ x < b
F(x) = 1 for x β₯ b
π Excel: sample, estimate probability, and make a histogram
Generate Uniform(a,b) samples
Option A (constants, here a=4.9, b=5.1). Put in A2 and fill down:
=4.9 + (5.1 - 4.9) * RAND()
Option B (use cells for a and b, e.g. A1=a, B1=b):
=$A$1 + ($B$1 - $A$1) * RAND()
Tip: To βfreezeβ values, copy the column and Paste Special β Values.
Estimate P(L β€ X β€ U)
With samples in A2:A5001 and bounds in cells L and U: