Bitcoin Forum
November 22, 2017, 01:47:10 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: The chances of finding a block in LESS than 10 minutes ?  (Read 1474 times)
spartacusrex
Hero Member
*****
Online Online

Activity: 604



View Profile
May 12, 2017, 10:32:43 AM
 #1

I was discussing this the other day, and wanted clarification..

The answer that seems obvious, but I think is incorrect, is that the the chances of finding a block in less than 10 minutes are the SAME as the chances of finding it after 10 minutes. So 50%.

But I have seen stack exchanges about 'Poisson Distribution',  'probability density' and 'exponential functions' ..

And then e^-1 pops out at ~36%.. for the chance AFTER the mean. More than 10 minutes.
And  1-e^-1 at ~64%.. for the chance BEFORE the mean.  Less than 10 minutes.

Can't see how these figures were come by.. (the first e^-1)

Can someone explain it - thank you!

1511358430
Hero Member
*
Offline Offline

Posts: 1511358430

View Profile Personal Message (Offline)

Ignore
1511358430
Reply with quote  #2

1511358430
Report to moderator
Join ICO Now A blockchain platform for effective freelancing
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
dinofelis
Hero Member
*****
Offline Offline

Activity: 700


View Profile
May 12, 2017, 11:21:12 AM
 #2

I was discussing this the other day, and wanted clarification..

The answer that seems obvious, but I think is incorrect, is that the the chances of finding a block in less than 10 minutes are the SAME as the chances of finding it after 10 minutes. So 50%.

But I have seen stack exchanges about 'Poisson Distribution',  'probability density' and 'exponential functions' ..

And then e^-1 pops out at ~36%.. for the chance AFTER the mean. More than 10 minutes.
And  1-e^-1 at ~64%.. for the chance BEFORE the mean.  Less than 10 minutes.

Can't see how these figures were come by.. (the first e^-1)

Can someone explain it - thank you!

The "time to next event" in a Poisson stream of rate lambda (= on average lambda events per unit of time) has an exponential distribution, given by:

P(Delta_T) = lambda * exp(- Delta_T * lambda)

This means that the probability for the time to the next event to be between Delta_T and Delta_T + dt equals

P(Delta_T) * dt

(it is a probability DENSITY)

https://www.probabilitycourse.com/chapter11/11_1_2_basic_concepts_of_the_poisson_process.php

As such, the total probability for Delta_T to be smaller than 1/lambda (which is your question) amounts to:

integral P(Delta_T) dDelta_T taken from Delta_T = 0 to 1/lambda

which gives us: 1 - 1/e = 0.632...

So there's 63% chance to find it in less than the average time (10 minutes).

The reason why it amounts to nevertheless the average time, is that even though there's only 37% chance to be longer, it can be REALLY longer sometimes.

EDIT:
If you want a more intuitive picture, your question is probably "how can the average be at value X, and not have half of the probability on the left, and half on the right" ?

The point is that the average value is not the MEDIAN value (which has, exactly, as a definition: half the probability left, and half, right).

Think of it this way: think of a metal object, a kind of bar, but such that its thickness is exponential.  It is thick on one side, and its thickness diminishes exponentially to a very, very thin needle on the other side.  Now, the "average" is the centre of mass, the spot where you have to hold this bar so that it remains in equilibrium.   Well, that centre of mass is not in the spot where there's an equal mass on the left and the right, but rather, the "short" part will have a bigger mass than the "long" part, simply because the long part has a bigger lever arm.

You can feel that by thinking about this still the following way: suppose you put on the two extremities of a ruler, a weight of 1 kg and a weight of 200 g.  In order to keep the ruler in equilibrium on your finger, you'd need to hold it much closer to the 1 kg weight than to the 200 g weight.  So at that "centre of gravity", you still have more weight on the side of the 1 kg, but its lever arm is shorter ; and you have less weight on the 200 g side, but its lever arm is longer.

DannyHamilton
Legendary
*
Offline Offline

Activity: 1988



View Profile
May 12, 2017, 12:44:40 PM
 #3

dinofelis has done a great job of explaining all of this, but since you are specifically asking about blocks and time, here's a simple example...


10 blocks are solved.  They take the following amount of time:

6 minutes
8 minutes
1 minutes
15 minutes
38 minutes
9 minutes
7 minutes
8 minutes
11 minutes
7 minutes

The average (mean) is:
6+5+1+15+35+9+7+8+11+3 / 10 = 10 minutes per block.

However, only 3 (30%) are longer than 10 minutes, while 7 (70%) are shorter.

