I am having a hard time with the solution to this problem. What I don't understand is why the $P(X\leq \frac{n+1}{2}) = \frac{n+1}{2}\frac{1}{n}$ What formula is being used here to calculate the probability?
2026-03-27 18:14:58.1774635298
On
Median of a uniform probability distribution
387 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
Considering the fact that the distribution is uniform, any value has the same probability to occur, the median is the central value of the ordered (odd) sequence, that is
$$Me=\frac{n+1}{2}$$
Moreover, observing that the distribution is symmetric, Expectation, mode and median are the same.
Thus being, as known, $E(X)=\frac{n+1}{2}$, Median is the same value

In general, for a discrete distribution $X$ with support on $1..n$, $P(X \le m) = \sum_{i=1}^m P(X=i)$, that is, just the sum of the individual probabilities of each outcome less than $m$.
In your example, the distribution $\text{DUnif}(1,...,n)$ has PMF $P(X=i)=\frac{1}{n}$.