How to calculate the mixed Nash Equilibrium in the matching pennies game? The matching pennies game is the following:
\begin{array}{|c|c|c|c|}
\hline
Player1\backslash Player2 & H & T \\ \hline
H & (\color{red}{+1}, -1) & (-1, \color{blue}{+1}) \\ \hline
T & (-1, \color{blue}{+1}) & (\color{red}{+1}, -1) \\ \hline
\end{array}
Here, there is no pure Nash equilibrium in this game. i.e., No cell has blue and red color.
However, when players are allowed to use mixed strategy, at least one Nash equilibrium is guaranteed to exist. It is known that the mixed strategy ($50\%$, $50\%$) is the only mixed Nash equilibrium for this game.
I tried to get this result. So I supposed that Player 1 randomize to play $H$ with probability $p$ and Player 2 randomize to play $H$ with probability $q$. Hence,
\begin{array}{|c|c|c|c|}
\hline
Player1\backslash Player2 & H\,\text{with}\,q & T\,\text{with}\,(1-q) \\ \hline
H\,\text{with}\,p & (+1, -1) & (-1, +1) \\ \hline
T\,\text{with}\,(1-p) & (-1, +1) & (+1, -1) \\ \hline
\end{array}
I tried to do this but I cannot find the mixed Nash equilibrium ($50\%$, $50\%$). Where I am wrong?
\begin{array}{|c|c|c|c|}
\hline
Player1\backslash Player2 & H\,\text{with}\,q & T\,\text{with}\,(1-q) \\ \hline
H\,\text{with}\,p & (\color{red}{pq}, -pq) & (p(q-1), \color{blue}{p(1-q)}) \\ \hline
T\,\text{with}\,(1-p) & ((p-1)q, \color{blue}{q(1-p)}) & (\color{red}{(1-p)(1-q)}, (1-p)(q-1)) \\ \hline
\end{array}
 A: Player 1 chooses $p$ to make Player 2 not care about what value $q$ he chooses.  In other words, Player 1 chooses $p$ to make Player 2 not care about whether he plays H or T.
If Player 2 plays H he gets $-p+1-p=1-2p$.
If Player 2 plays T he gets $p-(1-p)=2p-1$.
The two values are equal for $p=1/2$.
Repeat for Player 2 choosing $q$.
A: Player 1's expected utility is
$$pq + (1-p)(1-q) - p(1-q) - q(1-p) = 4pq - 2p - 2q + 1 = (1-2p)(1-2q).$$
Notice that when $q < 1/2$, $(1-2q)$ is positive so player 1 maximizes her expected utility by choosing $p=0$; similarly, when $q > 1/2$, $(1-2q)$ is negative so player 1 maximizes her expected utility by choosing $p=1$. However, when $p=0$ player 2 should clearly choose $q=1$, and likewise when $p=1$ player 2 should choose $q=0$; in other words, neither of these situations is "stable". More formally, this shows that when $q \neq 1/2$, the profile cannot be a Nash equilibrium. A similar argument shows this also holds for $p$. So $p=1/2$, $q=1/2$ is the only possible equilibrium.