As you can hopefully see, those blocks that are faster than 10 minutes can NEVER be more than 10 minutes faster than 10 minutes.
Meanwhile, those blocks that are longer than 10 minutes can be MUCH longer than 10 minutes (sometimes close to an hour!).
In order to have an AVERAGE of 10 minutes, you need a LOT of blocks that are just a little bit faster than 10 minute to pull the average down when you have 1 or 2 blocks that are a LOT slower than 10 minutes.

buwaytress
Sr. Member
****
Online Online

Activity: 448


I bit, therefore I am


View Profile
May 12, 2017, 03:57:16 PM
 #4

Thanks for the useful bit of information - it's new to me. Just curious: is this the probability for current difficulty and hashpower or does that no affect the chances at all? I've only been looking at this after the last halving. Was it quicker before that (I assume it was) or has hashpower always kept up?

DannyHamilton
Legendary
*
Offline Offline

Activity: 1988



View Profile
May 12, 2017, 04:13:57 PM
 #5

Was it quicker before that (I assume it was) or has hashpower always kept up?

Difficulty is adjusted to keep the average time between blocks close to 10 minutes.

Every 2016 blocks the software checks to see how long it has taken for those 2016 blocks to be created.  If they were created (on average) every 10 minutes, then it should take:
2016 X 10 = 20160 minutes.

If it takes LESS than 20160 minutes, then blocks are coming too fast and the difficulty is increased. The difficulty is increased in the same proportion that the speed needs to be adjusted, so if the blocks came 10% too fast, then the difficulty is increased by 10%. This results in slowing down the blocks so they will be back to an average of 10 minutes per block.

If it takes MORE than 20160 minutes, then blocks are coming too slow and the difficulty is decreased. The difficulty is decreased in the same proportion that the speed needs to be adjusted, so if the blocks came 10% too slow, then the difficulty is decreased by 10%. This results in speeding up the blocks so they will be back to an average of 10 minutes per block.

The reason difficulty keeps going up is that more hashpower keeps being added to the system.  If mining stops being profitable and some miners start shutting down their equipment, then blocks will be created a bit slower and difficulty will begin to decrease to speed the blocks up.  Decreasing difficulty means that the remaining miners (the ones that don't shut down) will be have more revenue. Eventually the system reaches an equilibrium where there is enough revenue to keep the remaining miners profitable and they stop shutting down equipment.

If mining becomes too profitable, then more miners will add more hashpower to the system.  The blocks will be created a bit faster and difficulty will begin to increase to slow the blocks down.  Increasing difficulty means that all the miners will have less revenue. Eventually the system reaches an equilibrium where there is just enough revenue to keep the miners profitable and they stop adding equipment.

dinofelis
Hero Member
*****
Offline Offline

Activity: 700


View Profile
May 12, 2017, 05:24:04 PM
 #6

If mining becomes too profitable, then more miners will add more hashpower to the system.  The blocks will be created a bit faster and difficulty will begin to increase to slow the blocks down.  Increasing difficulty means that all the miners will have less revenue. Eventually the system reaches an equilibrium where there is just enough revenue to keep the miners profitable and they stop adding equipment.

Indeed, this was the a priori nice idea, that miners would enter in profitable competition, making mining as such more and more difficult and less and less profitable, so that, no matter what is the price of bitcoin, most of its newly created coins would need a wasted economic value close to their actual value, apart from the small margin that miners keep interested.   As such, it seemed that bitcoin would burn all "seigniorage", getting rid of that problematic aspect of "printing money".
buwaytress
Sr. Member
****
Online Online

Activity: 448


I bit, therefore I am


View Profile
May 12, 2017, 06:41:21 PM
 #7

If mining becomes too profitable, then more miners will add more hashpower to the system.  The blocks will be created a bit faster and difficulty will begin to increase to slow the blocks down.  Increasing difficulty means that all the miners will have less revenue. Eventually the system reaches an equilibrium where there is just enough revenue to keep the miners profitable and they stop adding equipment.

Indeed, this was the a priori nice idea, that miners would enter in profitable competition, making mining as such more and more difficult and less and less profitable, so that, no matter what is the price of bitcoin, most of its newly created coins would need a wasted economic value close to their actual value, apart from the small margin that miners keep interested.   As such, it seemed that bitcoin would burn all "seigniorage", getting rid of that problematic aspect of "printing money".

Thank you very much both for clarifying this! I'd known before from reading that difficulty is adjusted but somehow failed to realise that it was part of achieving revenue equilibrium.

Now it's a common perception, at least that I've noticed from voiced opinion, that mining has become less and less profitable (at least for the hobbyist or even semi-large entrepreneur). If what you're saying is accurate (that this system ensures BTC fiat price doesn't matter) - then is this situation  merely a result of more miners sharing what is essentially an assuredly consistent value of revenue?

ie. It's become less profitable because shares are getting smaller, as opposed to decreasing value because of increasing difficulty (expressed as hashing cost). I even see people saying it's getting exponentially more difficult and costlier.

