Finding the distribution of an experiment

312 Views Asked by At

Consider a sequence of independent coin flips, each of which has probability $p$ of being heads. Define a random variable $X$ as the length of the run (of either heads or tails) started by the first trial. (For example, $X = 3$ if either $TTTH$ or $HHHT$ is observed). Find $P(X=k)$ for $k = 1,2,3,\ldots$

Wouldn't this be a negative binomial pdf? So $$P(X = k,r,p) = {r+k \choose k}p^r (1 - p)^k \ \ \ k = 1,2,3\ldots$$

1

There are 1 best solutions below

0
On BEST ANSWER

If $X=k$ then the sequence can be $\underbrace{TTT...T}_{=k}H$. This is one single order. You flip $\text{k times}$ tail with the probability $(1-p)$ and finally a head with probability $p$. Thus the probability for this sequence is $(1-p)^k\cdot p$.

But if $X=k$ then the sequence can be $\underbrace{HHH...H}_{=k}T$ as well. The probability for such a sequence is $p^k\cdot (1-p)$.

And the probability for the first sequence OR the second sequence is $P(X=k)=(1-p)^k\cdot p+p^k\cdot (1-p)$