Variance from Coin Tossing

Let X X be the random variable denoting the number of heads out of 100 independent, fair coin tosses. What is the variance of X X ?

Details and assumptions

The variance of a random variable measures the extent to which values are spread out. It can be calculated as Var ( X ) = ( X X ˉ ) 2 f ( x ) \mbox{Var}(X) = \sum (X- \bar{X})^2 f(x) .


The answer is 25.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

11 solutions

Consider the case when 1 coin is flipped. Let Y be the random variable of the number of heads. The possible numbers of heads are 0, or 1. So, the random variable Y takes the range { 0 , 1 } \{0, 1\} . Note that P r o b ( Y = 1 ) = 0.5 , P r o b ( Y = 0 ) = 0.5 Prob(Y=1)= 0.5, Prob(Y=0)= 0.5 so Thus, mean value of Y= 0.5. Thus, variance of Y = 0.5 ( 1 0.5 ) 2 + 0.5 ( 1 0.5 ) 2 = 0.5 0.25 + 0.5 0.25 = 0.2 Y= 0.5(1-0.5)^2 + 0.5(1-0.5)^2 = 0.5 * 0.25 + 0.5 * 0.25 = 0.2 .5 Now variance of X = 100 X= 100* (Variance of Y) [this can easily be verified from the formula that if X 1 , X 2 , . . . , X n X_1, X_2, ..., X_n are n n independent random variables, V a r ( X 1 + X 2 + . . . + X n ) = V a r ( X 1 ) + V a r ( X 2 ) + . . . + V a r ( X n ) Var(X_1 + X_2 + ... + X_n) = Var(X_1) + Var(X_2) + ... + Var(X_n) .] So, variance of X = 100 0.25 = 25 X= 100*0.25 = 25 .

Most solutions merely quoted the result of variance for a binomial distribution. This follows easily from the linearity of variance for independent random variables.

Calvin Lin Staff - 7 years ago
Luciano Riosa
May 20, 2014

The toss of a coin is a random variable with Binomial distribution, since it has two only spread out values: "heads" and "tails". Let

Probability(X|x=head)=p

Probability(X|x=tail)=q=(1-p).

Of course, p and q are both equal to 1/2.

Considering that in a Binomial Random Variable the variance is expressed by

                                    Var=npq

the variance of our variable is simply

                                  100x0.5x0.5=25

and its standard deviation

                              sigma=sqrt(25)=5

which means, among other things, that in repetitive 100 coin tosses the number of "heads" (or "tails") will be

                             50 plus or minus 5

with a probability of about 68%.

Tony Jiang
May 20, 2014

In statistics, this is known as a binomial distribution . The variance of a binomial distribution is n p ( 1 p ) np(1-p) , where n n is the number of trials and p is the probability of, for this problem, a head. This turns out to be 25 × 1 2 × 1 2 = 25 25 \times \frac{1}{2} \times \frac{1}{2} = 25 .

Neil Chua Goy
May 20, 2014

There is a formula for the variance of a binomial experiment, and this clearly is a binomial experiment. Var(X) = N (1-p) (p) where N is the number of trials and p is the probability of success

=> Var(X) = 100 (1/2) (1-1/2) = 25

Iqubal Reyaz
May 20, 2014

Let us assumed that the coin is NOT necessarily fair and that it turns heads with probability of p.

Therefore it turns tails with probability of (1-p).

Let B1=1 if the first toss gives a head and zero if it is tails.

Likewise let B2=1 if the 2nd toss gives a head and zero if it is tails.

And so on, define, B3, B4, B5... B100

Hence total number of heads X is given by SUM(i=1 to 100 of Bi). i.e. X = B1 + B2 + B3 + .... + B100

Now, observe that for each B, E(B) = 1 * p + 0 * (1-p) = p

And variance of B is Var(B) = E(B^2) - (E(B))^2 = p - p^2 = p * (1 - p)

Now the mean, or mathematical expectation is LINEAR.

In other words

E(X) = E(B1) + E(B2) + ... + E(B100) = 100 * p

Also since the B's are independent, the variance of their sum is the sum of their variances

Var(X) = Var(B1) + Var(B2) + ... + Var(B100) = 100 * p * (1-p)

And of course, standard deviation is the square root of Var(X) so std dev(X) = sqrt(100 * p * (1-p))

Now if the coin is fair, then p = 1/2

