1

I have n servers and I want to know the number of servers I need to make the probability that at least 10 servers are active to be 0.99. The probability that a server fails is equal to 0.01.

So what I have so far is that I know I need at least 10 servers to be active. So the probability would be:

sum (from k = 10 to n) of (n choose k)*(0.99 ^ k)*(0.01^(n-k)) = 0.99

and I would have to do this for every n from 10 to n. I want to know is there any shorter way? Like what if I did the probability that exactly 9 servers failed and I did one minus that probability like this:

1 - (n choose 9)*(0.01^9)*(0.99^(n-9)) = 0.99

Would this give me the right answer? Please help :)

Update, I used an online calculator to solve for the latter equation (1 - probability that exactly 9 failed) and I got the maximum number of servers that could be used to make the probability of at least 10 servers to be active to be greater than 0.99 would be 380 servers, any more than that would result in a probability of at least 10 servers to be active to be less than 0.99.

I'm not sure if this is correct though. :)

Gjison Giocf
  • 145
  • 1
  • 11
  • 1
    Well, you could use binomial CDF for that purpose: https://en.wikipedia.org/wiki/Binomial_distribution. It is expressed via regularized incomplete beta function, and, f.e., in Python could be computed using https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.special.betainc.html – Severin Pappadeux Nov 24 '19 at 15:22

1 Answers1

1

Since you want at least X=10 successes in n trials, each trial with success p=0.99, you could consider the conjugate and figure out n in (P(X<=9|n=N,p=0.99) < 0.01).

You can use the binomial cdf for this part

enter image description here

In your case it becomes

enter image description here

Now we want to figure out how many trials n we need to make the evaluation of the above cdf less than 0.01.

You could for example use python to search numerically for this:

from scipy.stats import binom
for n in range(1000):
    p = binom.cdf(9, n, 0.99)
    if p < 0.01:
        print(n)
        break

And you would see that no more than 11 servers are needed to ensure a probability of 0.99 that at least 10 servers are active :-)

Bjarke Kingo
  • 400
  • 7
  • 14
  • but wouldnt this loop break at the first value because its less than 0.01? – Gjison Giocf Nov 26 '19 at 17:33
  • wouldnt you want to break it as soon as p > 0.01? because the sum would start of from 0 so the loop would break on the first iteration, if you have p > 0.01 it would calculate the sum until the sum is greater than 0.01 if it is, it would break and n would be the answer, right? – Gjison Giocf Nov 26 '19 at 17:48
  • 1
    oh nvm, i see how to do it – Gjison Giocf Nov 26 '19 at 17:52