I encountered this in my homework. I derived two ways to solve the problem and the answer which I have tested using programming, seem to be the same, but I am not sure how to prove this equation.
Let $n$ and $k$ be nonnegative integers with $k\leq n$. Prove that $$\sum\limits_{j=0}^k\,j\,\binom{n}{j}\,\binom{n-j}{2k-2j}\,2^{2k-2j}=n\binom{2n-2}{2k-2}\,.$$
The original problem is the following:
A shoe rack has n pairs of shoes. Of those, 2k individual shoes are chosen at random, k ≤ n. Calculate the expected number of matching shoes among 2k chosen shoes.
The left hand side is from directly calculating expectation, while the right hand side is using sum of indicator variables of each pair being chosen. The expectation is just the equation divided by $\binom{2n}{2k}$.
The identity is equivalent to $$\sum\limits_{i=0}^{k-1}\binom{n-1}{i}\,\binom{n-1-i}{2k-2-2i}\,4^{2k-2-i}=4^{k-1}\binom{2n-2}{2k-2}$$ where $i=j-1$. By considering the Cauchy product, the LHS is $$4^{2k-2}[z^{2k-2}](1+z)^{n-1}\left(1+\frac{z^2}{4(1+z)}\right)^{n-1}$$ which can be written as $$4^{2k-2}[z^{2k-2}]\left(1+\frac{z}{2}\right)^{2n-2}$$ that is the RHS.