8. There are two teams competing, and the probability of each team winning a match is $\frac{1}{2}$. It is stipulated that a team must win four consecutive matches to end the series. The number of matches played is a random variable $\xi$, then the expected value E $\xi=$ $\qquad$ .
8. $\frac{27}{2}$.

Let the probability that the match ends exactly after the $k(k \geqslant 1)$-th game be $p_{k}$. Then
$$
p_{1}=0, p_{2}=0, p_{3}=0, p_{4}=\frac{1}{2^{3}} \text {. }
$$

When $n \geqslant 6$,
$$
\begin{array}{l}
p_{n-1}=\frac{1}{2} p_{n-2}+\frac{1}{2^{2}} p_{n-3}+\frac{1}{2^{3}} p_{n-4} \\
p_{n}=\frac{1}{2} p_{n-1}+\frac{1}{2^{2}} p_{n-2}+\frac{1}{2^{3}} p_{n-3} .
\end{array}
$$
$$
\begin{array}{l}
\text { (2) }-\frac{1}{2} \times(1) \text { gives } \\
p_{n}=p_{n-1}-\frac{1}{2^{4}} p_{n-4}(n \geqslant 6) .
\end{array}
$$
$$
\begin{array}{l}
\text { Then } \mathrm{E} \xi=\sum_{k>4} k p_{k} \\
=4 p_{4}+5 p_{5}+\sum_{k \geqslant 6} k\left(p_{k-1}-\left(\frac{1}{2}\right)^{4} p_{k-4}\right) \\
=4 p_{4}+5 p_{5}+\sum_{k \geqslant 6} k p_{k-1}-\left(\frac{1}{2}\right)^{4} \sum_{k \geqslant 8} k p_{k-4} \\
=4 p_{4}+5 p_{5}+\sum_{k \geqslant 6} k p_{k-1}- \\
\left(\frac{1}{2}\right)^{4} \sum_{k \geq 5}(k+3) p_{k-1} \\
=4 p_{4}+5 p_{5}-8 \times\left(\frac{1}{2}\right)^{4} p_{4}+ \\
\sum_{k \geqslant 6}\left(k-\left(\frac{1}{2}\right)^{4}(k+3)\right) p_{k-1} \\
=4 p_{4}+5 p_{5}-8 \times\left(\frac{1}{2}\right)^{4} p_{4}+ \\
\sum_{k \geqslant 5}\left((k+1)-\left(\frac{1}{2}\right)^{4}(k+4)\right) p_{k} \\
=5 p_{5}-p_{4}+\sum_{k \geqslant 4}\left((k+1)-\left(\frac{1}{2}\right)^{4}(k+4)\right) p_{k} \\
=5 p_{5}-p_{4}+\left(1-\left(\frac{1}{2}\right)^{4}\right) \sum_{k \geqslant 4} k p_{k}+ \\
\left(1-4 \times\left(\frac{1}{2}\right)^{4}\right) \sum_{k \geqslant 4} p_{k} \text {. } \\
\end{array}
$$

Notice that, $p_{4}=\frac{1}{2^{3}}, p_{5}=\frac{1}{2^{4}}$,
$$
\sum_{k \geqslant 5} p_{k}=1-\left(p_{1}+p_{2}+p_{3}+p_{4}\right)=1-\left(\frac{1}{2}\right)^{3} \text {. }
$$

Thus, E $\xi=\left(5 \times \frac{1}{2^{4}}-\left(\frac{1}{2}\right)^{3}+\right.$
$$
\begin{aligned}
& \left.\left(1-4 \times\left(\frac{1}{2}\right)^{4}\right)\left(1-\left(\frac{1}{2}\right)^{3}\right)\right) \times 2^{4} \\
= & \frac{27}{2} .
\end{aligned}
$$