This problem can be modeled by considering the time it takes for each individual prize to be won.
Let N be the total number of buttons/prizes.
Let pi be the probability of winning prize i on any given day it is pressed, for i=1,2,…,N.
The key insight is that since you press every button that has not been won each day, the process of winning prize i is independent of the process of winning prize j. If prize i hasn't been won, it's pressed, and it has a pi chance of being won. This is true regardless of whether other prizes have been won or not.
Let Yi be the number of days until prize i is won for the first time. Since prize i is pressed every day until it's won, Yi follows a geometric distribution with success probability .
The Probability Mass Function (PMF) for is for .
The Expected Value for is .
The total number of days until every prize has been won, let's call this T, is the maximum of the individual winning times:
T=max(Y1,Y2.
Since the Yi are independent random variables, we can derive the distribution of T.
1. Statistical Distribution
The distribution of T is the distribution of the maximum of N independent geometric random variables, each with its own success probability. This specific distribution does not have a common name like "Normal" or "Poisson", but it is well-defined by its Cumulative Distribution Function (CDF) and Probability Mass Function (PMF).
Cumulative Distribution Function (CDF):
The probability that all prizes are won by day k (i.e., T≤k) is the probability that each individual prize i is won by day k (i.e., Y).
Since the are independent:
For a geometric distribution Yi with parameter pi, .
So, the CDF of is:
for .
Probability Mass Function (PMF):
The PMF for T (the probability that exactly k days are needed) is P(T=k)=P(T≤.
for .
(Note: For , the second term should be interpreted as 0, or if applies for values). More accurately, for , .
2. Average Number of Days Until Every Prize Has Been Won
The expected value of T can be calculated from its CDF using the formula for non-negative integer-valued random variables:
E[T]=∑k=0∞P
Since :
(Note: The sum starts from k=0. For k=0, P(T≤0)=0, so the term is . This accounts for , which is true since must be at least 1 day. So the sum could effectively start from , or the first term of the sum is 1 if .)
This sum usually does not have a simple closed-form expression for arbitrary N and pi. However, it is a finite sum since 1−(1−p approaches 1 very quickly as increases, making the terms in the sum (for large enough) approach 0 (specifically, ). For practical purposes, this sum can be calculated numerically by truncating it when the terms become negligibly small.
Example:
Suppose you have two buttons, N=2, with p1=0.5 and p.
days.
days.
The average number of days until both are won:
E[T]=∑k=0∞
This value will be greater than the individual expectations, as you have to wait for the "longest" process to finish.
In summary:
- Statistical Distribution: The number of days until all prizes are won (T) follows the distribution of the maximum of independent geometric random variables. Its PMF and CDF are given by the formulas above.
- Average Number of Days: The average number of days (E[T]) is given by the infinite sum E[T].