How to calculate probability of solo mining?

Hi,

I want to offer a tool which calculates some stats based on your mining behaviour. I’m just wondering how to calculate the probability of finding a block solo? And what variables are needed?

Thanks

This should be helpful http://anty.info/primecoin-calculator

Thanks, that’s something i can work with,

I think Mikael’s formula mistakenly ignored chains that are longer than 9. These chains are counted as blocks once found, and can significantly affect block rate if the difficulty is greater than 9.9. Please see my post here [XPM] [ANN] Primecoin High Performance | HP14 released! about the correction term for 10- 11- 12-chains, assuming each step of chain-length increase makes it ten times difficult to find a chain.

I think Mikael’s formula mistakenly ignored chains that are longer than 9. These chains are counted as blocks once found, and can significantly affect block rate if the difficulty is greater than 9.9. Please see my post here [XPM] [ANN] Primecoin High Performance | HP14 released! about the correction term for 10- 11- 12-chains, assuming each step of chain-length increase makes it ten times difficult to find a chain.[/quote]

Well, you’re correct about the formula not being accurate because I ignored chains longer than 9. However, the amount of 10-chains is pretty small compared to 9-chains. I did some testing which showed that the amount of 10-chains is only about 2% of the amount of 9-chains. My old formula was essentially this:

blocks/day = chains/day * (1 - fractionalDifficulty)

Correcting for 10-chains that becomes:

blocks/day = chains/day * (1 - fractionalDifficulty) + 0.02 * chains/day

Now that the difficulty is around 9.94, the estimated blocks/day becomes 33% higher.

Wow I didn’t know 10-chains are that rare. Thanks for pointing it out. My own mining gets at least 5% because I happened to spot a few blocks were 10’s.

I wonder what the distribution of number of blocks so far found from length 7 to length 13 is, and how it is related to the intrinsic Cunningham chain length distribution (of number of chains vs length), which is constant and has scientific value. At any difficulty the instantaneous distribution of found number vs. chain length is the intrinsic distribution multiplied by a miner length preferrence profile averaged across the whole network (at that moment). To get the average miner response profile, we have to know which miner are producing how many chains, which is not eazy to measure.

Wow I didn’t know 10-chains are that rare. Thanks for pointing it out. My own mining gets at least 5% because I happened to spot a few blocks were 10’s.

I wonder what the distribution of number of blocks so far found from length 7 to length 13 is, and how it is related to the intrinsic Cunningham chain length distribution (of number of chains vs length), which is constant and has scientific value. At any difficulty the instantaneous distribution of found number vs. chain length is the intrinsic distribution multiplied by a miner length preferrence profile averaged across the whole network (at that moment). To get the average miner response profile, we have to know which miner are producing how many chains, which is not eazy to measure.[/quote]

Well, I guess the probability of finding a 10-chain could be up to 4%. I actually did my testing with shorter chains on testnet. The round primorial is larger when running on mainnet which means the probability for the 10th number being prime should be slightly higher.

What I know about the distribution of Cunningham chains so far is that it actually closely follows a pretty simple statistical model. The probability of finding a Cunningham chain of length k at some location is roughly P_1 * P_2 * … * P_k where P_i is the probability of the i’th number being prime. That’s also how the chainsperday estimate is calculated.

Are P_i’s constant or nearly constant?

Are P_i’s constant or nearly constant?[/quote]

The exact probabilities depend on the mining parameters. The basic probability for a number N being prime is 1 / ln(N) according to the Prime Number Theorem. So the probability of a 300-bit number being prime is approximately 1/(300 * ln(2)) = 0.0048.

The probability becomes much higher because of the round primorial and the sieve algorithm. Both of them essentially filter out numbers divisible by small primes. Filtering out each prime p_i increases the probability by a factor of 1 / (1 - 1/p_i). The probability for a sieved number being prime is around 0.092 on mainnet. For unsieved numbers, it should be around 0.035 (assuming that round primorial is 59).