Calculate number of trials reaching $p_k$ probability for $k$ successes given the $p_t$ probability of each trial success

63 Views Asked by At

Basically, I'd like to be able to answer questions in the form of "What is the number of trials needed to have at least $p_k$ probability of at least $k$ successes, given that on each trial the probability of success is $p_t$?".

Let $x$ be the number of trials, then the equation for the problem is: $$\sum_{i=k}^x \frac{p_t^k(1-p_t)^{x-k}x!}{i!(x-i)!}\geq p_k\tag{*}\label{*} $$ We can also determine lower bound for $x$:$$x>\frac{p_k}k{p_t}$$

After some googling, I discovered that this exact question has already been answered, but for small $k$'s normal approximation isn't applicable. I want to understand the problem deeper, so my questions are:

  1. There's no analytical solution for \eqref{*}, since gamma-function is a special function and can't be integrated. Is that correct?
  2. What's the best way to solve this numerically? May be there's another useful approximation or something more suitable than a simple root-finding algorithm.