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

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

<p><a href="https://i.sstatic.net/qJ05t.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qJ05t.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2017-04-06T03:57:42.697Z
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?
DigitalPerson
CC BY-SA 3.0
2017-04-06T07:04:23.760Z
@Digi An online source for the evaluation of the quantiles is https://www.wolframalpha.com/input/?i=Quantile%5BErlangDistribution%5B6,+1%2F10%5D,+0.99%5D
stat_facts
CC BY-SA 3.0
2017-04-05T17:13:13.040Z
2017-04-05T22:10:08.877Z
2017-04-05T22:10:08.877Z
stat_facts
<p><strong>TL;DR: Same result as <a href="https://bitcoin.stackexchange.com/a/52598/5406">stat_facts</a>, but another way of explaining it. ;)</strong></p>

<p>Discovery of blocks is a <a href="https://bitcoin.stackexchange.com/q/22978/5406">Poisson process</a>.</p>

<p>The probability that <code>x</code> blocks are found in the time that we expected <code>λ</code> blocks to be found is:</p>

<p><a href="https://i.sstatic.net/yJ0GT.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yJ0GT.gif" alt="enter image description here"></a></p>

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

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

<pre><code>p(x≥6|λ) = 1 - p(5|λ) - p(4|λ) - p(3|λ) - p(2|λ) - p(1|λ) - p(0|λ) = 0.99
</code></pre>

<p>Plugging the <code>x</code> values into the above formula we get:</p>

<p><a href="https://i.sstatic.net/J5PGX.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/J5PGX.gif" alt="enter image description here"></a></p>

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

<p><a href="https://i.sstatic.net/HsICm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/HsICm.png" alt="enter image description here"></a></p>

<p>Finally, you were asking for <code>p(x≥6|λ) = 0.99</code> which turns out to be at about <code>λ ≈ 13.1085</code>. 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.</p>

CC BY-SA 3.0
2017-04-06T14:19:52.527Z
2017-04-06T14:19:52.527Z
2017-04-13T12:47:33.743Z
Murch
<p>I had this question in an exam but I was not very sure how to solve it:</p>

<p>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</p>

<p>Do you have in idea about the formula that we have to use to find the answer?</p>

CC BY-SA 3.0
2017-04-05T05:48:19.727Z
It's a [Poisson process](https://www.probabilitycourse.com/chapter11/11_1_2_basic_concepts_of_the_poisson_process.php).
Nate Eldredge
<confirmations>
how long does it take to get 6 confirmations with confidence of 99%
Digi
# how long does it take to get 6 confirmations with confidence of 99%

(Asked by: username_0 on 2017-04-05)

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?

**Tags:** confirmations

> **Comments:**
> **username_1**: It's a [Poisson process](https://www.probabilitycourse.com/chapter11/11_1_2_basic_concepts_of_the_poisson_process.php).  

---

## 2 answers

### Answer by username_2 on 2017-04-05. Score: 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](https://i.sstatic.net/qJ05t.png)](https://i.sstatic.net/qJ05t.png)

> **Comments:**
> **username_3**: 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?  
> **username_2**: @username_0 An online source for the evaluation of the quantiles is https://www.wolframalpha.com/input/?i=Quantile%5BErlangDistribution%5B6,+1%2F10%5D,+0.99%5D  

---

### Answer by username_4 on 2017-04-06. Score: 0

TL;DR: Same result as username_2, 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:

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:

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

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.


---

