Home page for accesible maths 5.4 Binomial random variables

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

5.4.1 Expectation and variance

Using the definitions and algebraic manipulation gives

For a Binomial random variable RBin(n,θ) E(R) = nθ Var(R) = nθ(1-θ).

The general proof is given in a worksheet solution. We instead consider a special case:

Example 5.11.

If RBin(3,θ) show that E(R)=3θ.

Solution.
E(R) = r=0rpR(r)
= r=03rpR(r)
= 0+r=13rpR(r)

Now substitute for the pmf and simplify

E(R) = r=13r(3r)θr(1-θ)3-r
= r=13r3!r!(3-r)!θr(1-θ)3-r
= 3θr=132!(r-1)!(3-r)!θr-1(1-θ)3-r

Now put s=r-1 and be cunning

E(R) = 3θs=022!(s)!(2-s)!θs(1-θ)2-s
= 3θs=02pS(s)
= 3θ.

As pS(s) is the pmf of SBin(2,θ).

Exercise 5.12.

Each time you log in to Facebook they show you some adverts. Facebook’s main revenue stream comes from people clicking on these adverts. It’s important for them to know how many advert clicks they’re likely to get. There are 968 million people log onto Facebook daily (https://zephoria.com/top-15-valuable-facebook-statistics/, accessed 22 December 2015, from the same page “Facebook users are 76% female and 66% male”…). Suppose each person clicks an advert with probability 0.01. What is the expected number of clicks in a day, and the variance of this number?

Solution.

The number of trials (individuals who log in) is n=968×106, and the probability of a success (a click) on any particular trial (log in) is θ=0.01.
Therefore the number of clicks can be modelled as RBin(968×106,0.01).
We know that E[R]=nθ=968×10610-2=9.68×106.
The variance is Var(R)=nθ(1-θ)=968×106×0.01×0.99=9.5832×106.

Example 5.13.

Suppose an experiment is carried out n times, let A be an event associated with the experiment, and let θ be the probability of the event A. Let R count the number of times that event A occurs in the n experiments. R is therefore a Bin(n,θ) random variable. Calculate the expectation and variance of R/n, the proportion of times that A occurs. Use Chebychev’s inequality to say something about how close R/n is to θ for large n.

Solution.

We know that

E(R/n) = 1nE(R)
= 1nnθ
= θ
Var(R/n) = 1n2Var(R)
= 1n2nθ(1-θ)
= θ(1-θ)n

Chebychev’s inequality tells us that

P(|R/n-E(R/n)|>cs.d.(R/n))<1c2.

Hence

P(|R/n-θ|>cθ(1-θ)/n)<1c2,

and therefore

P(|R/n-θ|cθ(1-θ)/n)1-1c2,

Taking, for example, c=10, we see the probability R/n is within 10θ(1-θ)/n of θ is at least 0.99. Since 10θ(1-θ)/n decreases to 0, R/n is likely to be very close to θ for large n. This confirms that the axioms we set up lead inexorably to our intuitive beliefs: the proportion of times an event A occurs converges to P(A).