So this is a probability/statistics problem that I got from playing a video game called World of Warcraft. I only have a basic knowledge of probability and statistics so I was wondering if anyone could help me to a solution.
Basically in the video game there are "legendaries" that you can acquire based on a hidden probability. Every time you partake in an activity, you get a chance of getting a "legendary". There is a set number of legendaries but having more or less does not affect the chances. On top of that you can only acquire one legendary at a time.
The makers of World of Warcraft implemented a system called "Bad Luck Protection" that basically "protects" people from having extremely bad luck and long periods between getting legendaries. Every activity you do without getting a legendary increases your chances until you finally get one and the probability resets back to the original value.
Now there are multiple activities you can do to get a chance at these legendaries but each one gives a different amount of bad luck protection.
My primary goal is to find out how one can calculate how much each activity gives in terms of bad luck protection. I would be given a lot of data that lists how many of each activity a player took part in before they got a legendary.
Again I'd like to reiterate that I am not great at probability and I'm not even sure there exists an algorithm to solve this problem but really wanted to ask somebody. Thank you!
For balance purposes, I highly doubt that the "bad-luck protection" ever stacks up to give you a guaranteed probability so I do not think that there's a way find out much information about that from repeated trials. However if it resets after each Legendary you get, assuming that it goes to the same chances every time it resets, you can in fact calculate that chance by only recording what happens on the first trial after each legendary drop and exclude everything else.
Suppose you consider your set of trials $X$ to be just the activity exactly after the last legendary drop (if there are multiple activities that can give you legendary items consider only one of them since the others may have different drop tables). Now record a minimum of say 200 of these trials $X$ as defined above and after that continue until you get your first legendary and keep record of what you get (that should be a fun weekend).
After you tabulate your trials in a spreadsheet or something, say you did $N$ trials (i.e. $|X|=N$). Now let us also say that there are $n$ items in your drop table labelled from $1$ to $n$ and each trial $x$ in your set takes value from $1$ to $n$ depending on what you get.
Then you can estimate the starting probability of $x$ being some value $i$ from $1$ to $n$, given you have $K$ of them in the set as $\mathbb{P}[i]=\frac{K}{N}$. Let us call these probabilities $p_i$ to make notation easier. If you already have the base drop chances of the items these steps can be skipped.
Now to sort of get a sense of roughly how long it would take to get one of the items in that table (assuming bad luck protection didn't exist), we will model the consecutive trials with the Geometric distribution. This gives the probability that you obtain the $i$th object after the $k$th try given by the distribution function:
$\mathbb{P}[k]=p_i (1-p_i)^{k-1}$
Now for this distribution, the expectation value (the long running average) is given by:
$\mathbb{E}[i]=\frac{1}{p_i}$
To find out how many tries are required to get object $i$ to drop with a desired certainty $C$ (this is just the cumulative probability but solving for $k$, do not put $C=1$ because $\ln(0)$ is undefined)
$k=\frac{\ln(1-C)}{\ln(1-p_i)}$
Going through these calculations for the legendary item can give you an estimate of an upper bound on the number of trials you are required to carry out. This is an over-estimate because this assumes that the probabilities are static while in fact the probabilities are always shifting in your favour so the actual estimated requirements should be less than this.
As a side task, when you have the probabilities figured out, you can start to look at the discrepancies between these estimates and the actual values but I doubt anyone has that much dedication to a video-game