Skip to main content
### Number and algebra

### Geometry and measure

### Probability and statistics

### Working mathematically

### For younger learners

### Advanced mathematics

# Can You Find ... Random Variable Edition

*(a) ... the mean (expectation) is 2, the variance is 1, and $X$ takes only positive (integer) values? Can you find another? And a very different example?*

*(b) ... the mean is 2, the variance is 1, and $X$ takes negative or zero values in addition to positive values? Can you find another? And a very different example?*
*(c) ... $X$ takes only positive values, but its mean is infinite? Can you find another?*

## You may also like

### Time to Evolve 2

### Statistics - Maths of Real Life

Links to the University of Cambridge website
Links to the NRICH website Home page

Nurturing young mathematicians: teacher webinars

30 April (Primary), 1 May (Secondary)

30 April (Primary), 1 May (Secondary)

Or search by topic

Age 16 to 18

Challenge Level

- Problem
- Getting Started
- Student Solutions
- Teachers' Resources

- $\mathrm{P}(X=1)=\mathrm{P}(X=3)=\frac{1}{2}$, for example.
- If $Y$ has Poisson distribution with parameter 1, so $\mathrm{E}(Y)=\mathrm{Var}(Y)=1$, then $X=Y+1$ does what we want.
- If $Y$ has a geometric distribution with $p=\frac{1}{2}$ (so $Y$ can take values 1, 2, 3, ...), then $\mathrm{E}(Y)=\mathrm{Var}(Y)=2$. We can then modify this by increasing the probability of getting 2 itself to reduce the variance. So define $X$ by $$\mathrm{P}(X=x) = \begin{cases} \tfrac{1}{2}+\tfrac{1}{2}\mathrm{P}(Y=2) & \text{if $x=2$} \\ \tfrac{1}{2}\mathrm{P}(Y=x) & \text{otherwise} \end{cases}$$ and this can be calculated to work.

- $\mathrm{P}(X=0)=\mathrm{P}(X=4)=\frac{1}{4}$, $\mathrm{P}(X=2)=\tfrac{1}{2}$ for example; this can be generalised to $\mathrm{P}(X=2-k)=\mathrm{P}(X=2+k)=\frac{1}{k^2}$, $\mathrm{P}(X=2)=1-\tfrac{1}{k^2}$
- If $Y$ has a binomial distribution, $Y\sim \mathrm{B}(n,p)$, so that $Y$ takes the value 0, we can mix this with an increased probability for 2 as follows (this was found by playing around with possibilities): take $n\ge 4$, $p=\frac{2}{n}$ and $p'=\frac{1}{2(1-p)}=\frac{n}{2n-4}$. Then if we define $X$ by $$\mathrm{P}(X=x) = \begin{cases} (1-p')+p'\mathrm{P}(Y=2) & \text{if $x=2$} \\ p'\mathrm{P}(Y=x) & \text{otherwise,} \end{cases}$$ we find that $X$ has the required properties. In the case that $n=4$, we get $Y=X$, as this binomial distribution works.

- The mean of $X$ is $$\mathrm{E}(X)=\sum_{n=1}^\infty n.\mathrm{P}(X=n).$$ So we need a sum which is infinite. But we also require $\sum_{n=1}^\infty \mathrm{P}(X=n)=1$, so the sum can't be too "dramatically" infinite. If we, for example, took $\mathrm{P}(X=n)$ for each $n$, then the sum for $\mathrm{E}(X)$ would indeed sum to infinity, but the sum of the probabilities would also be infinite. If we took $n.\mathrm{P}(X=n)=1$ for each $n$, then the sum for $\mathrm{E}(X)$ would be infinite, but the sum of probabilities is $\sum_{n=1}^\infty \frac{1}{n}$. In Harmonically, we discovered that this sum is also infinite (though - in some sense - only just so: it grows towards infinity really really slowly). So this won't work either. But what about taking $n.\mathrm{P}(X=n)=\frac{1}{n}$? Then the sum for $\mathrm{E}(X)$ is infinite, but the sum of probabilities is $\sum_{n=1}^\infty\frac{1}{n^2}$. This is finite (see A Swiss Sum) so we are almost done: if this finite sum is $k$, then we can take $\mathrm{P}(X=n)=\frac{1}{kn}$ so that the probabilities sum to 1 but the mean is infinite.
- We can extend this idea by taking $\mathrm{P}(X=n)=\dfrac{1}{kn^s}$ for any $s$ with $1< s\le 2$, where $k$ is chosen to make the sum of probabilities equal 1; then the expectation will again be infinite. We don't even need to use the same value of $s$ for each $n$, though there are some restrictions on how quickly $s$ can approach 1 in such a case.

- The idea is the same as the previous part. If we choose $\mathrm{P}(X=n)=\dfrac{1}{kn^3}$, then the mean will be finite but the variance will be infinite. Now modifying it slightly by setting $\mathrm{P}(X=-1)=p$ and $\mathrm{P}(X=n)=\dfrac{1-p}{kn^3}$ for $n\ge1$, by choosing $p$ appropriately, we will end up with a mean of 0 but an infinite variance.

How is the length of time between the birth of an animal and the birth of its great great ... great grandparent distributed?

This pilot collection of resources is designed to introduce key statistical ideas and help students to deepen their understanding.