Adjust the probability of winning

71 Views Asked by At

In the past 144 lotteries, you won within $T$ minutes on average.

Each lottery is as follow, every second you are making $K$ attempts to pull a number from the box that is smaller than $X$. When you succeed the lottery ends, and there were 144 such lotteries in total.

I want to run another 144 lotteries and I want to make sure, that the average time that it will take you to win will be 10 min. How can I calculate the new value of $X$ such that the average time will be 10 min?

Of course, we are talking about probability calculation, I understand that the adjustment is not a promise.

1

There are 1 best solutions below

2
On BEST ANSWER

Ahh, another Bitcoin question.

Usually, recalibrations take place every couple of weeks, I thought. But that turns out not to matter too much. We'll just assume that for whatever period it is, the times are i.i.d. (that is, independent and identically distributed).

Suppose that each hash has a probability $p$ of succeeding. Then, on average, it will take on average $1/p$ attempts before the first success (and then the lottery ends). If a new hash is attempted every $\tau$ minutes, then it takes $\tau/p$ minutes on average before the first success.

Bitcoin, in particular, attempts to adjust $p$ such that $\tau/p \approx 10$ minutes. The hash has a $256$-bit output, and to be successful, the output of the hash must be less than some value $X$. So

$$ p = \frac{X}{2^{256}} $$

So, if the current inter-success time is $T$ minutes, and you want to adjust it back to $10$ minutes, then you must decrease $X$; specifically, you must multiply it by $T/10$. Thus, for instance, if $X = 2^{200}$, and $T = 2.5$ minutes, then you have to decrease $X$ by a factor of $4$, to $2^{198}$.