WLOG, let m1>m
be the second median of X.
Then, by the definition of medians, P(X≤m)≥12
and P(X≥m1)≥12.
Then, P(X∈(m,m1))=0.
If m1>m+1,
then there exists an m2∈(m,m1),
such that P(X=m2)=0.
This implies that m2=1,
since that is the only value of X
with probability 0.
However, then m<1,
which precludes m
from being a median. Thus, m1
must be 1+m.
Since we know 23
to be a median of X,
we need to check whether 22
or 24
are medians of X.
Computation via the CDF of X
shows that niether 22,
nor 24
are medians. Hence, 23
is the only median of X.
(b)
Let Ij
be the indicator variable for the event X≥j.
Notice that the event X=k
(the first occurance of a birthday match happens when there are k
people) implies that Ij=1
for j≤k
and vice versa. Thus,
X=366∑j=1Ij