this post was submitted on 20 Oct 2024
8 points (100.0% liked)
Monero
1662 readers
24 users here now
This is the lemmy community of Monero (XMR), a secure, private, untraceable currency that is open-source and freely available to all.
Wallets
Android (Cake Wallet) / (Monero.com)
iOS (Cake Wallet) / (Monero.com)
Instance tags for discoverability:
Monero, XMR, crypto, cryptocurrency
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
If I understand your question right, I think you're looking for the inverse cumulative distribution function (a.k.a. quantile function) of the Erlang distribution.
The random length of time to mine the next block has an exponential distribution with rate parameter
1/t
. The length of time to minen
blocks has an Erlang distribution with shape parametern
and rate parameter1/t
.The Erlang distribution is a special case of the Gamma distribution. The Erlang distribution's shape parameter must be an integer, but the Gamma distribution's shape parameter can be any positive real number. We can use the Gamma distribution if Erlang isn't given to us by our calculator.
You would compute
T
in the R language with:The results of this simulation match the closed-form computation:
thank you very much, Rucknium. your understanding of my question was spot-on, and the R code works excellently! very useful.
I'd like to ask a few more questions:
314
a common seed in R, or just something you randomly picked?n * 100000
random samples (any distribution) would be insufficient? is it a good rule of thumb?