So that using the formulas we found E(X) = 100/2 = 50 Var(X) = 100 (1/2)*(1/2) = 25

Eng Ngee H'ng
May 20, 2014

Let n = 100 be the number of trials, which here is coin tosses.

Independent, fair coin tosses have 2 outcomes, heads and tails with 50 : 50 or 1: 1 probability of success / failure.

Let p be probability of success, and q be probability of failure, with heads defined as success.

p = 0.5 or 1/2 and q = 0.5 as well.

Now the formula for variance is Variance = npq. Substitute n = 100, p = 0.5 and q = 0.5 and Var(X) = 25.

Joseph Kuan
May 20, 2014

It is known that the variance of a binomial distribution is np(1-p), where n is the number of trials and p is the probability of success for each trial. Hence we obtain the answer 25.

Omar Obeya
May 20, 2014

Although there might be simpler answers, I encourage you to see the trick within this proof

When x denotes the number of heads out of n independent fair coin tosses and E[x] denotes mean of x = n 2 \frac {n}{2}

Variance of X = x = 1 n ( x E [ x ] ) 2 ( n x ) 2 n \displaystyle \sum_{x=1}^n (x- E[x])^2 * \frac {{n \choose x}}{2^n}

= x = 1 n ( x 2 2 x E [ x ] + E [ x ] 2 ) n ! ( n x ) ! x ! 2 n \frac {\sum_{x=1}^n (x^2 - 2xE[x] + E[x]^2) * \frac {n!}{(n-x)!x!} }{2^n}

Now we want the summation of 3 different terms and we will analyze each one individually: First x = 1 n ( E [ x ] 2 ) n ! ( n x ) ! x ! \sum_{x=1}^n (E[x]^2) * \frac {n!}{(n-x)!x!}

x = 1 n ( E [ x ] 2 ) n ! ( n x ) ! x ! \sum_{x=1}^n (E[x]^2)\frac {n!}{(n-x)!x!} = All possible combinations (subsets) of set of size n = 2 n 2^n

since E [ x ] 2 E[x]^2 is constant, x = 1 n ( E [ x ] 2 ) n ! ( n x ) ! x ! = E [ x ] 2 2 n \sum_{x=1}^n (E[x]^2) * \frac {n!}{(n-x)!x!} = E[x]^2*2^n

Second x = 1 n 2 x E [ x ] n ! ( n x ) ! x ! \sum_{x=1}^n -2 *x *E[x] * \frac {n!}{(n-x)!x!}

= x = 1 n 2 E [ x ] n ! ( n x ) ! ( x 1 ) ! \sum_{x=1}^n -2 *E[x] * \frac {n!}{(n-x)!(x-1)!}

(Here the trick comes in)

= n x = 1 n 2 E [ x ] n 1 ! ( n x ) ! ( x 1 ) ! =n * \sum_{x=1}^n -2*E[x] * \frac {n-1!}{(n-x)!(x-1)!}

x = 1 n n 1 ! ( n x ) ! ( x 1 ) ! = x = 1 n 1 n 1 ! ( n ( x 1 ) ) ! ( x 1 ) ! = 2 n 1 \sum_{x=1}^n \frac {n-1!}{(n-x)!(x-1)!} = \sum_{x=1}^{n-1} \frac {n-1!}{(n-(x-1))!(x-1)!} = 2^{n-1} This is because each term in the first expression has a corresponding term in the second expression except for the first expression when x = 0, the expression equals n ! 0 ( n 0 ) ! 0 ! = 0 \frac {n!*0}{(n-0)!0!} = 0

so the value of the second term = 2 E [ x ] n 2 n 1 -2E[x]*n*2^{n-1}

For the third expression we'll do it similarly:

x = 1 n x 2 n ! ( n x ) ! x ! \sum_{x=1}^n x^2 * \frac {n!}{(n-x)!x!}

= x = 1 n x n ! ( n x ) ! ( x 1 ) ! \sum_{x=1}^n x * \frac {n!}{(n-x)!(x-1)!}

= x = 1 n ( x 1 ) n ! ( n x ) ! ( x 1 ) ! + n ! ( n x ) ! ( x 1 ) ! \sum_{x=1}^n (x-1) * \frac {n!}{(n-x)!(x-1)!} + \frac {n!}{(n-x)!(x-1)!}

