[Math] How long does it take for a given number of Minecraft sugar cane plants to grow to full size

probability

In Minecraft, the growth of sugar cane plants is governed by random events. On each game tick (1/20th of a second), each sugar cane plant has a certain probability of advancing to the next stage of growth. The random event must occur 30 times for the plant to grow from 1-block tall to 3-blocks tall.

My goal is to calculate the average amount of time required for a given number of sugar cane plants to all grow completely, if all of the plants are in the same field and planted simultaneously.

Since many users at Math.SE might not know much about Minecraft sugar cane, I'm going to reformulate the problem in a more general way:

We have a given number $N$ of weighted coins, each with the same probability $P$ of landing on heads. Each coin is flipped until it lands on heads a given minimum $M$ number of times, and we count the number of flips required by each coin. The time T is given by the number of flips required by the coin that took the most flips (it is the maximum out of the data set). What is the average value of $T$?

When $N = 1$, it is clear that $T \approx M/P$. When $P = 0.5$ (a fair coin) and $M = 3$, it will take an average of six flips for the coin to land on heads three times.

In the case of sugar cane, my internet research tells me that $P = 3/4096$ and $M = 30$. This means that it takes an average of $40960$ game ticks for a single plant to grow completely.

When $N > 1$, I don't know exactly how to approach the problem. I've done some computer simulations, and by trying to fit curves to the data I found that it seems to follow this pattern:
$$T \approx f(M,P) \times \log(N) + M/P$$ The formula for $f(M,P)$ is unknown.

Edit: For clarification, $N$ represents the number of sugar cane plants in the field.

Best Answer

The time $T$ it takes a single sugar cane plant to grow completely follows a negative binomial distribution.

Given the cumulative distribution function of $T_i\sim T$ you can compute the cumulative distribution function of $T_{\text{total}}=\max\{T_1,\ldots,T_N\}$ as $$ \mathbb{P}(T_{\text{total}}\leqslant t) = \mathbb{P}(T\leqslant t)^N. $$

Given the distribution of $T_{\text{total}}$ it will be relatively easy to compute its expectation.