# Changeover with biased coin

An extension of flipping a fair coin and evaluating the number of changeovers (i.e. a head to a tail or a tail to a head) in $n$ trials, we can work out the distribution to be binomial: $${{n-1} \choose k} \cdot \left(\frac{1}{2}\right)^{n-1}$$ for $k$ changeovers in $n$ flips of the coin.

How would we go about modifying this for use with a biased coin, i.e. $P(\text{head})=\frac{3}{5}$?

• P.S. Sorry people! I understand that the above holds as you are equally likely to choose a head or a tail if the coin is unbiased. When the coin is biased, however, naturally this fails. Is it necessary to take two separate distributions, one representing when you go from a tail to a head and vice-versa, or is that over-complicating the issue? – user548298 Apr 3 '18 at 1:41

Suppose the probability of heads is $p$, but different flips are still independent. Let $A_n(k|f)$ be the conditional probability of $k$ changeovers in $n$ trials given that the first flip is $f$ (either H or T). Of course in $1$ flip we have $0$ changeovers, so $A_1(k|H) = A_1(k|T)$.
\eqalign{A_n(k|H) &= p A_{n-1}(k|H) + (1-p) A_{n-1}(k-1|T)\cr A_n(k|T) &= p A_{n-1}(k-1|H) + (1-p) A_{n-1}(k|T)\cr}
In terms of the probability generating functions $G_n(t|f) = \sum_{k=0}^{n-1} A_{n}(k|f) t^k$, we have
\eqalign{G_n(t|H) &= p G_{n-1}(t|H) + (1-p) t G_{n-1}(t|T)\cr G_n(t|T) &= p t G_{n-1}(t|H) + (1-p) G_{n-1}(t|T)\cr} or $V_n(t) = M V_{n-1}(t)$, where $V_n(t)$ is the vector $\pmatrix{G_n(t|H)\cr G_n(t|T)}$ and $M$ is the matrix $\pmatrix{p & (1-p) t\cr p t & 1-p\cr}$. You can diagonalize $M$ and get explicit formulas for $G_n(t|f)$ and the combined probability generating function $G_n(t) = p G_n(t|H) + (1-p) G_n(t|T)$, but it will be complicated. Certainly not a binomial.