Joint probability of a minimum and maximum score after $n$ dice rolls An unbiased die is thrown $n$ times; let $M$ and $m$ denote the maximum and minimum points obtained respectively. Find $P\left( m=2, M=5 \right)$. (Hint: begin with $P\left (m\geq2, M\leq 5 \right)$.)
The question is from elementary probability theory (Kai Lai Chung)
Here is my thought process:
The minimum $m$ and maximum $M$ points obtained in $n$ throws are independent events. So:
$$ P(m\geq2, M\leq5) = P(m \geq 2)P(M\leq5)$$
$$ P(M\leq5) = \left(\frac{5}{6}\right)^n $$
$$ P(m\geq2) = 1-\left(\frac{4}{6}\right)^n $$
$$P(m\geq2, M\leq5) = \left(\frac{5}{6}\right)^n - \left(\frac{5}{9}\right)^n$$
under above conditions, $P(m=2, M=5)$ is just $\frac{1}{6}$ in all combinations. So:
$$ P(m=2, M=5) = \left(\frac{5}{6}\right)^n - \frac{\left(\frac{5}{9}\right)^n}{6} $$
But the answer is $\left(\frac{4}{6}\right)^n - 2\left(\frac{3}{6}\right)^n + \left(\frac{2}{6}\right)^n$.
Can anyone help me figure out where I went wrong?
 A: I'll post an "answer," mainly composed of wikichung's ideas.  We independently roll the unbiased die $n$ times obtaining $X_1, \dots, X_n$, with minimum value $m$ and maximum value $M$.  What is $P(m=2, M=5)$?  You noted that
$$
P(2 \leq X_i \leq 5; \forall i) = \prod_{i=1}^n \frac{4}{6} = \left(\frac{4}{6}\right)^n.
$$
Now how does this relate to $P(m=2, M=5)$?  It is two big!  For example we are counting events for which $m \neq 2$, such as $(5, 5, \dots, 5)$.  However, if for each $i$, $2 \leq X_i \leq 5$, then $m \geq 2$ and $M \leq 5$.  So we have determined that,
$$
P(m \geq 2, M \leq 5) = \frac{4}{6}.
$$
By the same logic for any $a \leq b$:
$$
P(m \geq a, M \leq b) = \frac{b-a+1}{6}.
$$
So I will leave the last question to you.  How can we rewrite $P(m=2, M=5)$ by adding and subtracting terms of the form $P(m\geq a , M\leq b)?$  This is where you will need inclusion/exclusion.
edit - Additional Information
Define $S(m,M) = |\{$sequences with min $=m$ and max $=M\}|$, and $T(m,M) = |\{$sequences with min $\geq m$ and max $\leq M\}|$.  Then we have:
$$
S(2,5) = T(2,5) - T(3,5) - t(2,4) + ?.
$$
There are some sequences counted by $T(2,5)$, which are not counted by $S(2,5)$, but which were doubly undone with the two negative terms.  What are they?
