- #1
Kalinka35
- 50
- 0
Homework Statement
We are flipping a coin with probability p of getting heads n times.
A "change" occurs when an outcome is different than the one before it. For example, the sequence HTHH has 2 changes.
If p=1/2 what is the probability that there are k changes?
Homework Equations
I've been working with the probability mass function of a binomial random variable:
(n C k) pk(1-p)n-k
The Attempt at a Solution
For the n flips there are n-1 possible "gaps" between flips when change could occur.
I then reasoned that at the end of every flip since you a flipping a fair coin, there is a 1/2 chance of getting a change and a 1/2 chance of not getting a change. My resulting formulation for probability of k changes in n flips was:
(n-1 C k)((1/2)k)((1/2)n-k)
but I worked out explicitly the probabilities of k changes for n=2, 3, and 4 and this function did not give me at all correct answers. I'm not sure how I should approach it differently.