5 - CORRELATION The covariance of two random variables gives some measure of their independence. A second way of assessing the measure of independence will be discussed shortly but first the expectation and variance of the Binomial distribution will be determined. The calculations turn out to be surprisingly tedious. Expectation of the Binomial Distribution - I The Binomial distribution can be defined as: P(X =r)= (2) pran-+ where p + q = 1 and 0 <r <n The expectation is: n E(X) = >r.P (X = r) = >r.( r=0 r=0 E(X) = > n n! r r! (n-r)! p'q n n r )p"q"-" When r = 0 the term is zero so it is in order to begin the sum from r = 1: r=1 n = X r n-r p'q' r=1 n (r - 1)! (n-r) !! n! = np r=1 (n-1)! P r-1 -r (r -1)! (n-r)! q Next, let s = r - 1 which, of course, means replacing r by s + 1. Noting that the sum is currently from r = 1 to r = n, the replacement will mean s running from s = 0 to S =n -1: (n-1)! E(X)= np X 00 s! (n- s - 1)!' s=0 n-1 Then, let m = n - 1: m m! s! (m - s)! ,m-s E(X)= np s=0 Finally note that by the Binomial theorem, m! s! (m- s)! 00 q (q+ p)m => s=0 m Given that p + q = 1 the summation itself is 1 and hence: E(X) = np - 5.1 -
Expectation of the Binomial Distribution - II This seems a horribly tedious way of determining the expectation. Fortunately there is a quicker way. Consider the most trivial Binomial distribution where a random variable is distributed Binomial(1, p). A tabular representation of this trivial case is: r > X 0 1 P(X=r) q p The expectation is: r=0 1 E(X)=>r.P(X=r)=0.q+1.p = p Now consider n such random variables X1, X2, ... , Xn. Such variables are said to be Independent and Identically Distributed, commonly simply called IID. The expectation of their sum is: E(X1+ X2+…+ Xn)=E(X1)+E(X2)+…+E(Xn)=p+p+.+p=np Since the variables are Identically Distributed they each have the same expectation and the sum of these expectations is simply n times the expectation of the original variable. Taking n variables which are each distributed Binomial(1, p) is exactly equivalent to having an overall distribution Binomial(n, p). For example, in a family of four children, each child is distributed Binomial(1, p) and the overall distribution is Binomial(4, p). This is clearly a quicker way of determining the expectation of the Binomial distribution and an extension of this technique leads to the variance. . . Variance of the Binomial Distribution The random variable which is distributed Binomial(1, p) has expectation E(X) = p. The expectation of the square is: 1 E(X2) = >r2.P(X = r) = 02.q + 12.p = p r=0 The variance can now be computed: V(X) = E(X2) - (E(X))2