Here is a coin flipping problem I thought of (this problem represents the correlated, dynamic and accelerated rates of failure in machines, e.g. each coin represents an engine - when engines in a machine fail, the overall health of the machine worsens and the remaining engines have to work harder and fail faster - thus resulting in accelerated failure of the other engines and overall machine, conditional on previous events).
In this coin flipping game:
Suppose there are 5 coins (coin1, coin2, coin3,coin4, coin5). Each coin has a p=0.5 of heads at turn=1.
When a coin is tails for the first time, we permanently stopping flipping it (i.e. the coin is eliminated)
Each turn, the probability of all remaining coin getting heads decreases by 0.01.
At the start of each turn, we see how many coins have been eliminated. If all 5 coins have not been eliminated, the probability of each coin getting heads decreases by 0.01. However, if $n$ coins have been eliminated, the probability of getting heads for each non-eliminated coin decreases by $+( 0.01 * n)$ each turn thereon, until another coin is eliminated. After that, the probabilities are again updated (i..e decrease further)
The game ends when all coins have seen 1 head .
I wrote an R simulation for this problem:
num_coins <- 5
prob_decrease <- 0.01
prob_heads <- rep(0.5, num_coins)
coins <- rep("Heads", num_coins)
results <- list()
turn <- 0
while(any(coins == "Heads")) {
turn <- turn + 1
num_eliminated <- sum(coins == "Eliminated")
for (i in 1:num_coins) {
if (coins[i] == "Heads") {
coins[i] <- ifelse(runif(1) < prob_heads[i], "Heads", "Eliminated")
prob_heads[i] <- ifelse(coins[i] == "Heads", prob_heads[i] - prob_decrease * (num_eliminated + 1), 0)
}
}
results[[turn]] <- data.frame(turn = turn,
as.list(c(coins, prob_heads)),
stringsAsFactors = FALSE)
names(results[[turn]]) <- c("turn", paste0("coin_", 1:num_coins), paste0("p_heads_coin", 1:num_coins))
}
results_df <- do.call(rbind, results)
The results look like this:
turn coin_1 coin_2 coin_3 coin_4 coin_5 p_heads_coin1 p_heads_coin2 p_heads_coin3 p_heads_coin4 p_heads_coin5
1 Eliminated Heads Heads Eliminated Heads 0 0.49 0.49 0 0.49
2 Eliminated Eliminated Eliminated Eliminated Heads 0 0 0 0 0.46
3 Eliminated Eliminated Eliminated Eliminated Heads 0 0 0 0 0.41
4 Eliminated Eliminated Eliminated Eliminated Heads 0 0 0 0 0.36
5 Eliminated Eliminated Eliminated Eliminated Heads 0 0 0 0 0.31
6 Eliminated Eliminated Eliminated Eliminated Heads 0 0 0 0 0.26
7 Eliminated Eliminated Eliminated Eliminated Eliminated 0 0 0 0 0
I am interested in solving these types of general problems:
Suppose we start the game at turn=0. What is the expected number of turns it will take for this game to end? Is it possible to analytically derive a probability distribution for the number of turns required for this game to end?
If we are the $n^{th}$ turn - without any further available information, what is the expected number of coins remaining? How many more turns will the game be expected to last?
Suppose we have coins $k_1, k_2$ remaining - without any further available information, what is the expected number of coins remaining? What turn are we most likely on? What are the probabilities associated with coins $k_1, k_2$ at this turn?
In general, for some current game - given some set of information about the number of remaining coins OR the current turn of the game OR the probabilities of the number of remaining coins (i.e. current state of the game) : How much information can we infer about different properties of the current game? Probabilistically - given some information about the current state of the game: can we determine the most likely sequence of events that lead us to this current state (e.g. recursion)?
I know I can run multiple simulations of different game and see how many turns for each game to end, and the number of coins remaining at each turn for each game:
But can these types of questions be answered theoretically?
For $K = 0, 1, ... k$ coins, I tried to mathematically represent the state of this game at time = $T$ (conditional on the past):
- State of the game at time T: The state of the game at time T as $S_T$, a vector representing the state of each coin at time T:
$$S_T = (s_{T1}, s_{T2}, ..., s_{Tk})$$ where $s_{Ti}$ is the state of coin i at time T (either "Heads" or "Eliminated").
- Number of remaining coins at time T: The number of remaining coins at time T can be represented as;
$$N_T = \sum_{i=1}^{k} I(s_{Ti} = \text{"Heads"})$$
where $I(\cdot)$ is indicator function that equals 1 if the condition is true and 0 otherwise.
- Probability of coin i being Heads at time T: The probability of coin i being Heads at time T, given that it has not been eliminated at all times less than T:
$$P(s_{Ti} = \text{"Heads"} | s_{ti} \neq \text{"Eliminated"} \, \forall t < T) = p_{Ti}$$ where $p_{Ti}$ is the probability of coin i being Heads at time $T$.
Conclusion: I think an Infinite State, Non-Homogenous Markov Chain might be applicable here (e.g. Discrete Time Birth Death Process) - but I am not sure how to define and analyze it.
Can someone please help me with this?