If the above is true, then it makes for interesting considerations when it comes to say, for example, expansion of cloud mining contracts. Because I see some contradicting assumptions:
1. If we can get more hashpower from pooled resources we can earn more
2. But if we get more hashpower, our share gets smaller

Thanks again.


dinofelis
Hero Member
*****
Offline Offline

Activity: 700


View Profile
May 13, 2017, 03:21:06 AM
 #8

If mining becomes too profitable, then more miners will add more hashpower to the system.  The blocks will be created a bit faster and difficulty will begin to increase to slow the blocks down.  Increasing difficulty means that all the miners will have less revenue. Eventually the system reaches an equilibrium where there is just enough revenue to keep the miners profitable and they stop adding equipment.

Indeed, this was the a priori nice idea, that miners would enter in profitable competition, making mining as such more and more difficult and less and less profitable, so that, no matter what is the price of bitcoin, most of its newly created coins would need a wasted economic value close to their actual value, apart from the small margin that miners keep interested.   As such, it seemed that bitcoin would burn all "seigniorage", getting rid of that problematic aspect of "printing money".

Thank you very much both for clarifying this! I'd known before from reading that difficulty is adjusted but somehow failed to realise that it was part of achieving revenue equilibrium.

Now it's a common perception, at least that I've noticed from voiced opinion, that mining has become less and less profitable (at least for the hobbyist or even semi-large entrepreneur). If what you're saying is accurate (that this system ensures BTC fiat price doesn't matter) - then is this situation  merely a result of more miners sharing what is essentially an assuredly consistent value of revenue?

No, the system is designed to make mining almost NOT profitable.  Of course, there will always be a margin, because one still needs to be motivated to do something.  If mining were absolutely not profitable, nobody would do it apart from some idealists.  If mining needs to be an industry, then of course *some* profit margin needs to exist. 

But the whole idea is that, if mining is profitable beyond the small margin without which you quit, it will be attractive for others to start mining too (if they can get the same conditions).  Then more blocks will be solved because these newcomers will also solve blocks, and hence the difficulty will go up.  Now, with given technology, "difficulty going up" means the economic cost of making a block goes up.  You will consume more electricity and it will take a longer time to make a block.  Your hardware investment will return less per year, and your running costs will be higher.  It is up to you to see if the fiat value of what you gain with a block is worth it.  At a certain point, this dips below what you consider interesting, and you quit.  It is when just as many miners quit as new miners come in, that an equilibrium is found.

What is nice about this, is that the level of technology doesn't matter, and the block reward doesn't matter, in principle: difficulty will adjust so that the *economic cost* of mining will always be about equal to what is generated in fiat value by the mining, minus the margin below which you don't consider continuing in this business.

That doesn't mean that mining will give the same margin for all players !  After all, the conversion of "difficulty" in "economic cost" depends very much on the conditions in which you obtain your hardware, you can put them at work, and at what cost you can obtain your electricity.  Mining will concentrate in those places where this is cheapest (like any mass production industry).

In fact, this is the side effect of this highly competitive market: only the most competitive *environments* can do mining, and with economies of scale, this automatically leads to a lot of concentrated mining in the hands of a few Chinese, simply because electronic production is cheap there, environmental laxness allows for cheap electricity and so on ; conditions which are difficult to achieve elsewhere.  You can't have a system of fierce competition of "dumb stuff" (calculating trillions of hashes is "dumb stuff" in a way), and think it will be equally distributed over the world.  It will concentrate in those places where there is a competitive edge, and economies of scale will make that "the big supermarket will compete out the small neighbourhood store".
jessicadrewd
Full Member
***
Offline Offline

Activity: 225



View Profile
May 13, 2017, 05:49:57 AM
 #9

I was discussing this the other day, and wanted clarification..

The answer that seems obvious, but I think is incorrect, is that the the chances of finding a block in less than 10 minutes are the SAME as the chances of finding it after 10 minutes. So 50%.

But I have seen stack exchanges about 'Poisson Distribution',  'probability density' and 'exponential functions' ..

And then e^-1 pops out at ~36%.. for the chance AFTER the mean. More than 10 minutes.
And  1-e^-1 at ~64%.. for the chance BEFORE the mean.  Less than 10 minutes.

Can't see how these figures were come by.. (the first e^-1)

Can someone explain it - thank you!

The chances of finding a block in less time start reducing exponentially for every minute going downwards; 9 minutes: 1 out of 2, 8 min: 1 out of 4... while finding it in 2 minutes or less is 1 every 256 blocks.

spartacusrex
Hero Member
*****
Online Online

Activity: 604



View Profile
May 15, 2017, 12:59:53 PM
 #10

Thank you, thank you!

All clear now..

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!