The Markov Chain is a probabilistic model based on a finite state machine.
It can be used to describe the Wish pity system in Genshin Impact. Note that this is just a theoretical model, and the actual in-game gacha system may yield different results in practice.
Winning 5 Star Featured Character
For the Event Exclusive 5 star banner, every 90 pulls will guarantee a 5 star character. There is a 1/2 probability that it is the event featured character. If one loses the 50-50 then the next 5 star won (in the next 90 pulls) is guaranteed to be the event featured character. The pity will reset, and the cycle will continue.
There are two states in the Markov Chain:
- State 1 (S1): the next 5 star has a 50-50 chance of being the event featured 5 star
- State 2 (S2): the next 5 star is guaranteed to be the event featured 5 star
The transition probabilities are:
- S1 to S1 with probability 1/2 (win the 50-50)
- S1 to S2 with probability 1/2 (lose the 50-50)
- S2 to S1 with probability 1 (win the guaranteed)
The question is: if one makes a large number of wishes, what is the expected number of times that the featured event 5 star will be won? On average, what fraction of the 5 stars won will be the featured event 5 star?
Using the Markov Chain defined above, note that every time we enter the S1 state we win the featured 5 star. So we can rephrase the question as: in the long run, what portion of the time will we spend in the S1 state?
To compute this let
- x be the probability we are in state S1
- y be the probability we are in state S2
We have that
Also, using the transition probabilities
Solving this system gives
so for all the times we win a 5 star, we are expected to win the event featured 5 star 2/3 of the time.
This can be numerically simulated on a computer as well.