0

I want to use the python function scipy.stats.nbinom.isf(q, n, p) to calculate how many times i have to simulate in my Monte-Carlo simulation until i have 95% of successes. But I have some problems understanding the official documentation. What does the q in the input refer to ? Is it the fraction of success, so 95% in my case ? And what does the survival function return?

Thank you in advance :)

  • Please provide enough code so others can better understand or reproduce the problem. – Community Nov 08 '21 at 13:11
  • The documentation is unclear, but I think 'q' here means 'quantile', so 0.95 in your case. This post discusses the inverse in more detail: https://math.stackexchange.com/questions/1426069/finding-the-inverse-of-the-binomial-cumulative-distribution-function – dcorney Nov 10 '21 at 08:54

0 Answers0