Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Remember remember the 5th of November on April 27, 2015, 07:42:03 AM



Title: Just a thought about variance.
Post by: Remember remember the 5th of November on April 27, 2015, 07:42:03 AM
It occurred to me, when playing dice games there's like some chance of having really long losing streaks, but they are not impossible. So isn't it then possible for mining to have some chance of having longer and longer rounds with no blocks, for the entire network?


Title: Re: Just a thought about variance.
Post by: TierNolan on April 27, 2015, 12:08:18 PM
Yes.

The odds of a block being found is around 10% per minute.

>10 mins: 34.9%
> 20 mins: 12.2%
> 60 mins: 0.18%
> 120 mins: 0.00032%

95% of blocks occur within around 50 mins.


Title: Re: Just a thought about variance.
Post by: David Rabahy on April 27, 2015, 06:03:30 PM
What has been the longest period of time between blocks to date?


Title: Re: Just a thought about variance.
Post by: tspacepilot on April 27, 2015, 06:14:44 PM
I started a very similar thread just a few days ago.  There are some really good infos and links in here: https://bitcointalk.org/index.php?topic=1036835.0


Title: Re: Just a thought about variance.
Post by: DannyHamilton on April 27, 2015, 06:27:03 PM
What has been the longest period of time between blocks to date?

The longest time between two blocks so far would probably be the time between the first and second block:
5 days 8 hours 39 minutes 20 seconds

After that, I think the next longest might be between Block 27 and Block 28:
Block 27: 2009-01-10 06:56:13
Block 28: 2009-01-10 15:30:57

That's 8 hours 34 minutes 44 seconds



Title: Re: Just a thought about variance.
Post by: Remember remember the 5th of November on April 27, 2015, 08:03:43 PM
So what would realistically happen if we were to in say 10 years have such bad variance? Like say, 24hrs with no block?


Title: Re: Just a thought about variance.
Post by: tspacepilot on April 27, 2015, 08:29:11 PM
So what would realistically happen if we were to in say 10 years have such bad variance? Like say, 24hrs with no block?

I think the chances of that happening are nanoscopically low.  Those long block times early in the blockchain are explained by the lack of hashing power on the network at the time, right?   There is so much hashing power on the network now that it's hard to imagine such a thing happening.  If it did happen, what would happen then is that I guess everyone would have a freakout or something.  Perhaps we'd see a huge selloff of bitcoin, but then again, those selloff tranasctions would also be waiting for confirmations until that next block :)


Title: Re: Just a thought about variance.
Post by: spin on April 27, 2015, 09:07:02 PM
So what would realistically happen if we were to in say 10 years have such bad variance? Like say, 24hrs with no block?

I think the chances of that happening are nanoscopically low.  Those long block times early in the blockchain are explained by the lack of hashing power on the network at the time, right?   There is so much hashing power on the network now that it's hard to imagine such a thing happening.  If it did happen, what would happen then is that I guess everyone would have a freakout or something.  Perhaps we'd see a huge selloff of bitcoin, but then again, those selloff tranasctions would also be waiting for confirmations until that next block :)

The hash rate was below the level to needed to maintain the lowest difficulty.  IF the hash rate is that low the difficulty can't adjust so you get longer block times.


Title: Re: Just a thought about variance.
Post by: spin on April 27, 2015, 09:14:41 PM
Yes.

The odds of a block being found is around 10% per minute.

>10 mins: 34.9%
> 20 mins: 12.2%
> 60 mins: 0.18%
> 120 mins: 0.00032%

95% of blocks occur within around 50 mins.
You can get more accurate numbers using exponential distribution (http://en.wikipedia.org/wiki/Exponential_distribution#Cumulative_distribution_function)
Prob =1 - F(x) = exp(-lambda*x)
lambda = 1/10

You then get:
min   probability 1 in
10   36.7879%   2.7
20   13.5335%   7.4
30   4.9787%   20.1
40   1.8316%   54.6
50   0.6738%   148.4
60   0.2479%   403.4
70   0.0912%   1096.6
80   0.0335%   2981.0
90   0.0123%   8103.1
100   0.0045%   22026.5
110   0.0017%   59874.1
120   0.0006%   162754.8

So chances of a block taking longer than 2 hours is 0.0006% (or 1 in 162 755 blocks).  Assuming difficulty and hash rate is in perfect balance and stable.


Title: Re: Just a thought about variance.
Post by: virtualx on April 28, 2015, 10:04:03 AM
Yes.

The odds of a block being found is around 10% per minute.

>10 mins: 34.9%
> 20 mins: 12.2%
> 60 mins: 0.18%
> 120 mins: 0.00032%

95% of blocks occur within around 50 mins.
You can get more accurate numbers using exponential distribution (http://en.wikipedia.org/wiki/Exponential_distribution#Cumulative_distribution_function)
Prob =1 - F(x) = exp(-lambda*x)
lambda = 1/10

You then get:
min   probability 1 in
10   36.7879%   2.7
20   13.5335%   7.4
30   4.9787%   20.1
40   1.8316%   54.6
50   0.6738%   148.4
60   0.2479%   403.4
70   0.0912%   1096.6
80   0.0335%   2981.0
90   0.0123%   8103.1
100   0.0045%   22026.5
110   0.0017%   59874.1
120   0.0006%   162754.8

So chances of a block taking longer than 2 hours is 0.0006% (or 1 in 162 755 blocks).  Assuming difficulty and hash rate is in perfect balance and stable.

Given that we are at block ~ 355000, is it fair to say once in several years?


Title: Re: Just a thought about variance.
Post by: spin on April 28, 2015, 12:53:31 PM
Given that we are at block ~ 355000, is it fair to say once in several years?
Sort of approximately yeah. 

It's not entirely accurate as difficulty and hash rate is not really in a perfect stable relationship.  In theory you'd have to have hash rate stable for those years for it to be strictly true.  In reality hash rate varies and the difficulty adjustments do not adjust immediately, i.e. it lags the hash rate.  So lambda is not really constant.

Also during periods hash rate is so low that difficulty is at a minimum your block times will increase.  This was the situation when bitcoin started.


Title: Re: Just a thought about variance.
Post by: tspacepilot on April 28, 2015, 03:33:27 PM
Given that we are at block ~ 355000, is it fair to say once in several years?
Sort of approximately yeah. 

It's not entirely accurate as difficulty and hash rate is not really in a perfect stable relationship.  In theory you'd have to have hash rate stable for those years for it to be strictly true.  In reality hash rate varies and the difficulty adjustments do not adjust immediately, i.e. it lags the hash rate.  So lambda is not really constant.

Also during periods hash rate is so low that difficulty is at a minimum your block times will increase.  This was the situation when bitcoin started.


Yes, and as you were saying above, in the early moments when those long-block times occurred, the hash-rate was exceptionally low.  That's a situation which is unlikely to happen again (until/unless bitcoin's demise becomes immenent---ie, the reciprocal of when it was starting out).