# Variance Problem

• Feb 11th 2013, 12:42 AM
VinceW
Variance Problem
Someone is looking for a cat in one of thirty trees. The probability of the cat being an any tree is the same for all trees.

What is the expected value and variance of the number of trees that need to be searched to find the cat?

My work:

The probability of finding the cat in precisely the kth tree and not an earlier tree is always $\displaystyle \frac{1}{30}$

The mean is easy:

$\displaystyle E(X) = \sum\limits_{k=1}^{30} k \cdot \frac{1}{30} = \frac{1}{30} \sum\limits_{k=1}^{30} k = \frac{1}{30} \frac{30 \cdot (30 + 1)}{2} = \frac{31}{2}$

To calculate variance, we first find:

$\displaystyle E\left(X^2\right) = \frac{1}{30} \sum\limits_{k=1}^{30} k^2 = \frac{1}{6} \cdot 30 \cdot 31 \cdot 61 = 9455$

So, the variance is:

$\displaystyle \text{var}(X) = E\left(X^2\right) - (E[X])^2 = 9455 - \left(\frac{31}{2}\right)^2 = 9214.8$

That variance seems too high to be right. Is it wrong? How so?
• Feb 11th 2013, 05:06 PM
chiro
Re: Variance Problem
Hey VinceW.

You are right in that the variance is too high.

The sum of squares is (30*31*61)/6 but then multiplying this by 1/30 gives

> 30*31*61/(6*30)
[1] 315.1667

Our variance is now 315.1667 - (31/2)^2 or
> 30*31*61/(6*30) - (31/2)^2
[1] 74.91667
• Feb 18th 2013, 08:17 AM
VinceW
Re: Variance Problem
You're right! I dropped the 1/30 term in my computations. Thanks!