Some fireflies synchronize their flashes when swarming in large groups. To test whether your recorded fireflies blink in sync, upload a short video.
This app tracks the number of flashes in each frame and applies statistical analysis to estimate whether they are synchronous.
more detailsBased on statistical analysis, this collective flashing display is
to be synchronous
Flashes per frame statistics:
Simple question, yet hard to answer. Indeed, take a minute to think about it: how would you design a test that could give you a 'random' or 'synchronous' verdict based on a video of flashes? Below is my approach.
Synchrony means that flashes tend to occur at the same time. However, several flashes can happen at the same time merely by accident. So a better definition would be to say that concurrent flashes are more frequent than they would be if they were independent.
The hypothesis that flashes are independent is called the "null hypothesis". Based on the data at hands (here, the number of flashes per frame), we can test whether the null hypothesis is likely or not. To do this accurately, we need a statistical model and math to implement it. More details below.
And of course we need data, in the form of a video recording of the collective display.
Recording firefly flashes is tricky because their bioluminescence is very dim. However, modern phone cameras can capture flashes under the right conditions. For best recordings, make sure to be close enough, to increase the camera's light sensitivity (if possible), to avoid light pollution in the background, and to keep your phone steady.
It's possible that your recording will look totally dark with no blinks. But flashes might still be there. To check, upload your clip below, and select a low brightness threshold (say, 10).
This app analyzes short video recordings of fireflies flashes.
Specifically, it does two things:
1) it locates flashes in each frame of the video;
2) it applies a statistical test to determine whether the collective display is likely to be
synchronized.
To locate flashes in an image, it simply looks for bright spots on a dark background. You can change how bright the spots have to be by changing the threshold value on the slider above.
Based on the statistics of the number of flashes per frame, it calculates a likelihood that they may be synchronized. The details of this analysis are below.
The null hypothesis proposes that firefly flashes are uncorrelated. One way to frame this idea into a statistical model is to consider that the number of flashes per frame follows a Poisson distribution. For a Poisson distribution, the mean number of flashes is equal to its variance, which is essentially a measure of the fluctuations around the mean.
Thus, the app calculates both the mean and the variance. If they are too far apart, the null hypothesis is rejected, and the display is likely to be synchronous.
But how far apart should the mean and variance be for the difference to be significant? There are various ways to interpret the difference. Here, I use a parameter called the Z-value, based on a list of tests proposed in this paper. The Z-value should typically be between -2 and 2 for a process described by a Poisson distribution. When it is beyond these boundaries, the app returns "likely synchronous".
Further details and explanations can be found in our paper on Photinus knulli.