We have $n$ girls and $n$ boys sitting around a table. We choose arbitrary one. Let $X$ be the number of girl neighbours of the chosen one. What is $E(X)$?
Is this correct? Let $L/R$ be $1$ if left/right neighbour is girl and $0$ if not. Then $X = L+R$ and $E(X) = E(L)+E(R) = {1\over 2}+ {1\over 2} =1$. Or should I also take in a consideration a gender of chosen one?
Let $Y$ be $1$ if chosen one is boy and other vise $0$. Then
\begin{eqnarray*} P(L=1) &=& P(Y=1)\cdot P(L=1|Y=1)+P(Y=0)\cdot P(L=1|Y=0)\\ &=& {1\over 2} \cdot {n\over 2n-1}+ {1\over 2} \cdot {n-1\over 2n-1}\\ &=& {1\over 2} \end{eqnarray*}
Your answer is correct for $n\ge2$. You can tell that the gender of the chosen person is irrelevant by observing that the problem can be re-stated it in a way that excludes the chosen person:
However, always remember to check for the edge cases. $E(X)$ is not defined for $n=0$, so you don't have to worry about that, but it is defined for $n=1$. In that case, the left and the right neighbour are one and the same, so $X=L=R$, there is no sense in adding $E(L)$ and $E(R)$.