Uniform distributions and interval probabilities
Objectives and prerequisites
Distinguish discrete and continuous uniform distributions; compute probabilities from counts or interval lengths; derive mean and variance; and use CDFs and affine transformations with support checks. Prerequisites: PMF, PDF, CDF, integration and expectation. The official GATE 2026 CS syllabus names uniform distributions. Both discrete and continuous forms are taught here to make the modeling distinction explicit.
1. What “uniform” means
Uniform means equal probability for equal-sized pieces of the support under the relevant model. For a finite set of n distinct outcomes chosen uniformly, each has probability 1/n. For a continuous interval [a,b] with a<b, density is constant, so equal-length subintervals have equal probabilities. It does not mean that each individual real number has a positive equal probability.
A model must supply uniformity; simply saying “random” is insufficient. If bus arrivals are scheduled or a random-number generator is biased, an assumed uniform waiting or output model might be false. In this lesson, uniformity is part of each specified mathematical experiment.
2. Discrete uniform distribution on consecutive integers
Let X be uniform on {a,a+1,…,b}, where a,b are integers and a≤b. There are n=b−a+1 values, each with mass 1/n. An event probability equals the number of included support values divided by n.
Example: X is uniform on {2,3,4,5,6,7,8}. There are seven values. P(3<X≤7)=4/7 because the included values are 4,5,6,7. A length ratio of (7−3)/(8−2)=2/3 is incorrect for this discrete model. The endpoints and the integer spacing matter.
Its mean is (a+b)/2, by symmetry. Its variance is (n²−1)/12. To derive the latter, first use K uniform on {1,…,n}: E[K]=(n+1)/2 and E[K²]=(n+1)(2n+1)/6 from the standard sums Σk=n(n+1)/2 and Σk²=n(n+1)(2n+1)/6. Subtracting the squared mean gives (n²−1)/12. Shifting K to the desired interval leaves variance unchanged. For {2,…,8}, mean=5 and variance=(49−1)/12=4.
At the single-value boundary a=b, n=1 and variance is zero; the model is a constant variable. This discrete case is valid. The continuous interval model below instead requires a<b.
3. Continuous uniform distribution
Write X~Uniform(a,b), a<b, for constant PDF f(x)=1/(b−a) on [a,b] and zero outside. The rectangle's total area is one. Its CDF is
F(t)=0 for t<a; F(t)=(t−a)/(b−a) for a≤t≤b; F(t)=1 for t>b.
For c≤d, the probability of X in [c,d] is the length of [c,d]∩[a,b] divided by b−a. Equivalently, P(c≤X≤d)=max(0,min(d,b)−max(c,a))/(b−a). Clipping to the support is essential. Open and closed endpoints give the same probability because each singleton has probability zero.
Example: X~Uniform(2,8). P(3<X≤7)=(7−3)/6=2/3. P(7≤X≤10)=(8−7)/6=1/6, not 3/6, because values beyond eight are impossible. P(X=5)=0, although the density there is 1/6. For P(X≤10), the CDF is one, not (10−2)/6; the linear formula applies only inside support.
4. Deriving mean and variance
E[X]=∫ₐᵇ x/(b−a) dx=(b²−a²)/[2(b−a)]=(a+b)/2.
E[X²]=∫ₐᵇ x²/(b−a) dx=(a²+ab+b²)/3.
Subtract E[X]² to obtain Var(X)=(b−a)²/12; standard deviation is (b−a)/√12. The mean depends on location and width, while variance depends only on width. For Uniform(2,8), mean=5, variance=36/12=3 and standard deviation √3. This is not the variance four of the discrete uniform distribution on {2,…,8}.
The median is (a+b)/2 because it splits the interval into equal lengths. For the usual constant-density representation, every point in the interval has the same maximal density, so there is no unique mode. Saying “the mode is the midpoint” would add a preference the uniform model does not have.
5. Affine transformations and quantiles
If U~Uniform(0,1), then X=a+(b−a)U is Uniform(a,b). This gives a direct way to shift and rescale a uniform variable. Conversely U=(X−a)/(b−a) is Uniform(0,1). For 0<q<1, the q-quantile is a+q(b−a), obtained by solving F(x)=q.
For Uniform(2,8), the 75th percentile is 2+.75(6)=6.5. It is not .75×8=6, because the left endpoint is two rather than zero. The central 50% interval runs from the 25th percentile 3.5 to the 75th percentile 6.5, with length three and probability 3/6=1/2.
A negative affine scale reverses the endpoints. If X~Uniform(2,8) and Y=10−X, then Y is still Uniform(2,8). If Y=−2X+1, then its support is [−15,−3], not [−3,−15], with mean −9 and variance 4×3=12. Always reorder transformed endpoints before writing a PDF.
6. Conditioning on a subinterval
For X~Uniform(a,b) and a≤c<d≤b, conditioning on c≤X≤d leaves a uniform law on [c,d]. In the conditional probability ratio, the original density factor cancels. Example: X~Uniform(2,8), and it is known that X≥5. Then P(X≤6|X≥5)=length([5,6])/length([5,8])=1/3. The unconditional P(X≤6)=2/3 answers a different question.
This result uses a positive-length conditioning interval. Conditioning on X=5 would have probability-zero denominator under the elementary event-ratio definition and cannot be handled by substituting c=d=5. Also, uniformity on an interval is not preserved under every nonlinear transform: for U~Uniform(0,1), Y=U² has F_Y(y)=√y for 0≤y≤1, which is not linear. Only the affine transformation claim was established above.
Checklist
Decide whether support is a finite integer set or a continuous interval. Count support values for discrete probabilities and intersect interval lengths for continuous probabilities. Write the full CDF pieces. Use the correct variance formula, (n²−1)/12 versus (b−a)²/12. Check transformed endpoints and quantiles against support, and replace the reference interval when conditioning.
Original practice: six single-correct MCQs
These are original questions, not previous-year questions. Choose exactly one option.
UF01. X is discrete uniform on {2,3,4,5,6,7,8}. Find P(3<X≤7).
A. 2/3 B. 4/7 C. 5/7 D. 3/7
Answer: B
A: This uses continuous lengths instead of discrete counts.
B: The included values are 4,5,6,7 among seven support values.
C: This incorrectly includes X=3.
D: This incorrectly excludes X=7.
UF02. X~Uniform(2,8) continuously. Find P(7≤X≤10).
A. 1/2 B. 1 C. 1/6 D. 0
Answer: C
A: This includes the impossible interval from eight to ten.
B: Only one-sixth of the support is in the event.
C: The overlap with support is [7,8], of length one over total six.
D: The event has a nonempty positive-length overlap with support.
UF03. For continuous X~Uniform(2,8), what is Var(X)?
A. 4 B. 5 C. √3 D. 3
Answer: D
A: This is the variance of the discrete uniform law on integers two through eight.
B: This is the mean.
C: This is the standard deviation.
D: Use (8−2)²/12=3.
UF04. For continuous X~Uniform(2,8), find the 75th percentile.
A. 6.5 B. 6 C. 4.5 D. 7.5
Answer: A
A: Use a+q(b−a)=2+.75×6=6.5.
B: Multiplying only the upper endpoint ignores the lower endpoint.
C: This is the offset above two, not the final value.
D: Its CDF is 5.5/6, not .75.
UF05. X~Uniform(2,8). Given X≥5, find P(X≤6|X≥5).
A. 2/3 B. 1/6 C. 1/3 D. 1/2
Answer: C
A: This is the unconditional P(X≤6).
B: This is the joint event probability before conditioning.
C: The conditioned support [5,8] has length three; [5,6] has length one.
D: This is P(X≥5), the conditioning-event probability.
UF06. U~Uniform(0,1) and Y=U². What is F_Y(y) for 0≤y≤1?
A. y B. y² C. 2y D. √y
Answer: D
A: A nonlinear square transformation does not preserve uniformity.
B: Solve U²≤y for U, rather than squaring y again.
C: This is not a valid CDF over the entire interval, since it exceeds one.
D: Because U≥0, P(U²≤y)=P(U≤√y)=√y.
Source and scope
Uniform distributions are named in Section 1 Probability and Statistics of the official GATE 2026 CS syllabus. This lesson covers standard finite discrete and continuous interval forms. Original examples and practice; it does not establish full probability or Engineering Mathematics coverage.
Official GATE 2026 CS syllabus (verified 2026-10-14).
Sign in to keep your progress. Sign in