221k views
2 votes
Suppose we flip a fair coin n times. We say that the sequence is balanced when there are equal number of heads and tails. For example, if we flip the coin 10 times and the results are HT HHT HT T HH, then this sequence balanced 2 times, i.e. at position 2 and position 8 (after the second and eighth flips). In terms of n, what is the expected number of times the sequence is balanced within n flips?

1 Answer

6 votes

Answer:

Explanation:

Given:

fair coin is flipped n times

sequence is balanced when there are equal number of heads and tails

To find:

In terms of n, what is the expected number of times the sequence is balanced within n flips

Solution:

Let C(n,r) be the binomial co-efficient. The sample space has
2^(n)

Suppose that n is even because there are equal number of heads and tails and the number of heads and tails is not equal when n is odd.

As the result can be either head or tail so the probability of getting head is 1/2. So the number of these sequences with n/2 head is C(n,n/2) since we choose n/2 out of n to be assigned heads.

As every string sequence is equal chance of occurring so the probability is

C(n,n/2) /
2^(n)

User Mispy
by
5.0k points