Two teams A and B play a series of games until one team wins four games. We assume that the games are played independently and that the probability that A wins any game is p. What is the probability that the series lasts exactly five games?
P[5 games]=P[5 games | A wins]+P[5 games | B wins]
P[5 games | A wins]=p4(1−p)P[5 games | B wins]=p(1−p)4P5 games=p4(1−p)+p(1−p)4=p(1−p)[p3+(1−p)3]