Variance in a Discrete Probability Distribution (Homework) For my Homework I have four values: $N_1, N_2, A, C$.
Two values are chosen at random without replacement.
X denotes how many N values are chosen.
$$P(x=0) = \frac16 \qquad
P(x=1) = \frac23 \qquad
P(x=2) = \frac16 $$
find the mean and variance.
I have taken the mean to be $\frac{(0+1+2)}{3} = \frac33 = 1$ However, I think this is wrong, and that the distribution must be taken into account.
The Variance is to be determined by the equation $ \text {Var}(x)=E(x^2)-E(x)^2$
However I am not certain what value to assign $x$. 

For any function $f$, the expectation of $f(X)$ is given by: $\newcommand{\E}{\mathrm{E}}$ 
$$ \E(f(X)) = \sum_{i=0}^2 \ \Pr[X = i] \cdot f(i) = \sum_{i=0}^2 \ p_i f(i) .$$
The expectation of $X$ is
$$
\E(X) = 0 \cdot p_0 + 1 \cdot p_1 + 2 \cdot p_2 = \frac{1}{6} \cdot 0 + \frac{2}{3} \cdot 1 + \frac{1}{6} \cdot 2 = 1.
$$
$$
\E(X^2) = 0 \cdot p_0 + 1^2 \cdot p_1 + 2^2 \cdot p_2 = \frac{1}{6} \cdot 0^2 + \frac{2}{3} \cdot 1^2 + \frac{1}{6} \cdot 2^2 = \frac{4}{3}.
$$
The variance of $X$ is
$$
\mathrm{Var}(X) = \E(X^2) - \E(X)^2 = \frac{4}{3} - 1^2 = \frac{1}{3}.
$$
