Exercise 1

The label on a small package of Bertie Bott’s Every Flavour Beans claims that 3 beans are caramel flavored, 6 are butterscotch, and 4 are earwax. Unable to tell them apart just by looking at them, Ron Weasley selects 5 beans at random. Find the probability that Ron ends up with \(\ldots\)

(a) \(\ldots\) 1 caramel flavored, 2 butterscotch, and 2 earwax beans.

Solution:

\[ \begin{gathered} 13 \text{ Total} \\ \swarrow \ \ \ \downarrow \ \ \ \searrow \\ 3C \ \ \ \ \ 6B \ \ \ \ \ 4E \\ \downarrow \ \ \ \ \ \ \ \downarrow \ \ \ \ \ \ \ \downarrow \\ 1C \ \ \ \ \ 2B \ \ \ \ \ 2E \end{gathered} \]

\[ P(1C, 2B, 2E) = \frac{{}_{3}C_{1} \cdot {}_{6}C_{2} \cdot {}_{4}C_{2}}{{}_{13}C_{5}} = \frac{3 \cdot 15 \cdot 6}{1287} = \boxed{\frac{30}{143}} \approx \boxed{0.2098} \]

(b) \(\ldots\) no earwax flavored beans.

Solution:

Here we only care if the beans are earwax flavored or not. Note that there are 9 beans that are not earwax flavored, which we will call “other.”

\[ \begin{gathered} 13 \text{ Total} \\ \swarrow \ \ \ \searrow \\ 4E \ \ \ \ \ \ \ \ 9O \\ \downarrow \ \ \ \ \ \ \ \ \ \ \downarrow \\ 0E \ \ \ \ \ \ \ \ 5O \end{gathered} \]

\[ P(0E) = \frac{{}_{4}C_{0} \cdot {}_{9}C_{5}}{{}_{13}C_{5}} = \frac{1 \cdot 126}{1287} = \boxed{\frac{14}{143}} \approx \boxed{0.0979} \]

(c) \(\ldots\) at least 2 caramel flavored beans.

Solution:

Here we only care if the beans are caramel flavored or not.

\[ P(\text{at least } 2C) = P(2C) + P(3C) = \frac{{}_{3}C_{2} \cdot {}_{10}C_{3}}{{}_{13}C_{5}} + \frac{{}_{3}C_{3} \cdot {}_{10}C_{2}}{{}_{13}C_{5}} = \boxed{\frac{45}{143}} \approx \boxed{0.3147} \]

Or, alternatively,

\[ P(\text{at least } 2C) = 1 - P(0C) + P(1C) = 1 - \frac{{}_{3}C_{0} \cdot {}_{10}C_{5}}{{}_{13}C_{5}} - \frac{{}_{3}C_{1} \cdot {}_{10}C_{4}}{{}_{13}C_{5}} = \boxed{\frac{45}{143}} \approx \boxed{0.3147} \]

Exercise 2

Let \(X\) denote the number of times Ron Weasley manages to irritate Professor Snape in one day. Then \(X\) has the following probability distribution:

\(x\) \(f(x)\)
0 0.15
1 0.20
2 0.20
3 0.30
4 0.15

(a) Find the probability that Ron will get in trouble with Professor Snape at least two times in one day.

Solution:

\[ P(X \geq 2) = P(X = 2) + P(X = 3) + P(X = 4) = 0.20 + 0.30 + 0.15 = \boxed{0.65} \]

Alternatively,

\[ P(X \geq 2) = 1 - P(X = 0) - P(X = 1) = 1 - 0.15 - 0.20 = \boxed{0.65} \]

(b) Find the expected number of times Ron will get in trouble with Professor Snape, \(\text{E}[X]\).

Solution:

First, we add two useful columns to our table.

\(x\) \(f(x)\) \(x \cdot f(x)\) \(x^2 \cdot f(x)\)
0 0.15 0 0
1 0.20 0.20 0.20
2 0.20 0.4 0.80
3 0.30 0.9 2.7
4 0.15 0.60 2.4

So, we have,

\[ \sum_{x = 0}^{4} f(x) = 1, \quad \sum_{x = 0}^{4} x \cdot f(x) = 2.1, \quad \sum_{x = 0}^{4} x^2 \cdot f(x) = 6.1 \]

Thus,

\[ \text{E}[X] = \sum_{x = 0}^{4} x \cdot f(x) = \boxed{2.1} \]

(c) Find the standard deviation of the number of times Ron will get in trouble with Professor Snape, \(\text{SD}[X]\).

Solution:

\[ \text{Var}[X] = \text{E}[X^2] - \left( \text{E}[X] \right)^2 = \sum_{x = 0}^{4} \left(x^2 \cdot f(x) \right) - \left( \text{E}[X] \right)^2 = 6.1 - 2.1^2 = 1.69 \]

