Compute expectation of $n^2$ for random walk I would like to compute the following quantity.
$$ \mathbb{E}(n^2) = \sum \limits_{n= -N}^{-N} \left( \frac{1}{2} \right)^N \frac{N!}{(\frac{1}{2}(N+n))!(\frac{1}{2}(N-n))!} n^2 $$
I tried to transform variables to $k = \frac{1}{2}(N+n)$. In that case, $ n = 2k - N$.
Then I would like to compute the following thing.
$$ \mathbb{E}((2k-N)^2) = \sum \limits_{k=0}^N \left( \frac{1}{2} \right)^N \frac{N!}{(k)!(N-k)!} (2k-N)^2 $$
In that case, I hope to be able to use some properties of binomial coefficients. Unfortunately, I was not able to do that. I thought of expanding $(2k - N)^2 = 4k^2 - 4kN + N^2$. In that case, sum over $N^2$ is easy as it does not depend on variable $k$. But I am not sure how to do the other two sums. I thought of getting rid of $k$/$k^2$ by dividing it with the factorial $k!$ to obtain $(k-1)!$ in the denominator. Then I tried changing variables to $l = k-1$ but unfortunately, that did not give me any further simplification.
 A: If $n$ denotes a the position of a symmetric $\pm 1$ random walk after $N$ steps, then the summation should not go over all integers in the range, but only over the even or odd integers. Hence your first sum is wrong, the summation index should increment in steps of $2$.
It's easier to make the change of variables $n=2m-N$ where $m$ ($=$ amount of $+1$ steps) is a Binomial with parameters $(N,\frac12)$
Then, you know (from probability) that $E[m]= N/2$ and $\sigma^2_m=N/4$.
Then $E[n]=0$ and $\sigma^2_n=4 \,\sigma^2_m=N$ 
And
$$E[n^2]=\sigma^2_n + E[n]^2=N$$

Edit: to obtain $E[m^2]$ directly by summation is possible but a little cumbersome.
A trick (from here) is to compute
$$\begin{align}
E[m(m-1)]&=\sum_{m=0}^N m (m-1) \frac{1}{2^N}\binom{N}{m} \\
&=\frac{1}{2^N} \sum_{m=2}^N m (m-1) \frac{N!}{(N-m)! m!}\\
&=\frac{1}{2^N} \sum_{m=2}^N \frac{N!}{(N-m)! (m-2)!} \\
&=\frac{1}{2^N} \sum_{k=0}^{N-2} \frac{(N-2)! (N-1)N}{(N-2-k)! k!} \\
&=\frac{1}{2^N} N(N-1) \sum_{k=0}^{N-2} \binom{N-2}{k}\\
&=\frac{1}{2^N} N(N-1) 2^{N-2}\\
&=\frac{N(N-1)}{4} 
\end{align}
$$
Hence $E[m^2]= N(N-1)/4  - E[m]=N^2/4 +N/4$  and $\sigma_m^2=N/4$
