# Median of independent variables

Each of the variables $X_1$, $X_2$, $X_3$ independently takes values from the set ${-1,0,1}$ with probabilities 0.2, 0.6, 0.2 respectively. The variable $Y$ is defined to be the median of $X_1$, $X_2$, $X_3$. Show that $P(Y=-1)=0.104$ and deduce $P(Y=1)$ and $P(Y=0)$. Calculate E(Y) and Var(Y) and determine whether the variance of Y exceeds that of the mean of $X_1$, $X_2$, $X_3$.

I am not very good with medians because I've never come across a formula for it. Also Y doesn't seem to be a function of a random variable (is it?) which I am more familiar with.

-

$Y$ is the median of $X_1$, $X_2$, $X_3$. What would $X_1$, $X_2$, $X_3$ be in order for that their median is $-1$? There are three possibilities (not considering the order): $(X_1, X_2, X_3)=(-1, -1, -1), (-1, -1, 0), (-1, -1, 1)$.
So $$(X_1, X_2, X_3)=\begin{cases} (-1, -1, -1) \\ (1, -1, -1)\\ (-1, 1, -1)\\ (-1, -1, 1)\\ (0, -1, -1)\\ (-1, 0, -1)\\ (-1, -1, 0) \end{cases}$$
Their probabilities are $0.008, 0.008, 0.008, 0.008, 0.024, 0.024, 0.24$, respectively. Then the probability of $P(Y=-1)=0.008\times 4 + 0.024\times 3=0.104$.