Bitcoin Forum
April 19, 2024, 09:52:53 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Math question: what is the average time to the next block?  (Read 2745 times)
jav (OP)
Sr. Member
****
Offline Offline

Activity: 249
Merit: 251


View Profile
April 07, 2011, 07:59:11 AM
 #1

I'm trying to get a better grip on the correct math to use on block distribution: If the average time between blocks is 10 minutes, does that mean that the average time - from a random point in time - until the next block is 5 minutes? Or is that reasoning flawed for this kind of distribution?

Also: Can you fill in the correct values for A and B in this statement: "The average waiting time until the next confirmation block is between A and B minutes in 95% of all cases". It would be nice if you could explain how you go about calculating that. :-)

Hive, a beautiful wallet with an app platform for Mac OS X, Android and Mobile Web. Translators wanted! iOS and OS X devs see BitcoinKit. Tweets @hivewallet. Donations appreciated at 1HLRg9C1GsfEVH555hgcjzDeas14jen2Cn.
1713520373
Hero Member
*
Offline Offline

Posts: 1713520373

View Profile Personal Message (Offline)

Ignore
1713520373
Reply with quote  #2

1713520373
Report to moderator
1713520373
Hero Member
*
Offline Offline

Posts: 1713520373

View Profile Personal Message (Offline)

Ignore
1713520373
Reply with quote  #2

1713520373
Report to moderator
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713520373
Hero Member
*
Offline Offline

Posts: 1713520373

View Profile Personal Message (Offline)

Ignore
1713520373
Reply with quote  #2

1713520373
Report to moderator
1713520373
Hero Member
*
Offline Offline

Posts: 1713520373

View Profile Personal Message (Offline)

Ignore
1713520373
Reply with quote  #2

1713520373
Report to moderator
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
April 07, 2011, 08:52:34 AM
 #2

Assuming the hashing power of miners is constant over time, the average number of generations per unit of time is also constant, and the generations are independent from eachother. This leads to an exponential distribution for the time between two generations (see http://en.wikipedia.org/wiki/Exponential_distribution).

To estimate the parameter lambda of this distribution, we need the total hash rate of the network (currently around 600GH/s) and the difficulty (82347.22294654). Since each tried hash has a chance of 1 in 4295032833*difficulty to result in a block, lambda is network_speed/(4295032833*difficulty), or around 0.0016964/s currently.

The mean time between two generations is 1/lambda, or 589.47s currently. This is independent from any information from the past. In fact, it doesn't even matter how long it was since the previous generation. Even if there hasn't been a block for 5 hours (highly unlikely), it will still take on average 589.47s before a block is founds.

Other statistical information you can derive: the standard deviation is also 1/lambda, or 589.47s.
To find the 95% range, use the formula F(x;lambda) = 1 - exp(-lambda*x) = 0.95, or x=-log(1-0.95)/lambda, or 1765.9s currently.
To find the chance of not finding a block in a period of T seconds, use exp(-lambda*T), which is about 0.22% for T=1 hour. For T=1 day, it becomes 0.000000000000000000000000000000000000000000000000000000000000022%.

About your last question, you could say we want A and B to correspond to 2.5% and 97.5%, leading to intervals between 14.92s and 2174.53s (36 minutes).

Note that the network tries to have lambda=1/600s, but as long as hash rate is increasing (which is true most of the time), it is actually systematically faster.

I do Bitcoin stuff.
jav (OP)
Sr. Member
****
Offline Offline

Activity: 249
Merit: 251


View Profile
April 07, 2011, 10:43:42 AM
 #3

Thx for the detailed explanation, that was very helpful!

Hive, a beautiful wallet with an app platform for Mac OS X, Android and Mobile Web. Translators wanted! iOS and OS X devs see BitcoinKit. Tweets @hivewallet. Donations appreciated at 1HLRg9C1GsfEVH555hgcjzDeas14jen2Cn.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!