Bitcoin Forum
July 06, 2015, 07:05:54 AM *
News: ♦♦♦ If you are using any wallet other than Bitcoin Core 0.10.x or 0.9.5, then you should not trust incoming transactions until they have ~30 confirmations. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Math question: what is the average time to the next block?  (Read 1514 times)
jav
Sr. Member
****
Offline Offline

Activity: 249


View Profile

Ignore
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.
COINROYALE BITCOIN CASINO GET UP TO 1 BTC FREE Use Code: FORUM100 PLAY NOW
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1436166354
Hero Member
*
Offline Offline

Posts: 1436166354

View Profile Personal Message (Offline)

Ignore
1436166354
Reply with quote  #2

1436166354
Report to moderator
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1022


View Profile WWW

Ignore
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.

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
jav
Sr. Member
****
Offline Offline

Activity: 249


View Profile

Ignore
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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!