Inverse function for a sort of negative binomial distribution

I am trying to find the inverse function of $f(p) = \sum_{k=0}^{6}{\binom{6-H+k}{k} p^{7-H} (1-p)^k}$, where $0 \leq H \leq 6$ is a constant integer. Any ideas on how to do this? Or perhaps equally useful would be a distribution for $\hat p$ given observations of $f(p)$.

To give some background to this question, this function represents the probability that a player wins a race to 7 in some game where he has a probability $p$ of winning an individual game in the series and has a handicap of $H$ games (so he only needs to win $7-H$ games, while his opponent needs to win 7). It looks something like a negative binomial distribution, except for the fact that the summation limit does not go to infinity. Here's the blog post I wrote where this function came up: http://www.gtmath.com/2015/07/handicapping-race-to-7.html. In that post, I just used Excel goal seek to back out some values of interest, but I am still looking for an inverse function, admittedly mostly out of intellectual curiosity.

So far, I've tried to expand the $1-p$ using the binomial formula, which results in a double summation, and then reverse the order of summation (making sure to adjust the summation limits) and try to simplify using identities for the binomial coefficients. Once you have the coefficients of $p^n$, I was thinking there may be an analytical solution (hence the analysis tag on this post). But I was having trouble actually making the problem simpler that way. Any ideas would be much appreciated.

Thanks!

What you are looking for is the Negative Binomial Distribution $NB(r;p)$ which gives the probability of a number of successes before a given number of failures.
For your race to 7 problem set $r=7$, $p=p$; the handicapped person loses if the number of successes is less than $H$ i.e. the probability of losing is $\sum_{k=0}^{H-1}NB(r;p)$. The probability of winning is simply 1 minus this.
The cumulative distribution function of this distribution is $1-I_p(k+1,r)$. So the chance of winning is $I_p(H,r)$ where $I_p$ is the regularized incomplete Beta function.
• Thanks for your reply, Dale, but I don't understand why your sum goes up to $H-1$. In any case, this is not the answer that I'm looking for- I have already derived the probability of winning/losing the series given $p$, and that is $f(p)$ above. What I am looking for is the inverse function of $f$: given a probability $W$ of winning the series, I want a function that returns $p$. Thus a function $g: \left[ 0,1 \right] \rightarrow \left[ 0,1 \right]$ such that $f(g(W)) = W$. – GTM Aug 8 '15 at 14:00
• Or alternatively, a distribution of cales of $\hat p$ given observed series winning percentages or something along those lines. Thanks! – GTM Aug 8 '15 at 14:03