Consider the random graph $G(n,1/2)$ and let $d(v)$ be the degree of the vertex $v \in V(G)$. By considering the indicator RV $X_w$ for the evenet $\{v,w\} \in E(G)$ it is easy to see that
$$\mathbb{E}[d(v)] = \sum_{\substack{w = 1 \\ w \ne v}}^n \mathbb{E}[X_w] = \frac{n-1}{2}.$$
But I do not see how to compute the variance of $d(v)$. I know that it is supposed to be $V[d(v)] = \frac{n-1}{4}$, but when I try to prove this I do not get further than:
$$\mathbb{V}[d(v)] = \mathbb{E}[d(v)^2] - \mathbb{E}[d(v)]^2.$$
Could you please tell me how to compute $\mathbb{E}[d(v)^2]$?
Follow your lead, we have $$ \begin{equation} \begin{aligned} &d(v)=\sum_{w \not = v}X_w\\ \implies & d(v)^2=\left(\sum_{w \not = v}X_w \right)^2=\sum_{w \not = v}X_w^2+\sum_{s,t \not = v,s\not=t}X_sX_t\\ \implies & \mathbb{E}[d(v)^2]=\mathbb{E}\left[X_w^2+\sum_{s,t \not = v,s\not=t}X_sX_t\right]\\ \implies & \mathbb{E}[d(v)^2]=\frac{n-1}{2}+\frac{(n-1)(n-2)}{4}=\frac{n^2-n}{4}\\ \implies& \mathbb{V}[d(v)]=\frac{n^2-n}{4}-\frac{(n-1)^2}{4}=\frac{n-1}{4} \end{aligned} \end{equation} $$