# Paper 2, Section II, F

Let $A_{1}, A_{2}, \ldots, A_{n}$ be events in some probability space. Let $X$ be the number of $A_{i}$ that occur (so $X$ is a random variable). Show that

$\mathbb{E}(X)=\sum_{i=1}^{n} \mathbb{P}\left(A_{i}\right)$

and

$\operatorname{Var}(X)=\sum_{i=1}^{n} \sum_{j=1}^{n}\left(\mathbb{P}\left(A_{i} \cap A_{j}\right)-\mathbb{P}\left(A_{i}\right) \mathbb{P}\left(A_{j}\right)\right)$

[Hint: Write $X=\sum_{i=1}^{n} X_{i}$ where $X_{i}=\left\{\begin{array}{ll}1 & \text { if } A_{i} \text { occurs } \\ 0 & \text { if not }\end{array}\right.$.]

A collection of $n$ lightbulbs are arranged in a circle. Each bulb is on independently with probability $p$. Let $X$ be the number of bulbs such that both that bulb and the next bulb clockwise are on. Find $\mathbb{E}(X)$ and $\operatorname{Var}(X)$.

Let $B$ be the event that there is at least one pair of adjacent bulbs that are both on.

Use Markov's inequality to show that if $p=n^{-0.6}$ then $\mathbb{P}(B) \rightarrow 0$ as $n \rightarrow \infty$.

Use Chebychev's inequality to show that if $p=n^{-0.4}$ then $\mathbb{P}(B) \rightarrow 1$ as $n \rightarrow \infty$.