I had this question in an exam but I was not very sure how to solve it:

Suppose Bob the merchant wants to have a policy that orders will ship within x minutes after receipt of payment. What value of x should Bob choose so that with 99% confidence 6 blocks will be found within x minutes

Do you have in idea about the formula that we have to use to find the answer?


2 Answers 2


The following holds for a generalized case on the required time for having m blocks with a confidence of p 100\%. The time X between consecutive blocks is exponential distributed, i.e. X~Exp[k] with k=1/10. The sum of m independent and identical exponential random variables follows the Erlang distribution, that means for X_i~Exp[k], X_1+X_2+...+X_m~Erlang[m,k]. The required time for having m blocks with a confidence of p 100% is given by the p-quantile of the Erlang[m,k] distribution. In your case m=6 and p=0.99. The quantile Q_Erlang[m,k](p) does not have a closed form expression. However, it is given in terms of the inverse regularized gamma function which can be evaluated numerically.

Plugging in the values leads to Q_Erlang[6,1/10](0.99)=131.085, which means that in 99% of all cases 6 blocks will be mined in less than 131 minutes.

enter image description here

  • Thank you for your detailed answer. It looks like the answer is much more advanced than my level :) Is there any formula for Q_Erlang that I can use to calculate values for different parameters on calculator? I mean how can I calculate the value of Q_Erlang[6,1/10](0.99) on a calculator? Commented Apr 6, 2017 at 3:57
  • @Digi An online source for the evaluation of the quantiles is wolframalpha.com/input/…
    – stat_facts
    Commented Apr 6, 2017 at 7:04

TL;DR: Same result as stat_facts, but another way of explaining it. ;)

Discovery of blocks is a Poisson process.

The probability that x blocks are found in the time that we expected λ blocks to be found is:

enter image description here

Now, you have specified that you want to have six blocks found with a confidence of 99%.

The sum of probabilities of all possible outcomes always is 1. This means that we can express the probability of all outcomes where at least six blocks have been found as "100% minus the probability of having found less than six blocks".

p(x≥6|λ) = 1 - p(5|λ) - p(4|λ) - p(3|λ) - p(2|λ) - p(1|λ) - p(0|λ) = 0.99

Plugging the x values into the above formula we get:

enter image description here

The resulting probability curve looks like this (y-axis is probability and x-axis is λ):

enter image description here

Finally, you were asking for p(x≥6|λ) = 0.99 which turns out to be at about λ ≈ 13.1085. Since the expected time for one block is 10 minutes, this means that in 131 minutes for 99% of the cases at least six blocks will have been found.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.