0
$\begingroup$

This problem came up in a game I was playing and I was curious how I would apply conditional probability here, or if conditional probability is even appropriate.


Problem: Imagine a turn-based game where you are up against four enemies. Their health points are as follows:

  • Enemy A: 5
  • Enemy B: 8
  • Enemy C: 1
  • Enemy D: 11

You have an option to play an attack that strikes randomly twice. It may strike the same enemy twice if their health pool allows for it (e.g., striking enemy D twice), or it may strike two different enemies. Each time it strikes, this attack deals 8 points of damage. What is the probability that you kill two enemies?


I tried working this out by hand, and here's what I got:

  • Kill A: $\frac{3}{4}$ chance; then $\frac{2}{3}$ chance of killing another = ($\frac{3}{4}) \times (\frac{2}{3}) = \frac{1}{2}$
  • Kill B: $\frac{3}{4}$ chance; then $\frac{2}{3}$ chance of killing another = ($\frac{3}{4}) \times (\frac{2}{3}) = \frac{1}{2}$
  • Kill C: $\frac{3}{4}$ chance; then $\frac{2}{3}$ chance of killing another = ($\frac{3}{4}) \times (\frac{2}{3}) = \frac{1}{2}$
  • Kill D: $0$ chance, then $\frac{4}{4}$ for the second strike since all enemies are within killing range = $0 \times \frac{4}{4} = 0$

We can end up in any one of these four states, so summing them, we get: $\frac{1}{2} + \frac{1}{2} + \frac{1}{2} = \frac{3}{2}$ which... makes no sense because it exceeds $1$.


I also tried applying Bayes' Theorem, but that didn't get me very far as I had trouble identifying what the two probabilities are:

$$ P(A|B) = \frac{P(A)}{P(B)}P(B|A) $$

Where:

  • $P(A|B)$ is the probability of killing a second enemy given that you already killed one
  • $P(A)$ is the probability of killing an enemy on your second hit
  • $P(B)$ is the probability of killing an enemy on your first hit
  • $P(B|A)$... doesn't seem to make sense in the context of this problem

Where am I going wrong? Should I not be treating this as a conditional probability problem?

$\endgroup$
6
  • $\begingroup$ Not sure the rules are clear. If, say, you strike $C$ first, then $C$ is gone (right?)...does that mean you can't strike them again? If so, then to kill $2$ enemies, you just have to avoid striking $D$. Or have I misunderstood? Of course, if you are allowed to uselessly strike at a dead enemy, then you also have to avoid that. $\endgroup$
    – lulu
    Commented Aug 2, 2022 at 13:59
  • 1
    $\begingroup$ The probability of killing $A$ on the first hit is 1/4, not 3/4, and similarly for $B$ and $C$. $\endgroup$ Commented Aug 2, 2022 at 14:02
  • $\begingroup$ @lulu Yeah, that's correct: If you hit C, then they die and you are left with only three enemies. I was under the impression that this is conditional probability because your candidate pool for the second strike depends on which enemy you hit on the first strike. $\endgroup$ Commented Aug 2, 2022 at 14:06
  • $\begingroup$ @eyeballfrog Oops, you're right! $\endgroup$ Commented Aug 2, 2022 at 14:06
  • $\begingroup$ It is very confusing. From where have you got chances of 3/4 each for A,B,C, and 0 for D ? These have been put in the solution, but aren't there in the question ! $\endgroup$ Commented Aug 2, 2022 at 14:40

1 Answer 1

2
$\begingroup$

I don't know if I'm missing something, but I think it's quite simple. To kill 2 enemies, you cannot hit enemy D. Hence, for the first strike it's $\frac{3}{4}$, and then you need to hit one of the remaining two with less than 8 points of health, i.e. $\frac{2}{3}$. Which gets you to $\frac{3}{4} \times \frac{2}{3} = \frac{1}{2}$

$\endgroup$
3
  • 1
    $\begingroup$ That's the answer I got as well, for the same reasons (+1). Like you, however, I feel like we are missing some key part of the question. $\endgroup$
    – lulu
    Commented Aug 2, 2022 at 13:59
  • $\begingroup$ Oh... I may have been overthinking this. I thought I would need to use conditional probability here because I was under the impression that the first strike changes the outcome of the second strike (because your enemy pool might change). $\endgroup$ Commented Aug 2, 2022 at 14:08
  • 1
    $\begingroup$ As others mentioned, they way you worked it out is fine, but the probability to strike each one of A,B,C,D is $\frac{1}{4}$ on the first strike. This gets you the same result if you add up the three cases where 2 enemies are killed, but there is no need to distinguish those three, as they are all killed by a single strike. $\endgroup$
    – Alex
    Commented Aug 2, 2022 at 14:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .