Bitcoin Forum
April 28, 2024, 08:14:31 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 »  All
  Print  
Author Topic: [Quiz] Answer the Bitcoin question and earn merits! #2  (Read 771 times)
Silikiem
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 20, 2024, 03:42:39 PM
 #21

Sir, the probability of having exactly 3 blocks mined within the next 10 minutes is approximately 0.0613, or 6.13%.
1714292071
Hero Member
*
Offline Offline

Posts: 1714292071

View Profile Personal Message (Offline)

Ignore
1714292071
Reply with quote  #2

1714292071
Report to moderator
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714292071
Hero Member
*
Offline Offline

Posts: 1714292071

View Profile Personal Message (Offline)

Ignore
1714292071
Reply with quote  #2

1714292071
Report to moderator
Amphenomenon
Sr. Member
****
Offline Offline

Activity: 504
Merit: 326


Hope Jeremiah 17vs7


View Profile WWW
March 20, 2024, 04:44:04 PM
 #22



Using this formula I got 0
Where :
Random number (K) = 3
Time interval (t)= 10
Parameter Rate(a) = 10
e = 2.71828

freebitcoin       ▄▄▄█▀▀██▄▄▄
   ▄▄██████▄▄█  █▀▀█▄▄
  ███  █▀▀███████▄▄██▀
   ▀▀▀██▄▄█  ████▀▀  ▄██
▄███▄▄  ▀▀▀▀▀▀▀  ▄▄██████
██▀▀█████▄     ▄██▀█ ▀▀██
██▄▄███▀▀██   ███▀ ▄▄  ▀█
███████▄▄███ ███▄▄ ▀▀▄  █
██▀▀████████ █████  █▀▄██
 █▄▄████████ █████   ███
  ▀████  ███ ████▄▄███▀
     ▀▀████   ████▀▀
BITCOIN
DICE
EVENT
BETTING
WIN A LAMBO !

.
            ▄▄▄▄▄▄▄▄▄▄███████████▄▄▄▄▄
▄▄▄▄▄██████████████████████████████████▄▄▄▄
▀██████████████████████████████████████████████▄▄▄
▄▄████▄█████▄████████████████████████████▄█████▄████▄▄
▀████████▀▀▀████████████████████████████████▀▀▀██████████▄
  ▀▀▀████▄▄▄███████████████████████████████▄▄▄██████████
       ▀█████▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀█████▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄█████
██
██
██
██
██
██
██
██
██
██
██
▀█████
.
PLAY NOW
█████▄
██
██
██
██
██
██
██
██
██
██
██
█████▀
philipma1957
Legendary
*
Offline Offline

Activity: 4102
Merit: 7768


'The right to privacy matters'


View Profile WWW
March 20, 2024, 04:54:35 PM
 #23

actually this is a good question.

as the 6.13 percent answer left out all the chances above 3 blocks.

so it is close but no cigar.
I actually thought about this but I didn't make use of values ≥3 because the question asked was for exactly 3 blocks.

If not I would simply calculate that for 2 blocks and 1 block and then subtract the value from 1 to get that for the number of possible mined blocks geater than of equal to 3 since;
Pr(<2 blocks) + Pr(≥3 blocks) = 1
So  Pr(≥3 blocks) = 1- Pr(<2 blocks)
Since Pr(≥3 blocks)  more like tends to infinity and thus would be more difficult to compute as you would have to solve for the probability of 3,4 ,5,6,7........ Till infinity the more Pr(≥3 blocks) outcomes you compute, the more accurate your probability.

yeah but pretend the network rips 3 blocks in the first 3 seconds. the next 9+ minutes could kill it off.

So I would think you need poisson for

4+5+6+7+8+9+10   is pretend 1.4%

take that 6.13-1.4 = 4.73 and know you are close.

If you disregard the chance of the over block events you you be wrong.

basically because he wants exactly 3 not 4 or 5 or 6 or any higher ones.

Not doing the math for

4
5
6
7
8
9
...
20  but each one is less by a fairly large factor

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
.
 MΞTAWIN  THE FIRST WEB3 CASINO   
.
.. PLAY NOW ..
seoincorporation
Legendary
*
Offline Offline

Activity: 3136
Merit: 2913


Top Crypto Casino


View Profile
March 20, 2024, 04:58:33 PM
Last edit: March 20, 2024, 05:22:15 PM by seoincorporation
 #24



Using this formula I got 0
Where :
Random number (K) = 3
Time interval (t)= 10
Parameter Rate(a) = 10
e = 2.71828