\[ \text{SD}[X] = \sqrt{\text{Var}[X]} = \sqrt{1.69} = \boxed{1.3} \]

(d) Each day, Professor Snape takes 20 points from Gryffindor, simply because he can. Additionally, Professor Snape takes 10 points from Gryffindor each time Ron Weasley irritates him. If these are the only two sources of point deductions for Gryffindor, what is the expected point loss for Gryffindor each day?

Solution:

Define \(Y\) to be the number of points deducted from Gryffindor in a day.

Then, we have

\[ Y = 10 \cdot X + 20 \]

Thus,

\[ \text{E}[Y] = \text{E}[10 \cdot X + 20] = 10 \cdot \text{E}[X] + 20 = 10 \cdot 2.1 + 20 = \boxed{41} \]

Alternatively, we could recreate the table above for the distribution of our new random variable \(Y\).

\(y\) \(f(y)\)
20 0.15
30 0.20
40 0.20
50 0.30
60 0.15

Then we would simply repeat the process from above.

(e) What is the standard deviation of points lost for Gryffindor each day?

Solution:

\[ \text{Var}[Y] = 10^2 \cdot \text{Var}[X] = 100 \cdot 1.69 = 169 \]

\[ \text{SD}[Y] = \sqrt{\text{Var}[Y]} = \sqrt{169} = \boxed{13} \]

Exercise 3

Consider a random variable \(X\) with the probability mass function

\[ f(x) = \frac{6}{3^x}, \quad x = 2, 3, 4, 5, \ldots \]

Calculate the expected value of \(X\).

Solution:

\[ \begin{aligned} \text{E}[X] &= \sum_{\text{all } x}^{\infty} xf(x) = \sum_{x = 2}^{\infty} x \frac{6}{3^x} \\[0.5em] \text{E}[X] \ &= 2 \cdot \frac{6}{3^2} + 3 \cdot \frac{6}{3^3} + 4 \cdot \frac{6}{3^4} + 5 \cdot \frac{6}{3^5} + \ldots \\[0.5em] \frac{1}{3} \cdot \text{E}[X] &= \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 2 \cdot \frac{6}{3^3} + 3 \cdot \frac{6}{3^4} + 4 \cdot \frac{6}{3^5} + \ldots\\[0.5em] \text{E}[X] - \frac{1}{3} \cdot \text{E}[X] = \frac{2}{3} \cdot \text{E}[X] &= 2 \cdot \frac{6}{3^2} + 1 \cdot \frac{6}{3^3} + 1 \cdot \frac{6}{3^4} + 1 \cdot \frac{6}{3^5} + \ldots \end{aligned} \]

We now have a series that we can use.

\[ \begin{aligned} \frac{2}{3} \cdot \text{E}[X] &= 2 \cdot \frac{6}{3^2} + 1 \cdot \frac{6}{3^3} + 1 \cdot \frac{6}{3^4} + 1 \cdot \frac{6}{3^5} + \ldots \\[0.5em] &= 1 \cdot \frac{6}{3^2} + 1 \cdot \frac{6}{3^2} + 1 \cdot \frac{6}{3^3} + 1 \cdot \frac{6}{3^4} + 1 \cdot \frac{6}{3^5} + \ldots \\[0.5em] &= \frac{2}{3} + \sum_{x = 2}^{\infty} \frac{6}{3^x} \\[0.5em] &= \frac{2}{3} + 1 \\[0.5em] &= \frac{5}{3} \end{aligned} \]

Thus, finally we have

\[ \frac{2}{3} \cdot \text{E}[X] = \frac{5}{3} \]

Then, as a result, we have

\[ \text{E}[X] = \boxed{\frac{5}{2}} \]

Exercise 4

Consider a random variable \(Y\) with the probability mass function

\[ f(y) = c \cdot \frac{2^y}{y!}, \quad y = 2, 3, 4, 5, \ldots \]

where \(c = \displaystyle\frac{1}{e^2 - 3}\).

Calculate the expected value of \(Y\).

Solution:

\[ \begin{aligned} \text{E}[Y] &= \sum_{\text{all } y} y \cdot f(y) = \sum_{y = 2}^{\infty} c y \frac{2^y}{y!} \\[0.5em] &= c \left( \sum_{y = 2}^{\infty} \frac{2^y}{(y - 1)!} \right) = 2c \left( \sum_{y = 2}^{\infty} \frac{2^{y - 1}}{(y - 1)!} \right) \\[0.5em] &= 2c \left( \sum_{z = 1}^{\infty} \frac{2^{z}}{z!} \right) = 2c \left( \sum_{z = 0}^{\infty} \frac{2^{z}}{z!} - 1\right) \\[0.5em] &= 2c \left( e^2 - 1\right) \\[0.5em] &= \boxed{\frac{2(e^2 - 1)}{e^2 - 3}} \approx \boxed{2.911} \end{aligned} \]