For example, let's take NotFuzzyWarm's numbers. Current target is:
To get the probability of finding a block at once (one hash), divide it by 2^256.
249381870384321288544767557745710236775970393538166784
$ echo "ibase=16; $(echo ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff | tr 'a-f' 'A-F')" | bc
115792089237316195423570985008687907853269984665640564039457584007913129639935
$ echo "scale=50; 249381870384321288544767557745710236775970393538166784 / 115792089237316195423570985008687907853269984665640564039457584007913129639935" | bc
.00000000000000000000000215370386722371405447399827
Therefore, the probability of not finding a block at once, would be 0.99999999999999999999999784629613277628594552600173.
With 150 TH/s, the probability of not finding a block within a second would be:
To calculate this with high precision, you need to make use of special libraries:
mp.dps = 100 # precision
a = mp.mpf('0.99999999999999999999999784629613277628594552600173') # probability of not finding a block at once
b = 150000000000000 # hashrate
# probability that you won't find a block in one second
result = mp.power(a, b)
print("Probability that you find a block in one second: ", 1-result)
# probability that you won't find a block in one minute
result = mp.power(result, 60)
print("Probability that you find a block in one minute: ", 1-result)
# probability that you won't find a block in one hour
result = mp.power(result, 60)
print("Probability that you find a block in one hour: ", 1-result)
# probability that you won't find a block in one day
result = mp.power(result, 24)
print("Probability that you find a block in one day: ", 1-result)
# probability that you won't find a block in 365 days
result = mp.power(result, 365)
print("Probability that you find a block in 365 days: ", 1-result)
Results:
Probability that you find a block in one second: 0.0000000003230555800313746542651575759752715614541821047547449121224850649399499116300689485485483766011969696
Probability that you find a block in one minute: 0.00000001938333461715659362240752539068268809022908905282234609174506460595343787394574728284894247787867632
Probability that you find a block in one hour: 0.000001162999412016465068516484322398343389488271846415173949033771762598140719659379694685549553920155671
Probability that you find a block in one day: 0.00002791161258291243699820616307956869968979018852187562446262529145259602086639222189814513684159590908
Probability that you find a block in 365 days: 0.0101361601065333352625712188251736971051205876315052582934340097318939980049579694902996727303243481
Those numbers are not totally accurate, of course, because of difficulty adjustments. Given that difficulty is leaning upwards, the probability of mining a block within a year becomes even less than 1% overtime, with the same hashrate.