Try   HackMD

16 - Infinite Probability Spaces, the Law of Total Probability

Infinite probability spaces

Recall: A sample space is a non-empty countable set.

Countable: There is a 1:1 relation between the elements of a set and the integers

Example: toss a coin until the first head

Set of outcomes

S={H,TH,TTH,TTTH,....}={TnH:nN}

For any non-negative integer

n there is a outcome where exactly
n
tails are tossed before a heads.

Pr(H)=12
Pr(TH)=14

Pr(TTH)=18

Pr(TnH)=12n+1

ωSPr(ω)=n=0Pr(TnH)
=n=0(12)n+1=limNn=0N(12)n+1
These two things are the same thing

Claim:

i=0Nxi=1xN+11x,(0<x<1)

x0+x1+x2+x3+...xN=1xN+11x
(1x)(x0+x1+x2+x3+...xN)=1xN+1
(multiply both sides by
1x
)
(x0+x1+x2+x3+...xN)x1x2x3x4...xNxN+1=x0xN+1=1xN+1

Therefore:

i=0xi=limN1xN+11x=11x

Back to this:

n=0N(12)n+1=12n=0N(12)n=12(11(1/2))=121(1/2)=1

We verified that if we add up the probability of all the events in the sample space, we get 1.


Studying a game "First head wins"
Two people Alice and Bob, take turns flipping a coin, first person to toss a head wins

A=Alice wins={H,TTH,TTTTH,...}
={T2nH:nN}

Pr(A)=ωAPr(ω)=n=0Pr(T2nH)
=n=0(12)2n+1=12n=0(12)2n

12n=0(14)n=12(11(1/4))=12(13/4)=12×43=23

Takeaway: Probability that first player wins is

23


"Second head wins"

S={TnHTmH:n,mN}
At least n +m + 2 coins need to be tossed before the game is won
Pr(TnHTmH)=(12)n+m+2

A=Alice wins
A1=Alice tosses the first head and later wins

A2=Bob tosses the first head and leter alice wins

A1 and
A2
are disjoint

Pr(A)=Pr(A1A2)=Pr(A1)+Pr(A2)

For alice to toss the first head, the first number of tails needs to be even and the second number of tails needs to be odd

A1={T2kHT2l+1H:k,lN}

Pr(A1)=k=0l=0Pr(T2kHT2l+1H)
=k=0(l=0(12)2k+2l+3)

=k=0((12)2k+3l=0(12)2l)

=k=0(12)2k+3×43

Pr(A1)=43×(12)3×k=0=(12)3(43)2=29

A2={T2k+1HT2lH:k,lN}

Pr(A2)=k=0l=0(12)2k+2l+3=29

Pr(A1A2)=49<12 So alice is at a disadvantage

Law of total probability

If there are two events

A and
B
where
Pr(B)>0
then:
Pr(A)=Pr(B)×Pr(A|B)+Pr(B¯)×Pr(A|B¯)

Proof:
=Pr(B)×Pr(AB)Pr(B)+Pr(B¯)×Pr(AB¯)Pr(B¯)=Pr(AB)+Pr(AB¯)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Back to the coin game

X=Alice gets the first head
Pr(X)=Pr(X)×Pr(A|X)+Pr(X¯)×Pr(A|X¯)

Pr(X)=23
Pr(X¯)=123=13

X¯=Bob tossed the first head If he tosses the first head, then the chances of alice tossing the first head after that is
23

X=Alice tosses the first head meaning that now Bob is the first to toss after that. The chance that bob gets the first head is
23
and Alice now has a probability of
13
of winning

Pr(X)=Pr(X)×Pr(A|X)+Pr(X¯)×Pr(A|X¯)
Pr(X)=23×13+13×23=49

tags: COMP2804 Probability