Expected number of light bulbs on There are 50 light bulbs in a room each with its own switch.
Initially all light bulbs are off.
Dick follows the following procedure 50 times:
He randomly selects a light bulb and flips the switch, turning it on if it is off and off if it is on.
What is the expected number of light bulbs on in the room after 50 flips, rounded to the nearest natural number?
 A: $\newcommand{E}{\mathbf{E}}$
Let $E_i$ be the event that bulb $i$ is on after $50$ flips. This is the case if switch $i$ is chosen an odd number of times. Compute $\Pr(E_i)$ and let $X_i$ be the indicator random variable for $E_i$. Then $\E[X_i] = \Pr(E_i)$. Now, let $X$ be the total number of bulbs on after $50$ flips. $X=\sum_{i=1}^{50}X_i$, so $\E[X] = \sum_{i=1}^{50} \E[X_i] = 50 \cdot \Pr(E_i)$. So you just need to compute the probability that a given switch is flipped an odd number of times in 50 flips.
One way to compute $\Pr(E_i)$ is as follows. Let $P_k$ be the probability that switch $i$ is flipped an odd number of times in the first $k$ flips. Let $p = 1/50$. Then $P_0 = 0$, and $P_k = p(1-P_{k-1}) + (1-p)P_{k-1}$ for any $k>0$. You can compute $P_{50}$ by repeatedly applying this recurrence, which gives you the value of $\Pr(E_i)$.
A: The probabilities that a given bulb is flipped $0$, $2$, or $4$ times are
$$
\binom{50}{0}\left(\frac{1}{50}\right)^{0}\left(\frac{49}{50}\right)^{50}=.364\\
\binom{50}{2}\left(\frac{1}{50}\right)^{2}\left(\frac{49}{50}\right)^{48}=.186\\
\binom{50}{4}\left(\frac{1}{50}\right)^{4}\left(\frac{49}{50}\right)^{46}=.0145\\
$$
Therefore, the probability that a given bulb flipped an even number of times is approximately
$$
.364+.186+.0145 = .565
$$
Since the probability that a given bulb will be flipped any more than $5$ times is so low that it only negligibly contributes to the expectation.
Thus, we can expect $0.565\cdot50\approx 28\,$ bulbs to have been flipped an even number of times.  Thus, the expectation is that $28\,$ bulbs will be off, and the remaining $22$ will be on.

The full computation tells you that we expect this many bulbs to be off at the end of the experiment.  Again, the answer is that (to the nearest integer) $22$ bulbs should be on.
A: Warning: check for errors.
The probability that a given switch (of $n$ switches) will be flipped an odd number of times in $k$ turns is given by
\begin{gather*}
f(0) = 0 \\
f(k+1) = \frac{n-1}{n}f(k)+\frac 1 n (1-f(k))
\end{gather*}
Then
$$f(k+1)=\frac 1 n + \frac{n-2}{n}f(k)$$
The steady state for this difference equation is clearly $\frac 1 2$, so we can simplify it to 
$$f(k+1)-\frac 1 2 = \frac{n-2}{n}(f(k)-\tfrac 1 2)$$
The solution is $f(k) - \frac 1 2 = -\frac 1 2 \left(\frac{n-2}{n}\right)^{k}$
So $$f(n) = \frac 1 2 - \frac 1 2 \left(1-\frac 2 n\right)^n.$$
This last form should look familiar. If $n$ is large,
$$f(n)\approx \frac 1 2 - \frac 1 2 e^{-2}\approx 0.432.$$
A: As noted above, the expected value of a sum is the sum of the expected values.  One can determine the probability a random variable is odd via one if its transforms (e.g., its moment generating function).
I would give more detail if I didn't think this is homework.  If it is not and you want more information, ask in comments and I will respond there.  If it is, you should have noted so in your tags.
I get $25[1 - (24/25)^{50}] \approx 22$ as an answer.  (If I didn't have a calculator, I don't know if I would have been able to give the approximation.)
A: Consider a single switch.  The total number of times the switch is flipped is a Binomial random variable with n = 50, p = 1/50.  We would like to know the probability that the switch is flipped an odd number of times.  So let's say the switch is flipped i times.  Note that
$(49/50 + x/50)^{50} = \sum_{i=0}^{50} \binom{50}{i} (x/50)^i (49/50)^{50-i}$
and
$(49/50 - x/50)^{50} = \sum_{i=0}^{50} (-1)^i \binom{50}{i} (x/50)^i (49/50)^{50-i}$
Subtracting the second equation from the first,
$(49/50 + x/50)^{50} - (49/50 - x/50)^{50} = 2 \sum_{i \; odd} \binom{50}{i} (x/50)^i (49/50)^{50-i}$
Letting x=1, we have
$(49/50 + 1/50)^{50} - (49/50 - 1/50)^{50} = 2 \Pr(\text{i is odd})$
Whence $\Pr(\text{i is odd}) \approx 0.43506$ and the expected number of switches on is 
$50 \cdot \Pr(\text{i is odd}) \approx 21.75$
