What is the probability that the matrix is orthogonal? Let $X$ and $Y$ be independent $Bin(3,\frac{1}{3})$ random variables. Then what is  the probability that the matrix, $$
P=\begin{bmatrix}
\frac{X}{\sqrt2}&\frac{Y}{\sqrt2}\\\frac{-1}{\sqrt2}&\frac{1}{\sqrt2}\end{bmatrix}$$is orthogonal?
My approach:$$PP^T=\begin{bmatrix}
\frac{X}{\sqrt2}&\frac{Y}{\sqrt2}\\\frac{-1}{\sqrt2}&\frac{1}{\sqrt2}\end{bmatrix}\begin{bmatrix}
\frac{X}{\sqrt2}&\frac{-1}{\sqrt2}\\\frac{Y}{\sqrt2}&\frac{1}{\sqrt2}\end{bmatrix}=\begin{bmatrix}
\frac{X^2+Y^2}{2}&\frac{Y-X}{2}\\\frac{Y-X}{2}&{1}\end{bmatrix}=\begin{bmatrix}
1&0\\0&1\end{bmatrix}$$Now,to find the required probability,it is enough to find,$P[Y-X=0].$Is this right?if it is,How can we find that?

$X=Y$ is not enough. You also need $X^2+Y^2=2$. These two conditions yield $X=Y=1$. Since $\mathbb{P}(X=1)= {{3}\choose{1}}(\frac{1}{3})(1-\frac{1}{3})^2= \frac{4}{9}$ and $X$ and $Y$ are independent, the required probability is $\frac{16}{81}$.
