What is the probability of getting r heads before s tails?

  • Thread starter Thread starter Eclair_de_XII
  • Start date Start date
  • Tags Tags
    Probability
Click For Summary
The discussion revolves around calculating the probability of obtaining r consecutive heads before s consecutive tails when tossing a coin with a bias p. Participants analyze the conditional probabilities P(E|H_1) and P(E|T_1), where H_1 and T_1 denote the outcomes of the first toss. They emphasize the importance of conditioning on the first toss to derive equations for these probabilities, leading to a system of equations that can be solved. The conversation also touches on the relevance of binomial distribution and renewal theory in approaching the problem. Ultimately, the key takeaway is that understanding the conditioning and the structure of the problem is crucial for finding the correct probabilities.
  • #31
So is it ##\frac{p}{q}(\frac{1-q^{s-1}}{p})=\frac{1-q^{s-1}}{q}##, then...?
 
Physics news on Phys.org
  • #32
Eclair_de_XII said:
So is it ##\frac{p}{q}(\frac{1-q^{s-1}}{p})=\frac{1-q^{s-1}}{q}##, then...?

I'm not sure how you're getting to this? You should be able to telescope this quite easily. I wrote out the derivation in a couple of lines but I decided not to post it yet. You need to show some work here.
 
  • #33
This is how I'm getting it: ##\sum_{k=1}^{s-1} pq^{k-1}=\frac{p}{q}\sum_{k=1}^{s-1} q^{k}=\frac{p}{q}(\frac{1-q^{s-1}}{1-q})=\frac{p}{q}(\frac{1-q^{s-1}}{p})##.
 
  • #34
Eclair_de_XII said:
This is how I'm getting it: ##\sum_{k=1}^{s-1} pq^{k-1}=\frac{p}{q}\sum_{k=1}^{s-1} q^{k}=\frac{p}{q}(\frac{1-q^{s-1}}{1-q})=\frac{p}{q}(\frac{1-q^{s-1}}{p})##.

Two fundamental issues:
1.) You still have not shown your work for the telescoping process
2.) ##\sum_{k=1}^{s-1} q^{k}\neq (\frac{1-q^{s-1}}{1-q})##
this obviously cannot be true. Selecting ##q = 0## doesn't work because ##0 \neq 1##. Now select some small ##\delta \gt 0## and set ##q := \delta##. The left hand side is approximately 0 while the right hand side is approximately 1. This is not an equality.
 
  • #35
I don't know what you mean by telescoping process. Do you mean that the finite sum is a telescoping series?
 
  • #36
Eclair_de_XII said:
I don't know what you mean by telescoping process. Do you mean that the finite sum is a telescoping series?

I mean show your work such that you telescope a series with ##s-1## terms in it and convert it into a fraction that has much less terms. I have not seen your work here. My sense is you're just guessing or otherwise skipping steps.
 
  • #37
it's killing me here because your post 25 and 27 are so close and I think you're within shouting distance of the finish line. All I'm getting at is

we have ## p \in (0,1)## and ##q = 1-p##, referencing the left side of post 30

##y:= \sum_{k=1}^{s-1} pq^{k-1} = p\big( 1+ q + q^2 + ... q^{s-2}\big) ##

I created ##y## for convenience. What you actually want is ##y \cdot P(E|H_1) = P(E|H_1)\cdot p\big( 1+ q + q^2 + ... q^{s-2}\big) ##, so we'll just multiply by ##P(E|H_1)## at the end.

the magic of telescoping is, we find some pattern in the sum and exploit it.

In this case, multiply each side by ##(1-q)## noting that ##(1-q) \gt 0##, so you get

##(1-q)y = (1-q) p\big( 1+ q + q^2 + ... q^{s-2}\big) = p\big( 1 - q^{s-1}\big) ##

divide each side by ##(1-q)## and get

##y =\frac{ p\big( 1 - q^{s-1}\big)}{1-q} = \frac{ p\big( 1 - q^{s-1}\big)}{p}= 1 - q^{s-1}##

so you what you're looking for is
##P(E|T_1) = y \cdot P(E|H_1) = P(E|H_1) \big(1 - q^{s-1}\big) ##
- - - -
If you swap this into your second line on post 16, and solve the system of equations good things should happen...
 
  • #38
First of all, I'm so sorry for being so clueless about finite sums and geometric series; Calculus II was so very long ago for me, and from what I remember of the class, I covered mostly infinite series. Anyway:

##P(E|H_1)+(p^{r-1}-1)P(E|T_1)=p^{r-1}##
##(q^{s-1}-1)P(E|H_1)+P(E|T_1)=0##

##A= \begin{pmatrix}
1 & (p^{r-1}-1) \\
(q^{s-1}-1) & 1 \\
\end{pmatrix}##

##det(A)=1+(1-q^{s-1})(p^{r-1}-1)##

##A^{-1} = \frac{1}{det(A)}\begin{pmatrix}
1 & (1-p^{r-1}) \\
(1-q^{s-1}) & 1 \\
\end{pmatrix}##

##\begin{pmatrix}
P(E|H_1) \\
P(E|T_1) \\
\end{pmatrix}
=\frac{1}{det(A)} \begin{pmatrix}
1 & (1-p^{r-1}) \\
(1-q^{s-1}) & 1 \\
\end{pmatrix} \begin{pmatrix}
p^{r-1} \\
0 \\
\end{pmatrix} =\frac{1}{1+(1-q^{s-1})(p^{r-1}-1)}\begin{pmatrix}
p^{r-1} \\
p^{r-1}(1-q^{s-1}) \\
\end{pmatrix}##

So ##P(E)=\frac{p^r+qp^{r-1}(1-q^{s-1})}{1+(1-q^{s-1})(p^{r-1}-1)}##
 
  • Like
Likes StoneTemplePython

Similar threads

  • · Replies 15 ·
Replies
15
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
12
Views
4K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K