In probability theory, a median of a probability distribution is a number $M$ such that the CDF of this distribution $F_\xi(x)$ satisfies
$F_\xi(M)=\frac{1}{2} \tag1$
This works for continuous distributions, but for discrete distributions median would almost always be undefined if we were using this definition. How is it defined in the discrete case? Does it have similarity with $(1)$?
To stress the difference from median of a set and illustrate my thoughts, the CDF looks something like this.
In the general case, a median is defined as any number $m$ such that $P(\xi\leqslant m)\geqslant\frac12$ and $P(\xi\geqslant m)\geqslant\frac12$, or, equivalently, such that $F_\xi(m^-)\leqslant\frac12\leqslant F_\xi(m)$.
Medians are not unique, in general.
Exercise: Determine the set of medians of the distribution such that $P(\xi=0)=P(\xi=1)=\frac12$.