Negative binomial problem?

*Suppose that two teams are playing a series of games, each of which is independently won by team A with probability p and by team B with probability 1-p. The winner of the series is the first team to win i games.*

If i=4, find the probability that a total of 7 games are played. Also show that this probability is maximized when p=0.5

I thought that this is a pretty straight forward negative binomial problem, but I don't seem to be getting the correct answer. Here's my work:

The problem is that the probability of 7 games being played doesn't seem to be maximized when p=0.5.

For example, if I set p=0.6 then I get:

I assume that I'm reading the question wrong, using the wrong distribution, committing a math error, or some combination of the three. Any help is appreciated.

Re: Negative binomial problem?

hello there

actually every function of the form

m*p^4*(1-p)^3

where m is an integer has amaximum at

x=4/7

now in ur case m is abolinomial coefficient so it must be an integer

Re: Negative binomial problem?

Thank you for replying, but I don't understand what you mean.

Is this not a negative binomial problem? Is my math wrong?

Re: Negative binomial problem?

I figured out the problem. I wasn't taking into account that either team can win the series. Therefore it's:

Where

p is the probability of team A winning a game

and

(1-p) is the probability of team B winning a game