Planting Sunflowers With Statistics
All I wanted was a bed of sunflowers.
This should be easy:
- Buy sunflower seeds
- Plant seeds
- Wait
But it wasn’t that simple.
Ignore The Package Instruction
The problem is that I don’t like it when things are planted in straight lines. Sure, in a vegetable garden it’s fine, but for flowers and trees? No thanks. It looks unnatural.
Comparing the two forests above, I much prefer the randomly scattered trunks on the left, to the man-made rows on the right.
Straight lines are nevertheless what is suggested on the sunflower seed’s packaging—30 cm between plants, 40 cm between rows—and while these instructions are easy to follow, I don’t want straight lines in my bed of sunflowers.
I want something like the forest on the left.
What Random Looks Like
So how do I plant my sunflowers in a way that resembles the natural forest?
I have 56 sunflower seeds, so what I could do is to:
- Measure up the bed.
- Put the measurement into a statistics software.
- Generate 56 random points inside the bed.
- Measure up those points in the real bed.
I did that. But I had to stop at step 3. Below you will see why.
On the left are my measurements, and on the right are 56 randomly placed “sunflowers”.
Random is Too Random
It is clear that this distribution of sunflowers looks nothing like the forest. The points clump together. There are large areas with no seeds at all. In two places the seeds are almost directly on-top of each other.
Random is too random. At least, the randomness in the forest is a different kind of randomness than the one my computer have generated here.
The process used to generate the points above is uniformly random. This means that when a point is placed, it is equally likely to end up in any location in the bed. No consideration is taken to where the other points are. It doesn’t get more random than that.
Yet, looking at the result, it is peculiar how unevenly the points are distributed.
This tricks me over and over again. Uniform randomness is mush more clustered than we intuitively think. This is the same phenomenon you experience when playing dice, and you end up getting stuck in a cluster-of-no-sixes, growing increasingly frustrated as your younger siblings ends up with all the presents, convincing you that it cannot be a fair die, but that the universe must be playing some kind of sick prank on you!
Clustering also made Spotify change their shuffling algorithm from uniformly random, because users kept complaining that the same song would be played over and over. Spotify decided to space the songs out more evenly—just like the trees in the forest.
A Different Kind of Randomness
So the trees in the forest aren’t placed uniformly random. The trees do consider where the other trees are placed. A seed has a higher change of growing into a tree if it is placed in a clearing, than if it is placed right next to the trunk of another tree. Because empty spaces have better growing conditions, the trees end up being evenly distributed, giving the best growing conditions for all.
The result is still a random pattern, but one that add some space between the points.
The straight rows in the plantation also give equal growing conditions, but the forest achieves the same without a forest manager.
Give Me Some Space
To mimic the forest we need to add space between the sunflowers so they become evenly distributed.
To simulate this there is a wealth of statistical models to choose from, but we will keep it simple here. When adding new points, we’ll add the condition that each new point much be have a minimum distance, r, to the other points.
Here r=0 is uniformly random, but as r increases the pattern becomes more and more regular.
The picture furthest to the right, is much closer to what I would like. The seeds are evenly distributed, but there are no obvious patterns.
The solution I ended up choosing required a minimum of 32 cm between each plant and 16 cm to the border of the bed.
Plant the Plan
To plant the seeds in the right locations I first considered laying a coordinate system over the bed, and using that as a guideline. I dismissed the idea, since it would require a lot of sticks and string to get the resolution fine enough.
Instead, I ended up calculating the distance to the corners A and B for all points.
Armed with 56 sprouting sunflowers, 2 tape measures, and a computer listing all the distances, it was then just a question of measure, plant, repeat.
Could This Be Done Slightly Easier?
Doing 112 measurements took more time than I care to admit. And at this point you might—rightfully—be asking, if this could have been done easier. I’m asking the same.
- Could you do it with just one tape measure?
- What results should you expect if you started in a corner, and placed each new plant 32 cm from the previous one?
- How do you calculate a good minimum distance between plants if you know the number of plants and the size and shape of the bed?
- What strategy could we use if we didn’t know the number of plants we had available before starting?
All these questions—which I don’t have any good answers to—belong to the field spatial statistics, which can be used to study point patterns like the sunflowers in my garden or the tress in the forest.
To generate the visualization I used the R package spatstat, which have seen significant contributions from some of my former supervisors at Aalborg University.
Nature Has Its Ways
After all this planning, measuring, and planting it turned out that I had overlooked something.
Seeds from last year’s sunflowers had survived. They are now growing slowly next to their larger relatives, and are violating the 32 cm distancing.
Ironically, nature has spoiled my plan for making things look natural.
I could have cut these sprouts, but decided not to. I’m not that obsessive. And at the end of the day, I guess the most natural look will come from just letting nature have its way.