# E/Var of a random variable on three events

E, F and G are independent events with probabilities $\frac12,\frac14,\frac15$ of occurring. Let $X$ be the number of events that occur.

A. Describe $X$ and calculate its expectation and variance.
B. The same, but this time assume the events are mutually exclusive.

I really don't know how to proceed. I have tried to set the support of $X$ as $\{0,1,2,3\}$ and then write the probability of each event as $P[E](X=1)=\frac12$ but I don't think it's the real solution.

• By the "number of events" I assume you mean " the number of events of the type $E,F,G$", yes? If so: Then $X$ can be $\{0,1,2,3\}$. What is the probability that $X=0$? What about $X=3$? And so on.
– lulu
Mar 28 '17 at 15:17
• Hint: $$X=\mathbf 1_E+\mathbf 1_F+\mathbf 1_G$$ gives the expectation. For the variance, note that $$X^2=\mathbf 1_E+\mathbf 1_F+\mathbf 1_G+2\mathbf 1_{E\cap F}+2\mathbf 1_{F\cap G}+2\mathbf 1_{G\cap E}$$
– Did
Mar 28 '17 at 15:17
• @lulu Your "And so on" implies some rather tedious computations, unnecessarily so...
– Did
Mar 28 '17 at 15:18
• @Did The asker might not even know what $\mathbf1_E$ means. Does it mean "indicator variate for $E$"? Mar 28 '17 at 15:26
• @ParclyTaxel The OP might even know what this notation means (and anyway, learning its meaning once and for all might be the most fruitful outcome of them posting this question on the site). Yes, for every $A\subseteq\Omega$, the function $\mathbf 1_A:\Omega\to\mathbb R$ is defined by $\mathbf 1_A(\omega)=1$ for every $\omega$ in $A$ and $\mathbf 1_A(\omega)=0$ for every $\omega$ not in $A$.
– Did
Mar 28 '17 at 15:29

We can write $X=X_E+X_F+X_G$ where $X_E=1$ if $E$ occurs and $X_E=0$ if $E$ does not occur, etc. That is to say, we break down counting how many occur (out of three) into counting how many (out of one) of each individual variable occurs.

Since $E$ occurs with probability $\frac12$, $\mathbb E(X_E)=\frac 120+\frac121=\frac12$, and $\operatorname{var}(X_E)=\frac 120^2+\frac 121^2-\big(\frac12\big)^2=\frac14$. You can calculate the others similarly.

Now for any variables the expectation of the sum is the sum of expectations. This gives you the expectation in parts A and B (they are the same).

For independent variables the variance of the sum is the sum of the variances. This allows you to work out the variance for A.

The variance for B is not the same. In B $X$ must be $0$ or $1$ (why?), so it is simple to calculate its variance (as you did for the other $0$-$1$ variables above).

• thanks! Really exhaustively Mar 29 '17 at 10:33