It can't be 0... That's a fact.

It's a tricky question because there are factors involved like Mining difficulty and the total hashing power on the network... The 10 minutes is a constant written on the Bitcoin code, but the ones who find the block are the miners, so, if the difficulty is high and the hashing power is low, the probability of finding 3 blocks in 10 minutes is lower than the case where the hashing power is high.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1498
Merit: 7294


Farewell, Leo


View Profile
March 20, 2024, 05:13:37 PM
 #25

The probability of mining a new block every 10 minutes is about 1/10 or 10% on average.
This is incorrect, and thus, so is everything that follows. Binomial probability is not the method to compute it either.

It seems newbies aren't allowed to send a picture here because I did my calculations in my notebook as it would have been easier for me to drop a picture of my calculations. I may be wrong though with my answer but am delighted to participate.
I would be glad to see your calculations! Drop them in talkimg and post them as a link (since you're prohibited to posting images).

The chance of having exactly three blocks mined in 10 minutes is 0.001
It is not. You can verify by checking the blockchain. 0.001 is 0.1%, which means that three blocks in 10 minutes would have to be mined only once in 1000 times. By checking the three most recent blocks (835552, 835553 and 835554), I can see that they were all mined within 10 minutes. If you go a little past that, blocks 835541, 835540, 835539 and 835538 were all mined within 10 minutes! I'm sure you will find more such cases, a lot more frequently than once in 1000.

Using this formula I got 0
It can be 0... That's a fact.
I just gave two recent examples. How can it have zero probability?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
seoincorporation
Legendary
*
Offline Offline

Activity: 3136
Merit: 2913


Top Crypto Casino


View Profile
March 20, 2024, 05:27:44 PM
 #26

It can be 0... That's a fact.
I just gave two recent examples. How can it have zero probability?

Sorry, it was a typo, I want to say "can't".

I have seen both scenarios in the past, the one that shows us 1 block in 1 hour, and the one that shows us 5 blocks in 10 minutes... And the first scenario feels terrible, waiting more than 1 hour for a confirmation is a nightmare.

Getting back to the main question, what's the probability? i would say 33%, because having 1 block in 10 minutes has a chance of 100%, having 2 is 50%, and 3 33%... But my logic is too basic, as i mentioned in the past post, a lot of facts are involved.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
KupaCrypto
Member
**
Offline Offline

Activity: 308
Merit: 26


View Profile
March 20, 2024, 05:53:19 PM
 #27

A miner with the advantage of 51% attack will be able to
 1.double send coins and also
2. prevent confirmation of transactions,
but  to his disadvantage he  won't be able to
1. Reverse confirmed transactions
2.creat new coins
If someone has the majority control of hashing power then he  can decide which transactions to include in the next block.

Mia Chloe
Sr. Member
****
Offline Offline

Activity: 322
Merit: 493


Math + Code = Blockchain 😁


View Profile
March 20, 2024, 06:10:32 PM
Merited by vapourminer (1)
 #28



I tried computing the blocks mined within 10minutes which also includes that of 10 minutes and less meaning lambda would vary by a common difference of 0.1 by using 9,8,7...... Minutes.

More details in my solution above

▄▄███████▄▄
▄██████████████▄
▄██████████████████▄
▄████▀▀▀▀███▀▀▀▀█████▄
▄█████████████▄█▀████▄
███████████▄███████████
██████████▄█▀███████████
██████████▀████████████
▀█████▄█▀█████████████▀
▀████▄▄▄▄███▄▄▄▄████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀
MΞTAWIN  THE FIRST WEB3 CASINO██████
██
██
██
██
██
██
██

██

██

██

██

██████
.
 PLAY NOW 
██████
██
██
██
██
██
██
██

██

██

██

██

██████
AmaGold70
Jr. Member
*
Offline Offline

Activity: 35
Merit: 4


View Profile
March 20, 2024, 06:29:13 PM
 #29



It seems newbies aren't allowed to send a picture here because I did my calculations in my notebook as it would have been easier for me to drop a picture of my calculations. I may be wrong though with my answer but am delighted to participate.
I would be glad to see your calculations! Drop them in talkimg and post them as a link (since you're prohibited to posting images).

here is my calculation, i hope you can see it clearly.
Churchillvv
Full Member
***
Online Online

Activity: 378
Merit: 161


Eloncoin.org - Mars, here we come!


View Profile WWW
March 20, 2024, 09:19:27 PM
 #30

Sir, the probability of having exactly 3 blocks mined within the next 10 minutes is approximately 0.0613, or 6.13%.
I'm learning alot here, but i believe this answer of yours is AI generated.

If you did it yourself then show working, or at least explain how you got the answer.

Here is one of the rules of the quiz, your answer must be explanatory.

  • Your answer needs to be explanatory. Not just a yes-no or a single number.
If you don't know the answer you can just remain calm and learn from what others will do probably try to use one of the formulas posted above to find your own answer you might be correct.

franky1
Legendary
*
Offline Offline

Activity: 4200
Merit: 4447



View Profile
March 21, 2024, 07:06:46 AM
Merited by BlackHatCoiner (4)
 #31

its worth noting.. someone done a study in ~2018 of the first 535k blocks
this is what they said
Quote
For "shortest", since timestamps are not strictly enforced and can be fudged accidentally or intentionally, it is possible for a block to have an earlier timestamp than its predecessor, by up to 2 hours (7200 seconds), in which case the time difference is negative. This has happened 13828 times. The most negative difference is −7125 seconds (1 hour 58 minutes 45 seconds) between blocks 156113 and 156114.

so dont use a blocks time stamp of blockchain history to gauge how often 3 blocks were solved in under 10 minutes.. timestamps are not accurate measure of actual time they were actually solved

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
Amphenomenon
Sr. Member
****
Offline Offline

Activity: 504
Merit: 326


Hope Jeremiah 17vs7


View Profile WWW
March 21, 2024, 07:32:25 AM
Merited by vapourminer (1)
 #32



Using this formula I got 0
Where :
Random number (K) = 3
Time interval (t)= 10
Parameter Rate(a) = 10
e = 2.71828
The formula is correct, I have seen my error :
Random number (K) = 3
Time interval (t)= 10
Parameter Rate(a) = 1/10 =0.1
e = 2.71828
 Probability of 3 blocks mined in an average of 10 minutes = 0.06132

My interpretation is if the exactly is :
With in the 10 minutes time interval
0 to infinite block can be mined while though my constrict is 3 block

Then
Pr (3 block) = 1 - (Pr( ≤2 block) + Pr (>3 block)
Where :
Pr( ≤2 block) = Pr (0 block) + Pr (1 block) + Pr (2 block)
 Pr (>3 block) = Pr (4 block) + Pr (5 block) + Pr (6 block)...
Though this tends to infinity but I stop in block 6 since I'm using 5 decimal place

But my final answer was Pr(3 block) = 0.06133 which is the similar to the Probability of 3 blocks mined in an average of 10 minutes = 0.06132





freebitcoin       ▄▄▄█▀▀██▄▄▄
   ▄▄██████▄▄█  █▀▀█▄▄
  ███  █▀▀███████▄▄██▀
   ▀▀▀██▄▄█  ████▀▀  ▄██
▄███▄▄  ▀▀▀▀▀▀▀  ▄▄██████
██▀▀█████▄     ▄██▀█ ▀▀██
██▄▄███▀▀██   ███▀ ▄▄  ▀█
███████▄▄███ ███▄▄ ▀▀▄  █
██▀▀████████ █████  █▀▄██
 █▄▄████████ █████   ███
  ▀████  ███ ████▄▄███▀
     ▀▀████   ████▀▀
BITCOIN
DICE
EVENT
BETTING
WIN A LAMBO !

.
            ▄▄▄▄▄▄▄▄▄▄███████████▄▄▄▄▄
▄▄▄▄▄██████████████████████████████████▄▄▄▄
▀██████████████████████████████████████████████▄▄▄
▄▄████▄█████▄████████████████████████████▄█████▄████▄▄
▀████████▀▀▀████████████████████████████████▀▀▀██████████▄
  ▀▀▀████▄▄▄███████████████████████████████▄▄▄██████████
       ▀█████▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀█████▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄█████
██
██
██
██
██
██
██
██
██
██
██
▀█████
.
PLAY NOW
█████▄
██
██
██
██
██
██
██
██
██
██
██
█████▀
promise444c5
Full Member
***
Offline Offline

Activity: 266
Merit: 128


Keep Promises !


View Profile
March 21, 2024, 03:48:58 PM
 #33

Giving this a try :

1.566E-14

Mangalion
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 21, 2024, 05:34:00 PM
 #34


Short introduction for anyone who missed the first quiz:
I decided to start these forum quiz-series, where I'll be asking questions of educational character, to improve the average user's knowledge around Bitcoin. The questions will mostly be technical and historical. To create an incentive, I will generously merit the first person who replies with the correct answer. If that is not good enough incentive, I'll create a leaderboard!

  • Your answer needs to be explanatory. Not just a yes-no or a single number.
  • If nobody finds the answer until the cut-off date, I will submit it.
  • Have fun! It's a game.  Smiley

The first question was a tribute to the whitepaper. Now let's see how good we are at math.



Question: What is the chance of having exactly three blocks mined within the next 10 minutes? You can assume that a new block is mined every 10 minutes on average.

Cut-off date: 27/03/2024.

Unfortunately, we can't calculate the exact chance of having exactly three blocks mined within the next 10 minutes with the given information. Here's why:
Block mining is not deterministic: While the average block time might be 10 minutes, it's not guaranteed. The actual time between blocks can vary due to factors like mining difficulty.
Poisson distribution, not binomial: Since new blocks are independent events (one block doesn't affect the next), a Poisson distribution would be more appropriate for this scenario. This model considers the average rate of events (blocks mined) within a specific timeframe (10 minutes).
However, we can explore the likelihood of having around three blocks mined in 10 minutes using the Poisson distribution.
Here's what we'd need:
Average block time: We're given that it's 10 minutes on average.
With this information, we can calculate the lambda (λ) parameter for the Poisson distribution, which represents the average number of events (blocks mined) expected in a given timeframe (10 minutes).
λ = average rate (blocks/minute) * time (minutes)
λ = 1 block / 10 minutes * 10 minutes
λ = 1
Using a Poisson probability calculator or statistical software, we can then estimate the probability of getting exactly 3 blocks (k = 3) within 10 minutes (λ = 1)
This will give you a probability value, but it won't be an exact chance due to the inherent randomness of block mining times.
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1498
Merit: 7294


Farewell, Leo


View Profile
March 21, 2024, 06:04:04 PM
Last edit: March 22, 2024, 10:11:47 AM by BlackHatCoiner
Merited by LoyceV (4), Mia Chloe (2), vapourminer (1), seoincorporation (1), Amphenomenon (1), Elissa~sH (1)
 #35

Mia Chloe is right. Mining is a Poisson process. One important characteristic of a Poisson process, is that it is memoryless; whether a block was found recently or not, does not give us a clue about the likelihood that another block will be found soon. Whether the last block was mined 2 hours ago or 10 minutes ago, the probability of mining a block within the next 10 minutes remains the same. (Of course, under the assumption that hashrate is constant and blocks are mined every 10 minutes on average)

As displayed in Wikipedia, the formula is: P{N = n} = Λn * e / n!, where:
- n: the number of blocks to find within 10 minutes
- Λ: the number of blocks you would expect to find in 10 minutes.

For n=3, Λ=1, we get 0.0613132, or 6.13%.

The C++ code that implements it is the following:
Code:
#include <iostream>
#include <cmath>
using namespace std;

// constant number 'e'
const double Euler = std::exp(1.0);

// return x^y
int power(int x, int y){
    if(y == 0 && x != 0) return 1;
    int i, z = x;  
    for(i = 0; i < y; i++)
        z *= z;

    return z;
}

// factorial of integer x
int fact(int x){
    if(x == 0) return 1;
    
    int i, factorial = 1;
    for(i = 1; i <= x; i++)
        factorial *= i;

    return factorial;
}

int main(){
    // P{N = n} = Λ^n * e^-Λ / n!
    // n: number of blocks to find within given time frame
    // Λ or lambda: number of blocks you would expect to find in 10 minutes

    int n = 3, lambda = 1;
    double P = power(lambda, n) * pow(Euler, -lambda) / fact(n);
    
    cout << P << endl;
}

Just compile with "g++ -o mining mining.cpp" and run with "./mining".

See how abruptly improbable it becomes as you increase n.
Code:
For n=3, Λ=1, P=0.0613132
For n=4, Λ=1, P=0.01532830
For n=5, Λ=1, P=0.00306566
For n=6, Λ=1, P=0.000510944
For n=7, Λ=1, P=0.00000729

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Elissa~sH
Member
**
Offline Offline

Activity: 83
Merit: 57


View Profile
March 21, 2024, 07:28:51 PM
Last edit: March 21, 2024, 07:49:28 PM by Elissa~sH
 #36

For example, to find the chance of moving exactly three blocks in the next 10 minutes, we can use the Poisson distribution, which shows the fewest events in a given time.

Because of this, the chance of mining exactly three blocks in the next 10 minutes is about 0.06132, or 6.132%.


The C++ code that implements it is the following:
Code:
#include <iostream>
#include <cmath>
using namespace std;

// constant number 'e'
const double Euler = std::exp(1.0);

// return x^y
int power(int x, int y){
    int i, z = x;  
    for(i = 0; i < y; i++)
        z *= z;

    return z;
}

// factorial of integer x
int fact(int x){
    if(x == 0) return 1;
    
    int i, factorial = 1;
    for(i = 1; i <= x; i++)
        factorial *= i;

    return factorial;
}

int main(){
    // P{N = n} = Λ^n * e^-Λ / n!
    // n: number of blocks to find within given time frame
    // Λ or lambda: number of blocks you would expect to find in 10 minutes

    int n = 3, lambda = 1;
    double P = power(lambda, n) * pow(Euler, -lambda) / fact(n);
    
    cout << P << endl;
}
We get 0.0613132, or 6.13%.
Yes bro correct C++ is coming to me same.
Judith87403
Jr. Member
*
Offline Offline

Activity: 58
Merit: 34


View Profile
March 21, 2024, 08:21:26 PM
 #37

Mia Chloe is right. Mining is a Poisson process. One important characteristic of a Poisson process, is that it is memoryless; whether a block was found recently or not, does not give us a clue about the likelihood that another block will be found soon. Whether the last block was mined 2 hours ago or 10 minutes ago, the probability of mining a block within the next 10 minutes remains the same. (Of course, under the assumption that hashrate is constant and blocks are mined every 10 minutes on average)

As displayed in Wikipedia, the formula is: P{N = n} = Λn * e / n!, where:
- n: the number of blocks to find within 10 minutes
- Λ: the number of blocks you would expect to find in 10 minutes.

For n=3, Λ=1, we get 0.0613132, or 6.13%.

The C++ code that implements it is the following:
Code:
#include <iostream>
#include <cmath>
using namespace std;

// constant number 'e'
const double Euler = std::exp(1.0);

// return x^y
int power(int x, int y){
    int i, z = x;   
    for(i = 0; i < y; i++)
        z *= z;

    return z;
}

// factorial of integer x
int fact(int x){
    if(x == 0) return 1;
   
    int i, factorial = 1;
    for(i = 1; i <= x; i++)
        factorial *= i;

    return factorial;
}

int main(){
    // P{N = n} = Λ^n * e^-Λ / n!
    // n: number of blocks to find within given time frame
    // Λ or lambda: number of blocks you would expect to find in 10 minutes

    int n = 3, lambda = 1;
    double P = power(lambda, n) * pow(Euler, -lambda) / fact(n);
   
    cout << P << endl;
}

Just compile with "g++ -o mining mining.cpp" and run with "./mining".

See how abruptly improbable it becomes as you increase n.
Code:
For n=3, Λ=1, P=0.0613132
For n=4, Λ=1, P=0.01532830
For n=5, Λ=1, P=0.00306566
For n=6, Λ=1, P=0.000510944
For n=7, Λ=1, P=0.00000729

I got the same answer on the below link?:

https://bitcointalk.org/index.php?topic=5489635.msg63832047#msg63832047
Bravut
Member
**
Offline Offline

Activity: 84
Merit: 14


View Profile
March 22, 2024, 12:37:54 AM
 #38

Mia Chloe is right. Mining is a Poisson process. One important characteristic of a Poisson process, is that it is memoryless; whether a block was found recently or not, does not give us a clue about the likelihood that another block will be found soon. Whether the last block was mined 2 hours ago or 10 minutes ago, the probability of mining a block within the next 10 minutes remains the same. (Of course, under the assumption that hashrate is constant and blocks are mined every 10 minutes on average)

As displayed in Wikipedia, the formula is: P{N = n} = Λn * e / n!, where:
- n: the number of blocks to find within 10 minutes
- Λ: the number of blocks you would expect to find in 10 minutes.

For n=3, Λ=1, we get 0.0613132, or 6.13%.

The C++ code that implements it is the following:
Code:
#include <iostream>
#include <cmath>
using namespace std;

// constant number 'e'
const double Euler = std::exp(1.0);

// return x^y
int power(int x, int y){
    int i, z = x;   
    for(i = 0; i < y; i++)
        z *= z;

    return z;
}

// factorial of integer x
int fact(int x){
    if(x == 0) return 1;
   
    int i, factorial = 1;
    for(i = 1; i <= x; i++)
        factorial *= i;

    return factorial;
}

int main(){
    // P{N = n} = Λ^n * e^-Λ / n!
    // n: number of blocks to find within given time frame
    // Λ or lambda: number of blocks you would expect to find in 10 minutes

    int n = 3, lambda = 1;
    double P = power(lambda, n) * pow(Euler, -lambda) / fact(n);
   
    cout << P << endl;
}

Just compile with "g++ -o mining mining.cpp" and run with "./mining".

See how abruptly improbable it becomes as you increase n.
Code:
For n=3, Λ=1, P=0.0613132
For n=4, Λ=1, P=0.01532830
For n=5, Λ=1, P=0.00306566
For n=6, Λ=1, P=0.000510944
For n=7, Λ=1, P=0.00000729

 The number of blocks expected to be found in a certain time follows the poisson distribution .
Which means the probability of finding exactly K block in T minutes is represented by the formula;
  P(K,T)=(T/10)^K * e‐T/10/K!

Where; T=Time(mins) , K= Block
Inputting the values:

 P(3,10) =      (10/10)^3    *   e‐(10/10)/3!
               =      1³ * e‐¹/3!
               =      0.0613.

For simplicity sake;

               =      0.367879÷6
               =     0.0613.
          %  =     6.13%

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ ★ ★ ★ ★ ★ ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
PLINKO    |7| SLOTS     (+) ROULETTE    ▼ BIT SPINBITVESTPLAY or INVEST ║ ✔ Rainbot  ✔ Happy Hours  ✔ Faucet
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ ★ ★ ★ ★ ★ ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Amphenomenon
Sr. Member
****
Offline Offline

Activity: 504
Merit: 326


Hope Jeremiah 17vs7


View Profile WWW
March 22, 2024, 07:09:55 AM
 #39

-snip-
So in the end the exactly didn't matter and I guessed this was why after this:

Pr (3 block) = 1 - (Pr( ≤2 block) + Pr (>3 block))
I still got the same 0.06133 which is roughly same as the 0.06131

My python code, works in similar way as your c++
I wrote mine as a code in python, to be Frank my code is not professional i`m still working on that

Code:
import math
Parameter = 1
RandomNumber = 3
EulerNumber = 2.71828

Probability = (Parameter ** RandomNumber ) * (EulerNumber ** (-Parameter)) / math.factorial(RandomNumber)
RoundedProbability = round(Probability, 4)
Inpercentage = str(RoundedProbability * 100)
print ('The chance of having exactly three blocks mined within the next 10 minutes = ',
       RoundedProbability, 'or', Inpercentage + '%')


Poisson distribution was also spoken about on the bitcoin whitepaper in page 7 even in regards to your previous question
I did edit a part which was, math.factorial(3) to math.factorial(RandomNumber)

freebitcoin       ▄▄▄█▀▀██▄▄▄
   ▄▄██████▄▄█  █▀▀█▄▄
  ███  █▀▀███████▄▄██▀
   ▀▀▀██▄▄█  ████▀▀  ▄██
▄███▄▄  ▀▀▀▀▀▀▀  ▄▄██████
██▀▀█████▄     ▄██▀█ ▀▀██
██▄▄███▀▀██   ███▀ ▄▄  ▀█
███████▄▄███ ███▄▄ ▀▀▄  █
██▀▀████████ █████  █▀▄██
 █▄▄████████ █████   ███
  ▀████  ███ ████▄▄███▀
     ▀▀████   ████▀▀
BITCOIN
DICE
EVENT
BETTING
WIN A LAMBO !

.
            ▄▄▄▄▄▄▄▄▄▄███████████▄▄▄▄▄
▄▄▄▄▄██████████████████████████████████▄▄▄▄
▀██████████████████████████████████████████████▄▄▄
▄▄████▄█████▄████████████████████████████▄█████▄████▄▄
▀████████▀▀▀████████████████████████████████▀▀▀██████████▄
  ▀▀▀████▄▄▄███████████████████████████████▄▄▄██████████
       ▀█████▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀█████▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄█████
██
██
██
██
██
██
██
██
██
██
██
▀█████
.
PLAY NOW
█████▄
██
██
██
██
██
██
██
██
██
██
██
█████▀
LoyceV
Legendary
*
Online Online

Activity: 3290
Merit: 16561


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
March 22, 2024, 09:05:38 AM
 #40

6.13%.
I wanted to check reality to see how often this occurred (start with Bitcoin block data available in CSV format, and download time.txt), but there is no accurate data on block times. In some cases the block time moves backwards.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: « 1 [2] 3 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!