pull down to refresh

In order to understand Bitcoin, you have to understand Poisson processes.

A Poisson process is a probabilistic model of discrete events. It lets us answer questions like, "how likely is this event to happen within the next 10 minutes", or "what's the expected time to the next event?"

It can be used to model things like meteor strikes, radioactive decay, and yes, bitcoin.

A Poisson process is modeled by a parameter, . is called the hazard rate. It has units of "per time unit", i.e. per second, per hour, etc. It basically measures the rate at which you can expect events to happen. The hazard rate for finding a bitcoin block is usually = 1 per 10 minutes.

For Bitcoin, the hazard rate helps us understand the relationship between hash rate and difficulty. We can write where is the hash rate and is the "effective difficulty".[1] The effective difficulty adjusts every 2016 blocks to try to keep = 1 per 10 minutes.

For example, if = 1,000 EH/s (exahashes per second), then the effective difficulty wants to be = 600,000 EH, so that = (1 per 600 seconds) = 1 per 10 minutes.

Knowing the hazard rate lets us answer a bunch of relevant questions. For example:

  • How many blocks do we expect to find in a time period ? Answer:
  • What is the expected amount of time until we find the next block? Answer:
  • What is the probability that we have to wait longer than time units to find the next block? Answer:

One interesting thing about Poisson processes is that they're memoryless. It doesn't matter how long you've waited since the last event, the expected time to the next event is always , and the expected number of events in the next time units is always .

Understanding the mathematics of Poisson processes allows us to reason about miner revenue and mining strategy, and it allows us to construct game theoretic models of miner behavior. It will become a necessary tool for my Bitcoin math puzzles series of posts.

  1. "Effective difficulty" is not a term used within the bitcoin protocol, but is proportional to difficulty. I use "effective difficulty" to simplify the exposition and provide an intuitive unit-basis for measuring difficulty as the average number of hashes to find a block.

The memoryless aspect is really cool to me.

Right now, I can say: "The next bitcoin block should be mined within ten minutes."

Yet, if no block is mined in the next twenty minutes, I cannot say: "It is more likely that the next bitcoin block will be mined in the next 5 minutes than the five minutes after that."

This feels so counterintuitive to me. The common sense answer feels like it should be anything after 10 minutes is decreasingly likely and this is true...as long as you are asking from the vantage point of this moment right now.

But now I think I've confused myself. Let me try a toy example:

Thinking about the blockchain as a it is displayed on mempool.space:

If we ask for all blocks, any time there was a 60 minute delay after a block was found, was the next block found in 60+1 minute, 60+2 minutes, 60+3 minutes or so on.

Wouldn't we expect the number of blocks found 69 minutes after their predecessor to be fewer than the number of blocks that were found 61 minutes after their predecessor?

And if this is the case, how do we understand the statement that if no block has been found for the last hour, the next block is equally likely to be found at any point in the next ten minutes?

reply

It's all a matter of perspective.

From the perspective of time T, the probability that the next block is found between T+60min and T+70min (~0.1%) is much smaller than the probability that the next block is found between T+0min and T+10min (~63%).

But from the perspective of time T+60min, the probability that the next block is found between T+60min and T+70min is equivalent to the probability of (T+0min, T+10min) from the perspective of time T (~63%)

Why is there a difference?

Because from the perspective of time T, you are comparing the possibility of (T+60,T+70) to many other possibilities: (T,T+10), (T+10,T+20), etc.

From the perspective of time T+60, you have already ruled out (T,T+10), (T+10,T+20), etc.

reply
from the perspective of time T+60min, the probability that the next block is found between T+60min and T+70min is equivalent to the probability of (T+0min, T+10min) from the perspective of time T (~63%)

Reading this over and over and not making progress. How can an improbable, outlier event (60-min block time) have the same probability as a standard, middle-of-the-diastribution one (10-min).

Surely I'm missing something

reply
Reading this over and over and not making progress. How can an improbable, outlier event (60-min block time) have the same probability as a standard, middle-of-the-diastribution one (10-min).

It doesn't. I think you misunderstood the claim.

Imagine you roll 1 dice every minute, no matter what.

It's now 12:00. What's the probability that you roll a 1 between 12:00 and 12:10? What's the probability that your next 1 occurs between 1:00 and 1:10?

It's now 1:00. Forget about what happened in the past. What's the probability that you'll roll a 1 between 1:00 and 1:10?

reply

Something else that might help.

It's important to distinguish these two questions:

(i) What is the probability that a block is found within any particular 10 minute interval?

(ii) What is the probability that the next is found within any particular 10 minute interval?

These are two different questions.

Example:

It's now 12:00. What is the probability that the next block is found between 1:00 and 1:10? Answer: very small. What is the probability that a block is found between 1:00 and 1:10? Answer: same as always, about 63%.

reply
159 sats \ 1 reply \ @Scoresby 17 Apr

a block vs the next block helps. Thank you.

reply

yeah, i realized that this is probably where much of the confusion lay

reply

Ah yes, this is kind of helpful. I understand the memory point now, I think

reply
106 sats \ 0 replies \ @Murch 17 Apr

It gets even more mindboggling, when you turn it around: the expected time since the previous block is also 10 minutes. So at any point in time, the expected time between the previous block and the next block is 20 minutes.

reply

Fun with lamda's

Part of Our Heritage

reply

is that from the white paper?

reply

why yes, yes it is. nice

reply

the lamda satoshi trail goes deeper if you know where to look (i'll hopefully post an article on this eventually)

clue: look at the work cited

reply

Is this illustrating it?

reply

Great primer. Two things that helped me actually internalize memorylessness when I first hit it:

  1. The variance equals the mean, which most intros skip. For block intervals with = 1 per 10 min, the mean inter-arrival time is 10 min and the standard deviation is also 10 min. That's why on any given day the gap between blocks can swing from a minute to an hour without anything being "wrong" — the noise floor is enormous relative to the signal.
  2. Why memorylessness has to be true if we accept independence of hash attempts: every nonce trial is an independent Bernoulli with success probability . The number of trials until success is geometric, and as with rate , the continuous limit is exponential. Past failed nonces literally carry no info because each one was a fresh independent draw — there's no urn being depleted.

A practical consequence worth pinning to the wall: if you're a small miner and you've gone 6 without a block, the probability you should have found one by now is — but conditional on not having found one, your expected wait from now is still . That's the part that breaks human intuition and convinces solo miners to pool up.