What am I doing wrong with this draw-without-replacement probability chain?

57 Views Asked by At

(the sequel to this question, but you shouldn't need it as background)

I am trying to figure out the probability of getting an item after drawing 2 from a pool of many. The drawing is done in two steps:

  1. Determine whether we get a jewel, a weapon, or a piece of armour.
  2. Determine which item within that category we get. Duplicates are not allowed, and because of how exactly the drawing works, the rates of getting each item change depending on what was drawn previously. (Or to put it another way: when I use the term "given", I don't mean the strict definition of $P(B|A)$, but rather another array of drop rates entirely.) There are up to 4 weapons available, though usually there's only 2 or 3.

Let's say there are 2 weapons available and I want to know the rate of the first one. The chance of getting it in pull 1 is easy: it's the chance of getting a weapon times the chance of getting this weapon specifically, or $w \cdot w_1$. But pull 2 is where I'm having the problem. Here's what I currently have (please forgive the amateur notation I don't know the correct way to phrase it):

$$\left[ j \cdot (w|j) \cdot w_1 \cdot (1-w_{p1}) \right]+ \\ \left[ w \cdot (w|w) \cdot ((1-w_1) \cdot (w_1|w_1)+(1-w_2) \cdot (w_1|w_2)+(1-w_3) \cdot (w_1|w_3)+(1-w_4) \cdot (w_1|w_4)) \right]+ \\ \left[ a \cdot (w|a) \cdot w_1 \cdot (1-w_{p1}) \right]$$

...where:

$$ \begin{array}{c|l} j & \text{rate of getting a jewel}\\ w & \text{rate of getting a weapon}\\ a & \text{rate of getting armour}\\ (w|j) & \text{rate of getting a weapon given that pull 1 was a jewel}\\ (w|w) & \text{""}\\ (w|a) & \text{""}\\ w_1 & \text{rate of getting target weapon, baseline}\\ w_{p1} & \text{rate of getting $w_1$ in pull 1 (=$w \cdot w_1$)}\\ (w_1|w_x) & \text{rate of getting $w_1$ given that pull 1 was $w_x$} \end{array} $$

I've broken the formula into three parts: the chance of getting $w_1$ given that pull 1 was a jewel, the chance of getting $w_1$ given that pull 1 was a weapon, and the chance of getting $w_1$ given that pull 1 was armour. Parts 1 and 3 seem straightforward enough: an "and" sequence of chance of getting jewel/armour, chance of getting weapon given jewel/armour, chance of getting the target weapon, and chance of not having gotten the target weapon in pull 1. Part 2 is more complicated because of how the rate array changes based on which weapon was pull 1, and is based on "the chance of pull 1 being $w_x$ times the chance of getting $w_1$ from $w_x$'s rate array".

Here's the data I'm working with:

$$ \begin{align} j & = 0.78122143626218\\ w & = 0.078117065628385\\ a & = 0.1406107181311\\ (w|j) & = 0.78122143626218\\ (w|w) & = 0.078117065628385\\ (w|a) & = 0.1406107181311\\ w_1 & = 0.30767893791199\\ w_2 & = 0.69227761030197\\ w_3 & = 0\\ w_4 & = 0\\ (w_1|w_1) & = 0\\ (w_1|w_2) & = 1\\ (w_1|w_3) & = 0\\ (w_1|w_4) & = 0 \end{align} $$ (Yes, the $(w|x)$ values happen to be the same as the $x$ values in this dataset. They can only differ if the category has only 1 item available, which is not the case in this example.)

From this, $w_{p1} = 0.054078696$. But $w_{p2} = 0.051380312$. My understanding is that if we are drawing without replacement, $w_{p1} > w_{p2}$ should be impossible. So my instinct is that I must be double-dipping somewhere, counting some probability twice. But I can't figure out where.

In short: I'm drawing without replacement, but I've gotten a result that says the second pull is less likely to succeed than the first. So what part of my formula is incorrect?

1

There are 1 best solutions below

2
On BEST ANSWER

Let me suggest a more standard set of notation.

Let $J_n$ be the event that you draw a jewel on the $n$th draw. So "$J_1$ occurred" means "I drew a jewel on the first draw." Likewise $J_2$ for the second draw.

Let $W_n$ be the event you draw a weapon on the $n$th draw, $A_n$ the event you draw armor on the $n$th draw.

In each category, the items are numbered $1$ to $k$. The numbering can be a fixed mapping over all possible situations, or it can be partly situational, e.g. "weapon number $2$ in the weapon list for a large chest in data set $1$." You just don't change the numbering on successive draws for the same chest, so if the first weapon draw for a chest was weapon number $1$ and you get another draw, you can't get weapon $1$ again.

Let $w_n$ be the identifying number of the weapon you draw on the $n$th draw if you draw a weapon then. If you don't draw a weapon on the $n$th draw, $w_n$ is undefined. (Alternatively, you can set $w_n = 0$ or some other number that cannot be in the list of possible weapons.)

So the probability that you draw a weapon on the first draw is $P(W_1).$ The probability that you draw a weapon on the second draw, given that you drew a jewel on the first draw, is $P(W_2\mid J_1).$ Notice that neither $W_1$ nor $J_1$ is a number, but rather an event.

The probability that you draw weapon $1$ on the second draw is $P(w_2 = 1).$ The probability that you do this given that the first draw was weapon $2$ is $P(w_2 = 1\mid w_1 = 2).$

This notation lets you make calculations like

\begin{align} P(w_2 = 1) &= P(w_2 = 1\mid W_1 \cap w_1 = 1\cap W_2) P(W_2 \mid W_1 \cap w_1 = 1) P(w_1 = 1\mid W_1)P(W_1)\\ &\qquad + P(w_2 = 1\mid W_1 \cap w_1 = 2\cap W_2) P(W_2 \mid W_1 \cap w_1 = 2) P(w_1 = 2\mid W_1)P(W_1)\\ &\qquad + P(w_2 = 1\mid W_1 \cap w_1 = 3\cap W_2) P(W_2 \mid W_1 \cap w_1 = 3) P(w_1 = 3\mid W_1)P(W_1)\\ &\qquad + P(w_2 = 1\mid W_1 \cap w_1 = 4\cap W_2) P(W_2 \mid W_1 \cap w_1 = 4) P(w_1 = 4\mid W_1)P(W_1)\\ &\qquad + P(w_2 = 1\mid J_1 \cap W_2) P(W_2\mid J_1) P(J_1)\\ &\qquad + P(w_2 = 1\mid A_1 \cap W_2) P(W_2\mid A_1) P(A_1). \end{align}

Of course if you needed to know which jewel was drawn on the first draw (in the case where a jewel was drawn) in order to figure out the probability that you draw a weapon on the second draw, or in order to figure out the the probability of each weapon given that you drew a jewel and then a weapon, you would need to modify this calculation. I assumed it doesn't matter which jewel is drawn.

From what I have seen of your system, it seems that as long as you start with more than one possible weapon, the probability of drawing some weapon on the second draw is not affected by which weapon you drew the first time, so $P(W_2 \mid W_1 \cap w_1 = 1) = P(W_2 \mid W_1 \cap w_1 = 2) = P(W_2 \mid W_1).$ There may also be other ways you can simplify the calculations.