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

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.


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.


You should be looking for the Negative Binomial Distribution. The Wikipedia link is here. Let me attempt to rephrase & remodel your question and take a shot at it.

A biased coin has a probability $p$ of flipping heads and probability $q=1-p$ of flipping tails. Let $T$ be the number of trials required to acquire $M$ heads.

I proposed this solution because we should be interested, in the bigger picture, the probability model. This way, you should be able to calculate the average, variance and other key values.

Consider a simplified model. $p=0.2$ and $M=5$. Let's try the probability that the number of flips is $T=8$. For this event to occur, the $8$th flip must be heads. For the first $7$ flips, $4$ of them should be heads and the rest tails. The probability of that happening is $$p^4q^3=0.2^4\times 0.8^3$$ So far so good? Now, notice that the heads can occur in any order. Representing in a set, the event that the 1st, 2nd, 3rd or 4th head (followed by 3 tails) is $\left\{1,2,3,4\right\}$. You realize it could be a also $\left\{3,5,6,7\right\}$ or $\left\{2,4,5,6\right\}$. Notice a pattern here? The heads could be arranged in $\large{\frac{7!}{3!4!}}$ ways. Hence, the probability that $T=8$ is

$$P(T=8)= \frac{7!}{3!4!} \times 0.2^4\times 0.8^3$$

Understand? This is the negative binomial distribution.

Let's substitute the model with your Minecraft values. $\large{p=\frac{3}{4096}}$ and $M=30$. It can be written as $T$ follows a negative binomial distribution with parameters $p$ and $M$. The average is $$\frac Mp = 40960$$ and the variance is $$\frac{M(1-p)}{p^2} = 55883093$$ or the standard deviation is $7475.50$. Assuming a tick is $0.05$ seconds, the standard deviation is $373.75$ seconds or about $5$ minutes.

UPDATE I realize this does not take into account when there are several plants planted at the same time. Well, personally, I would think that the values remain the same. This is due to the moment generating function of the distribution. The sum of 2 negative binomial distributions for the same plant will take the same value of $p$ and adds up the values of $M$, $M_1+M_2+...$ You would have to take the average of that value because this sum of the binomial distribution assumes the plants are planted one after the other. I believe there are better calculations out there for this.