How to calculate the probability of the below situations?

35 Views Asked by At

I have a game board with 9 positions, where I can place heroes. If a monster is able to attack only a single specific position, and there are 4 heroes standing on these 9 positions, each on a different possition, what is the chance, that the monster can attack a hero on that position?

Is it numberOfHeroes/numberOfPositions?

What if the same monster, can attack 3 different positions, but will only attack a single position? What is the chance, that there will be a hero in any of those positions?

What if the same monster, can attack 3 different positions, and he will attack ALL of these positions, regardless if there is a hero on any of them, or not? What is the chance, that a monster will attack a hero? What is the chance, that he will attack multiple heroes?

1

There are 1 best solutions below

2
On BEST ANSWER

Your answer to your first question is "yes" - the probability is $4/9$.

I'm not sure I understand the second question. Perhaps you mean there are just three positions he is allowed to attack, and he will choose one of them. If the heroes don't know anything about those possibilities and they choose spots at random then the probability of a successful attack is still just $4/9$.

For the last question, you have to think about binomial coefficients: $$ \binom{n}{k} $$ is the number of ways to choose $k$ things from among $n$. You can read about how to calculate them in wikipedia: https://en.wikipedia.org/wiki/Binomial_coefficient.

There are $\binom{9}{3}$ ways the monster can choose positions to attack. That's the denominator for the probability calculations.

To find the numerators, here's what to count. Suppose the heroes have chosen their $4$ positions. Then there are $\binom{5}{3}$ ways the monster can attack none of them (ways to choose from the other $5$ positions). There are $$ \binom{5}{2}\binom{4}{1} $$ ways to attack two empty positions and one with a hero, $$ \binom{5}{1}\binom{4}{2} $$ ways to attack one empty positions and two with a hero, and $$ \binom{4}{3} $$ ways to attack all three heroes.