Bitcoin Forum
May 09, 2024, 11:30:45 PM *
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 866 times)
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1512
Merit: 7359


Farewell, Leo


View Profile
March 22, 2024, 09:52:12 AM
 #41

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
But you're calculating exactly three in here. If P(block=3) = 1 - {every other possibility than P(block=3)), then you're calculating for exactly three. If you wanted to calculate for at least three, you would work out P(block >= 3), which is just 1 - P(block = 0) - P(block = 1) - P(block = 2) = 0.080302 ~= 8%.

Another fun fact. The probability of not finding any block for 10 minutes is the same as finding exactly one block; about 36.8%.

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.
That will be a little difficult. Block times are not accurate, as rightly said. Your best source of information is debug.log (in which it is written when your node received the blocks). But it won't be accurate either, because hashrate does not remain constant for a long time.

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

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

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

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

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

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











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











▄▄▄▄█
1715297445
Hero Member
*
Offline Offline

Posts: 1715297445

View Profile Personal Message (Offline)

Ignore
1715297445
Reply with quote  #2

1715297445
Report to moderator
1715297445
Hero Member
*
Offline Offline

Posts: 1715297445

View Profile Personal Message (Offline)

Ignore
1715297445
Reply with quote  #2

1715297445
Report to moderator
1715297445
Hero Member
*
Offline Offline

Posts: 1715297445

View Profile Personal Message (Offline)

Ignore
1715297445
Reply with quote  #2

1715297445
Report to moderator
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Amphenomenon
Sr. Member
****
Offline Offline

Activity: 518
Merit: 336


Hope Jeremiah 17vs7


View Profile WWW
March 22, 2024, 11:02:13 AM
Merited by BlackHatCoiner (4)
 #42

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
But you're calculating exactly three in here. If P(block=3) = 1 - {every other possibility than P(block=3)), then you're calculating for exactly three. If you wanted to calculate for at least three, you would work out P(block >= 3), which is just 1 - P(block = 0) - P(block = 1) - P(block = 2) = 0.080302 ~= 8%.
 
I was actually working base on this
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.

Quote
Another fun fact. The probability of not finding any block for 10 minutes is the same as finding exactly one block; about 36.8%.
I actually discovered this earlier, yesterday during my calculations though didn't speak about it or actually showed my working after I got a value similar to the probability of mining 3 blocks https://www.talkimg.com/images/2024/03/22/J7oDT.jpeg
https://www.talkimg.com/images/2024/03/22/J77k1.jpeg
https://www.talkimg.com/images/2024/03/22/J75Zl.jpeg

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.
That will be a little difficult. Block times are not accurate, as rightly said. Your best source of information is debug.log (in which it is written when your node received the blocks). But it won't be accurate either, because hashrate does not remain constant for a long time.
franky1 said this earlier on this thread

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

.
            ▄▄▄▄▄▄▄▄▄▄███████████▄▄▄▄▄
▄▄▄▄▄██████████████████████████████████▄▄▄▄
▀██████████████████████████████████████████████▄▄▄
▄▄████▄█████▄████████████████████████████▄█████▄████▄▄
▀████████▀▀▀████████████████████████████████▀▀▀██████████▄
  ▀▀▀████▄▄▄███████████████████████████████▄▄▄██████████
       ▀█████▀  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀█████▀▀▀▀▀▀▀▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
▄█████
██
██
██
██
██
██
██
██
██
██
██
▀█████
.
PLAY NOW
█████▄
██
██
██
██
██
██
██
██
██
██
██
█████▀
AmaGold70
Jr. Member
*
Offline Offline

Activity: 41
Merit: 4


View Profile
March 22, 2024, 11:23:52 AM
 #43

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
Hahaha, I wasn't expecting to win against top members in the forum but I thought I was pretty close even though my presentation wasn't good enough. Thumbs up @Mia Chloe you deserve the win. @BlackHatcoiner hoping to participate again in your next contest.
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1512
Merit: 7359


Farewell, Leo


View Profile
March 31, 2024, 12:48:46 PM
 #44

New quiz!

https://bitcointalk.org/index.php?topic=5491058.msg63882296#msg63882296

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

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

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

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

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

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











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











▄▄▄▄█
STINKYBEE
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
May 02, 2024, 03:10:37 AM
 #45


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.
Giving answer on my own knowledge basis to calculate the probability of 3 blocks being mined within the next 10 minutes, using the poisson formula by


https://i.ibb.co/vV1QFZg/IMG20240502084428.jpg

Pls correct if I'm wrong.
LoyceV
Legendary
*
Offline Offline

Activity: 3304
Merit: 16624


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
May 02, 2024, 06:58:04 AM
 #46

Quoting image:

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!