= x = 1 n n ! ( n x ) ! ( x 2 ) ! + n ! ( n x ) ! ( x 1 ) ! \sum_{x=1}^n \frac {n!}{(n-x)!(x-2)!} + \frac {n!}{(n-x)!(x-1)!}

= n ( n 1 ) 2 n 2 + n 2 n 1 n(n-1)2^{n-2}+n2^{n-1}

Then the general formula of the solution =

n ( n 1 ) 2 n 2 + n 2 n 1 + n 2 n 1 2 E [ x ] n 2 n 1 + E [ x ] 2 2 n 2 n \frac{n(n-1)2^{n-2}+n2^{n-1} + n2^{n-1} - 2E[x]n2^{n-1}+E[x]^2*2^n}{2^n}

= n ( n 1 ) 4 + n 2 E [ x ] n + E [ x ] 2 \frac{n(n-1)}{4}+ \frac{n}{2} - E[x]n+ E[x]^2

Substituting by E[x] = n 2 \frac{n}{2} You get the answer = n 4 \frac{n}{4}

Calvin Lin Staff
May 13, 2014

Let X i X_i be the random variable that the i t h i^{th} coin toss is a head. Specifically, X i = 1 X_i=1 if the i t h i^{th} coin shows a head, and X i = 0 X_i=0 if the i t h i^{th} coin shows a tail. Then, X = X 1 + X 2 + + X 100 X = X_1 + X_2 + \ldots + X_{100} .

Let E ( X i ) E(X_i) be the expectation value of X i X_i . We can calculate that E ( X i ) = 1 2 1 + 1 2 0 = 1 2 E(X_i) = \frac {1}{2} \cdot 1 + \frac {1}{2} \cdot 0 = \frac {1}{2} , and Var ( X i ) = 1 2 ( 1 1 2 ) 2 + 1 2 ( 0 1 2 ) 2 = 1 4 \mbox{Var}(X_i) = \frac {1}{2} \cdot (1-\frac {1}{2})^2 + \frac {1}{2} \cdot (0-\frac {1}{2} )^2 = \frac {1}{4} .

Since the coin tosses are independent, Cov ( X i , X j ) = 0 \mbox{Cov}(X_i, X_j)=0 for i j i\neq j . Hence, we calculate Var ( X ) = Var ( X 1 + X 2 + + X 100 ) = Var ( X 1 ) + Var ( X 2 ) + + Var ( X 100 ) + i , j , i j 100 Cov ( X i , X j ) = 100 ( 1 4 ) + ( 100 × 99 2 ) ( 0 ) = 25 \begin{aligned} \mbox{Var}(X) &= \mbox{Var}(X_1 + X_2 + \ldots + X_{100}) &\\ & = \mbox{Var}(X_1) + \mbox{Var}(X_2) + \ldots + \mbox{Var}(X_{100}) + \displaystyle { \sum_{i,j, i \neq j} ^ {100} \mbox{Cov} (X_i, X_j)} & \\ & = 100\left(\frac {1}{4}\right) + \left(\frac {100 \times 99}{2}\right) (0) & \\ & = 25 & \\ \end{aligned}

Note: X Bin ( 100 , 1 2 ) X \sim \mbox{Bin}(100, \frac {1}{2}) so we can use the formula Var ( X ) = 100 × 1 2 × ( 1 1 2 ) = 25 \mbox{Var}(X) = 100 \times \frac {1}{2} \times (1-\frac {1}{2}) = 25 .

Pang Robin
May 20, 2014

As the game is fair, the normal distribution is 50%. But the variance is normal distribution squared. Then the answer is 25%.

Billy Lu
May 20, 2014

Variance = (Sum of Differences from average)^2 / total amount.

A coin on its heads side is valued as 1, and a tails side is 0. Our coin is supposed to be fair, so the average coin toss will yield a 50% chance for a heads or tails.

Thus, the average of the coin tosses will be 0.5, according to the set values of heads and tails.

Since a coin flip will either result in a value of 1 or 0, the difference between the average value(0.5) and a coin flip(0 or 1) will be 0.5. There are 100 coin flips so the total difference will be 100 * 0.5 = 50.

From there, enter in the value into the variance formula:

Variance = (Sum of Differences from average)^2 / total amount.

Variance = (50)^2/100

Variance = 2500/100

Variance = 25 , which is the answer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...