I want to understand the chance of an event happening in a game i play

Animo007

New member
Joined
Jul 28, 2021
Messages
1
In the game, I plant a tree and it takes some amount of time before I am able to harvest from it. The tree has 6 growing cycles, but the chance per growth cycle for the tree to get diseased is 1/128. So I found out the probability a tree will fully grow without getting diseased is
{\displaystyle (1-P)^{n-1}}
, where
{\displaystyle P}
is the probability 1/128 to get diseased per cycle and
{\displaystyle n}
is the number of growth cycles the tree requires to fully grow.

I want to undestand why the answer is
{\displaystyle (1-P)^{n-1}}
step by step. Thank you in advance for your time.
 
You have the formula WRONG.

According to what you say, the probability of the tree getting infected is


[math]\left ( 1 - \dfrac{1}{128} \right )^{(6 - 1)} \approx 96\%,[/math]
which makes not a lick of sense.

In your formula, p has to be the probability that the tree stays healthy, not the probability that it gets diseased. Furthermore, n has to be the first cycle that the tree is grown and no longer subject to the disease. I am going to answer assuming that n = 4 (because I am lazy).

So the probability that the tree gets diseased in period 1 is

[math]\left ( 1 - \dfrac{127}{128} \right ) = \dfrac{1}{128} = \dfrac{16384}{2097152}.[/math]
The probability that the tree stays healthy in period 1 but gets diseased in period 2 is

[math]\dfrac{127}{128} * \dfrac{1}{128} = \dfrac{127}{16384} = \dfrac{16256}{2097152}.[/math]
The probability that the tree stays healthy in periods 1 and 2 but gets diseased in period 3 is

[math]\dfrac{127}{128} * \dfrac{127}{128} * \dfrac{1}{128} = \dfrac{16129}{2097152}.[/math]
So the probability that the tree gets diseased before maturity in period 4 is

[math]\dfrac{16384}{2097152} + \dfrac{16256}{2097152} + \dfrac{16129}{2097152} = \dfrac{48769}{2097152} \approx 2.3\%[/math]
Follow that?

Notice that if n = 4 and p IS THE PROBABILITY THAT THE TREE STAYS HEALTHY, what we did was

[math](1 - p) + p(1 - p) + p^2(1 - p) = 1 - p + p - p^2 + p^2 - p^3=[/math]
[math]1 - p^3 = 1 - p^{(4-1)} \ne (1 - p)^{(4-1)}.[/math]
 
Of course there is another way to get there. The probability of not getting infected in three periods is [imath]p^3.[/imath]

I’ll let you figure out how that translates to [imath]1 - p^{(n-1)}.[/imath]

What idiot gave you the formula you quoted?
 
Top