1 Overview

This document presents a methodology for estimating the total and daily Mystic River herring run using video-based fish counts. In previous years, the annual herring run was estimated by MA Dept. of Marine Fishers (DMF) using in-person volunteer counts over random 10-minute intervals. DMF applied a stratified 2-way random sampling (St2WRS) design to the volunteer data using the methodology described in DMF Technical Report 25 (Nelson, 2006). However, because video counts differ from in-person volunteer counts in a number of ways, this methodology required changes to account for the unique aspects of video-based counting. A new methodology was therefore derived based on a cluster sampling design and using a ratio estimator.

The theory behind this method is presented in the next section followed by a set of example calculations for a single day. The two statistical methods (St2WRS and Cluster Sampling) are then compared using the two independent datasets collected in 2017 (volunteer-based and video-based fish counts). Next, a series of sensitivity analyses are described to determine the effects of 1) splitting each day into a different number of periods, 2) using the minimum/mean/median/maximum count for each video among those that were counted more than once, and 3) changes in the total run estimates using randomly selected subsets of the video dataset to determine the minimum number of video counts necessary to obtain an accurate estimate of the total run. A simulated dataset of video counts was then created in which every recorded video that had not already been counted was assigned a randomly generated count to again examine the total number of videos necessary to obtain an accurate run estimate. The next section then shows how the estimated run evolved over the past year as more and more videos were counted. Lastly, a potential approach is described for adjusting the video counts to improve the consistency between the run estimates based on the separate video and volunteer counts.

The major conclusions from this analysis include:

  1. The new methodology based on a cluster sampling design and using a ratio estimator provides a reasonable basis for estimating the daily and total herring run from video counts. However, it depends on the critical assumption that no fish are passing when videos are not being recorded. Therefore, it is recommended that the motion detection system be configured to err on the side of too high of sensitivity to ensure all fish are captured. Although this would lead to more videos with no fish (false positives), the analyses described below show that only a small fraction of all videos are needed to estimate the total run size.
  2. The cluster sampling method generates much lower uncertainty ranges for the estimated daily and total run sizes due to the larger sample size and because of the assumption that no fish were passing when videos were not being recorded.
  3. A comparison of estimated total run using both methodologies (St2WRS and Cluster Sampling) and both datasets (volunteer and video counts) showed that the two methodologies produce similar estimates when using one of the two datasets. However, the two estimates based on volunteer counts were significantly higher than the two estimates based on video counts reflecting the systematic bias between the two datasets. The cluster sampling method yielded much lower uncertainty bands relative to St2WRS when based on the video count data. Furthermore, the uncertainty band using cluster sampling method was similar to that for St2WRS using the volunteer count data suggesting the equations for the cluster method were properly derived.
  4. The current run estimates (both daily and total) represent the number of fish passing from 7 AM to 7 PM of each (i.e. these are estimates of fish passage during daylight only). However, the method could easily be extended to include an entire 24-hour period should night-time videos be collected and counted.
  5. Splitting each day into a different number of periods does not have a large effect on the results. Previously, DMF split each day into three 4-hour periods from 7 AM to 7 PM. A sensitivity analysis based on varying number of periods (twelve 1-hour periods to one 12-hour period) showed little impact on the results using the cluster sampling method with video counts.
  6. The variability in counts for each video does have some impact on the overall estimate. Total run estimates were computed using the minimum, mean, median, and maximum count for videos that were counted more than once. Estimates based on the mean and median counts were very similar. However, estimates based on the minimum and maximum count were significantly different (381,000 vs 441,000), although these differences are smaller than the differences between the estimates for the two independent datasets (video and volunteer counts).
  7. The variability in the video counts (i.e. when one video is counted multiple times) is not currently incorporated in the uncertainty estimate of the daily or total run sizes. Further research is needed to incorporate this error directly into the calculations. Note that the existing St2WRS method also does not incorporate errors in the volunteer counts.
  8. A reliable estimate of the total herring run can be obtained from as little as 25% of the current video count dataset. Although the uncertainty range will be greater than with the full video dataset, it will still be less than the volunteer-based estimates.
  9. Using a simulated version of the video count dataset in which all videos have either a real or randomly generated count showed that only a small fraction of all videos need to be counted to obtain a reasonable estimate of the total run. The exact fraction depends on an acceptable range of uncertainty.
  10. The evolution of the total estimated run over time using the daily cumulative set of video counts showed that a reasonable estimate was obtained by the end of the season in July 2017. As more videos were counted throughout 2017 and into 2018, the estimate was reduced by about 40,000 fish, and the uncertainty range decreased.
  11. A potential daily correction factor was derived for adjusting video counts to yield comparable estimates as the volunteer counts. Using the St2WRS method, the total run estimate was about 617,000 based on the adjusted videos, which was only about 11,000 less than the estimate based on the volunteer counts. However, applying the adjustment factor to all video counts and using the cluster sampling method yielded an estimated total of about 658,000, which is about 30,000 greater than the estimate from the volunteer counts. Thus this adjustment factor may not be appropriate for use with the cluster sampling method.

2 Theory

The previous volunteer-based estimation method assumed a 2-way stratified random sampling strategy (St2WRS) (Nelson, 2006). This strategy requires splitting each 4-hour period in equal time intervals (10-minutes), which are then randomly sampled within each period. For each sampling period, a volunteer would observe the number of fish passing through the top of the fish ladder.

For video-based counts, the time interval of each sample (i.e. video) varies because the duration of each video varies. At first, one might assume you could apply the same St2WRS strategy by splitting each 4-hour period into shorter intervals (i.e. 1 second intervals). However, because each sample (video) includes a series of sequential 1-second intervals, this does not meet the assumptions of the St2WRS strategy because the individual seconds are not randomly sampled. Rather, the videos represent clusters of time intervals with varying durations. Therefore, a cluster sampling design would more appropriate. Cluster sampling is commonly used in ecological research, such as for estimating the total tree density over a region by counting the number of trees within a randomly selected set of patches.

2.1 Total Period Estimate

In cluster sampling, we consider a 4-hour period divided into \(N\) clusters (i.e. videos) with sizes (i.e. durations) \(t_1, t_2, ..., t_N\) and counts (# fish) \(y_1, y_2, ..., y_N\). The total size of all clusters (i.e. total time of recorded video), \(T\), is thus known because we know the durations of all \(N\) videos:

\[T = \sum_{i = 1}^N t_i\]

If all \(N\) videos have also been counted, then we would know the total number of fish over the period assuming no fish were passing when videos were not being recorded (see the Limitations section below).

\[Y = \sum_{i = 1}^N y_i\]

The average number of fish passing per second, \(r\), would then simply be the total number of fish divided by the total video duration during the 4-hour period:

\[ r = \frac{\bar Y}{\bar T} = \frac{\sum_{i = 1}^N y_i / N}{\sum_{i = 1}^N t_i / N} = \frac{\sum_{i = 1}^N y_i }{\sum_{i = 1}^N t_i } \]

This value, \(r\), is known as a ratio estimator. Note that this calculated as the ratio of the means (and equivalently of the sums), and not as the mean of the ratios, which is used in the St2WRS method but would lead to a biased estimate here due to the variable durations of each video.

In reality, only a fraction of all \(N\) videos are counted. Therefore, we need to estimate the value of \(r\) and its variance based on a sampling of available videos.

Say we sample a set of \(n\) videos, which have durations of \(t_1, t_2, ..., t_n\) and counts of \(y_1, y_2, ..., y_n\). The estimated value of \(r\) (\(\hat{r}\)) can be calculated as the ratio of the sample means (\(\bar{y}\) and \(\bar{t}\)):

\[ \hat{r} = \frac{\bar{y}}{\bar{t}} = \frac{\sum_{i = 1}^n y_i / n}{\sum_{i = 1}^n t_i / n} = \frac{\sum_{i = 1}^n y_i}{\sum_{i = 1}^n t_i} \]

This makes sense because its simply the total number of fish counted from the sampled videos divided by the total duration of those videos. So it’s an average rate of fish passage per unit time overall all sampled time periods.

To quantify the uncertainty, the estimated variance of the ratio can be calculated by:

\[ var(\hat{r}) = \frac{1}{\bar{t}^2} \frac{N - n}{Nn} s_e^2\]

where \(s_e^2\) is the estimated error calculated using the sum of squares of the difference between each observed count (\(y_i\)) and the expected count based on the fish passage rate \(r\) multiplied by the video duration \(t_i\) (if video \(i\) has a duration of \(t_i\) seconds, the expected number of fish using the ratio estimator \(r\) is simply \(r \cdot t_i\)).

\[ s_e^2 = \frac{\sum_{i=1}^n (y_i - \hat r \cdot t_i)^2}{n-1} \]

Now that we have estimated the value and variance of the ratio estimator \(r\), we can use that to estimate the total number of fish over all \(N\) videos in the period and the associated variance.

The total estimated number of fish is simply the estimated rate \(r\) times the total duration of all \(N\) videos (\(T\)):

\[ \hat{Y} = \hat{r} T \]

The variance is then (note we can pull out the \(T\) since it is a known constant):

\[ var( \hat{Y} ) = var(\hat{r} T) = T^2 var( \hat{r} ) = \frac{T^2}{\bar{t}^2} \frac{N - n}{Nn}s_e^2 \]

2.2 Total Daily Estimate

After estimating the total number of fish and its variance for each period using the equations above, the total daily total estimate and variance can be computed by simply summing the individual periods of each day (note: this is the same approach as that for the St2WRS method in TR-25, which assumes the estimates and variances of the periods are independent).

For day \(k\), the estimated total number of fish overall all \(P\) periods (\(p = 1, 2, ..., P\)) is the sum of the total estimated fish during period \(p\) (\(\hat Y_{kp}\)):

\[ \hat Y_k = \sum_{p = 1}^P \hat Y_{kp} \]

Similarly, the variance is simply the sum of the period variances (assuming the periods are independent, and thus no covariance):

\[ var(\hat Y_k) = \sum_{p = 1}^P var(\hat Y_{kp}) \]

Lastly, a confidence interval for the total estimate daily count can be calculated using a t-distribution and the Satterthwaite approximation for the degrees of freedom (same as TR-25):

\[ \hat{df} = \frac{ \left( \sum_{p=1}^P a_p \cdot s_{e,p}^2 \right)^2 }{\left( \sum_{p=1}^P \frac{(a_p \cdot s_{e,p}^2)^2}{n_p - 1} \right)} \]

where

\[ a_p = \frac{N_p (N_p - n_p)}{n_p} \]

Thus the confidence interval for day \(k\) is given by:

\[ \hat Y_k \pm t_{\alpha / 2} \sqrt{var(\hat Y_k)} \]

2.3 Total Run Estimate

Similarly, the total run estimate (\(\hat Y\)) and its variance is the sum of the daily estimates over all \(L\) days:

\[ \hat Y = \sum_{k = 1}^L \hat Y_{k} \]

and

\[ var(\hat Y) = \sum_{k=1}^L var(\hat Y_k) \]

The estimated degrees of freedom are calculated by summing over all periods and days:

\[ \hat{df} = \frac{ \left( \sum_{k=1}^L \sum_{p=1}^P a_{kp} \cdot s_{e,kp}^2 \right)^2 }{\left( \sum_{k=1}^L \sum_{p=1}^P \frac{(a_{kp} \cdot s_{e,kp}^2)^2}{n_{kp} - 1} \right)} \]

The total run confidence intervals are then

\[ \hat Y \pm t_{\alpha / 2} \sqrt{var(\hat Y)} \]

2.4 Limitations

This methodology provides a sound basis for estimating the total daily and overall fish run. However, it does have the following limitations:

  • It is assumed that no fish are passing when videos are not being recorded. This assumption requires proper configuration of the motion detection trigger settings such that videos are always triggered when at least one fish is passing. In reality, the trigger settings present a trade-off in terms of having too low of a sensitivity resulting in some fish not being captured on video, and too high of a sensitivity resulting in more videos being recorded that contain no fish. For this methodology to work best, it would be better to err on the side of too high of a sensitivity to ensure that all fish are captured on video.
  • The estimated counts represent fish passage only during daylight hours (7 AM - 7 PM each day). Night-time hours could be easily included by adding additional periods to each day, which may require installation of lights at the dam so night-time videos can be reliably counted. Alternatively, the total daylight estimate could be doubled to represent a full 24-hour period. However, this would assume that the fish passage rates are similar during the night as during the day, which may or may not be true.
  • The error associated with inaccurate video counts is not incorporated in the overall estimate of uncertainty. Some videos were counted independently by two or more users. The variability among these counts of the same video is a form of measurement error. When a video is counted multiple times, this methodology uses the mean count for that video, but it does not incorporate the variance as part of the uncertainty estimate. The impact of this variability is explored more below in the Sensitivity Analyses section. The current St2WRS methodology used by DMF also does not incorporate measurement error associated with volunteer counts.
  • The estimated variance (uncertainty) of daily and total run counts assumes that the mean fish passage rate follows a t-distribution. However, because a t-distribution is unbounded, this can lead to the lower bound of the confidence interval having a negative value, which is not realistic. Alternative distributions such as the poisson distribution, which is commonly used to represent the number of events over a fixed interval of time and does not contain negative values, may yield more sensible results. However, this would require further research to determine if the fish passage rate does indeed follow a poisson distribution, and then how best to estimate the parameters of that distribution. This same issue also occurs in the St2WRS strategy.

3 Example Calculations for a Single Day

This section presents example calculations of the total estimated run for a single day, May 17, 2017. This day will be split into three 4-hour periods, similar to the stratified random sampling stategy used to compute estimates from volunteer-based counts (see the Sensitivity Analyses section below for how the number of periods per day affects the estimated total).

This figure shows all the videos that were recorded that day, and indicates whether each video was counted or not through the project website. The vertical blue lines denote the breaks between each of the three periods. Most videos were recorded from 11 AM to 7 PM during the second and third periods.

This figure shows the number of fish counted in each watched video.

To account for the variable video durations, this figure shows the number of fish per second in each video. The fish passage rate was highest in the third period, and lowest in the first.

3.1 First Period (7 AM - 11 AM)

First, we’ll estimate the total run during a single period (7 AM - 11 AM) on this day (May 17, 2017). The following figure shows when each video was recorded and whether or not it was counted. Within this period, most videos were recorded before 9 AM.

This figure shows the number of fish counted in each watched video.

To account for the variable video durations, this figure shows the number of fish per second in each video.

In total, there were 129 videos recorded (total time = 3,695 sec), of which 36 were counted (total time = 1,067 sec) and 93 were not counted (total time = 2,628 sec). The total number of fish counted over the period was 184. Thus the average fish passage rate (\(\hat r\)) was 0.172 fish per second.

\[ \begin{aligned} N &= 129 \\ n &= 36 \\ T &= \sum_{i=1}^N t_i = 3694.9 \\ \sum_{i=1}^n y_i &= 184 \\ \sum_{i=1}^n t_i &= 1067.0 \\ \hat r &= \frac{\sum_{i=1}^n y_i}{\sum_{i=1}^n t_i} = \frac{184.0}{1067.0} = 0.172 \end{aligned} \]

The total estimated fish run during this period (\(\hat Y\)) is thus 637:

\[ \begin{aligned} \hat Y &= \hat r \cdot T \\ &= 0.172 \cdot 3695.0 \\ &= 637 \end{aligned} \]

The standard error (\(s_e^2\)) is 25.54:

\[ \begin{aligned} s_e^2 &= \frac{\sum_{i=1}^n (y_i - \hat r t_i)^2}{n-1} \\ &= \frac{\sum_{i=1}^{35} (y_i - \hat 0.172 t_i)^2}{36 - 1} \\ &= 25.54 \end{aligned} \]

The variance (\(var(\hat Y)\)) is 7949.7

\[ \begin{aligned} var( \hat{Y} ) &= \frac{T^2}{\bar{t}^2} \frac{N - n}{Nn}s_e^2 \\ &= \frac{3695^2}{(1067.0 / 36) ^ 2} \frac{129 - 36}{129 \cdot 36} 25.54 \\ &= 7949.7 \end{aligned} \]

For this estimate, the degrees of freedom are 35 (\(n - 1\)), which yields a t statistic of \(t_{\alpha/2}\) = 2.03 (\(\alpha\) = 0.05).

The 95% confidence interval is thus:

\[ \begin{aligned} 95\%\space CI &= \hat Y_k \pm t_{\alpha / 2} \sqrt{var(\hat Y_k)} \\ &= 637 \pm 2.03 \sqrt{7949.7} \\ &= 637 \pm 181 \\ &= [456, 818] \end{aligned} \]

Therefore, based on the 36 videos with a total count of 184 over 1,067 seconds, the estimated total run over this period is 637 +/- 145 fish.

3.2 Total Daily Run

The same calculations were repeated for the second and third periods. The following table summarizes the results of each period.

Period N n T (sec) sum(y_i) sum(t_i) r (fish/sec) se^2 var(Y) df t(alpha/2) Est. Total Fish (Y) CI Lower CI Upper
1 129 36 3695 184.0 1067.0 0.172 25.5 7950 35 2.03 637 456 818
2 253 81 12805 2099.7 3883.3 0.541 222.8 133421 80 1.99 6924 6197 7650
3 236 56 14257 3694.7 3264.9 1.132 768.6 625967 55 2.00 16133 14548 17719

This figure shows the total estimated run with 95% confidence intervals for each period. As expected, the last period has a higher estimated total than the first period (see the figure of # fish counted per second for the entire day above).

Lastly, the total estimated daily run is calculated by combining the three periods. This table provides a summary.

N n T (sec) sum(y_i) sum(t_i) r (fish/sec) var(Y) sqrt(var(Y)) df t(alpha/2) Est. Total Fish (Y) CI Lower CI Upper
618 173 30756 5978 8215 0.77 767338 876 80 1.99 23694 21951 25437

Therefore, the estimated total daily run on on May 17, 2017 was 23,694 +/- 1,743 fish. This is based on a total of 618 recorded videos that had a total duration of 30,756 seconds (513 minutes). Of the 618 recorded videos, 173 videos were counted yielding a total count of 5,978 fish over 8,215 seconds (137 minutes) with an overall average passage rate of 0.77 fish per second.

For comparison, the total daily run on this day estimated from in-person volunteer counts of 10-minute intervals and using the St2WRS strategy from TR-25 is 24,790 +/- 8,459. And when the video counts during those 10-minute same intervals are used instead of the volunteer counts (but not including the other counted videos), the estimated daily total was 19,115 +/- 4,634.

This table summarizes all three estimates. The totals for the ratio estimator of video counts and St2WRS of volunteer counts are fairly similar; however, the uncertainty band for the volunteer counts is about 5x larger than for the ratio estimator of video counts. This is likely due to larger number of samples used to compute the estimate (i.e. there were more videos across a greater portion of the period), and through the assumption that no fish were passing when videos were not recorded (thus the fish passage rate for the total time without any recorded videos was assumed to be zeo). Lastly, the St2WRS estimate based on video counts had a much lower total than the other two methods likely due a systematic bias between video and volunteer counts (on average, video counts tend to be about 60% of volunteer counts, more on this below).

Method Est. Total 95% CI Bound Range Lower 95% CI Bound Upper 95% CI Bound
Ratio Estimator of Video Counts 23,694 +/- 1,743 21,951 25,437
St2WRS of Volunteer Counts 24,790 +/- 8,459 16,331 33,249
St2WRS of Video Counts 19,115 +/- 4,635 14,481 23,750

4 Daily and Total Run Estimates for 2017

The daily and total run estimates for 2017 are now estimated using each of the two methods (Cluster Sampling, 2-Way Stratified Random Sampling or St2WRS) and each of the two count datasets (volunteer and video). The following subsections show the results for each combination of method and dataset. All four sets of estimates are then compared in the last sub-section.

4.1 Cluster Sampling Method using Video Counts

The total estimated run based on all available video counts using cluster sampling (ratio estimator) method was 410,630.2 +/- 10,822.

N Est. Total Std. Error df t(alpha/2) Lower 95% CI Upper 95% CI
28,531 410,630 5,515 1,042 2 399,808 421,453

4.2 Cluster Sampling Method using Volunteer Counts

To ensure that the cluster sampling method was properly derived, we can use this method to generate daily and total run estimates based on the volunteer count data. These estimates can then be compared to those using the St2WRS method with the same count dataset (see below) to ensure the cluster sampling method produces reasonable results. The two sets of estimates are not expected to be identical because the ratio estimator used in the cluster sampling method is based on the ratio of the total fish to the total observation duration, whereas the St2WRS method is based on the mean of the individual ratios of fish counts to observation time. On some days, volunteers collected observations over longer or shorter periods than 10 minutes, which would cause differences in these two means. However, the results should not be significantly different.

The total estimated run based on volunteer counts using the cluster sampling (ratio estimator) method was 625,554 +/- 60,382.

N Est. Total Std. Error df t(alpha/2) Lower 95% CI Upper 95% CI
5,592 625,554 29,852 39 2 565,172 685,936

4.3 Stratified 2-Way Random Sampling using Video Counts

The total estimated run using the 2-way stratified random sampling strategy (St2WRS) and based on video counts was 381,106 +/- 42,859. Note that this only includes videos recorded during the same 10-minute intervals observed by the volunteers, and therefore does not include the entire video count dataset.

N Est. Total Std. Error df t(alpha/2) Lower 95% CI Upper 95% CI
5,688 381,106 21,066 33 2 338,247 423,965

4.4 Stratified 2-Way Random Sampling using Volunteer Counts

The total estimated run using the stratified 2-way random sampling strategy (St2WRS) from TR-25 and based on the 10-minute volunteer counts was 628,949 +/- 60,544. Note that this differs from the official DMF estimate (630,098 +/- 60,598) due to differences in the underlying dataset (i.e. DMF used a different version of the volunteer count dataset).

N Est. Total Std. Error df t(alpha/2) Lower 95% CI Upper 95% CI
5,688 628,949 29,979 41 2 568,405 689,493

4.5 Comparison of All Four Estimates

This figure shows the total estimated daily run for each of the two methods and each of the two datasets. Error bars are not shown to avoid cluttering the chart. The two volunteer-based estimates generated almost identical results using each of the two methods. The two video-based estimates also yielded comparable results, which were generally lower than the volunteer-based estimates.

This figure shows the cumulative total run over the course of the season using each of the two methods and datasets. The shaded areas represent the cumulative 95% confidence intervals. Again, the two video-based estimates are similar, however, the cluster sampling method produces a much lower uncertainty due to the larger sample size and assumption that fish do not pass when videos are not recorded. The two volunteer-based estimates are very similar in terms of both the total and the uncertainty. Therefore, this sugggests that the cluster sampling methodology was properly derived.

This figure compares the total estimated run with 95% confidence intervals. Again, the two video count-based methods yield similar results, but the Cluster Sampling method has less uncertainty. The two volunteer-based estimates are nearly identical.

Lastly, this table lists the total estimated run and 95% confidence intervals using each method and dataset.

Dataset Method Est. Total 95% CI Range
Video Cluster 410,630 +/- 10,822
Video St2WRS 381,106 +/- 42,859
Volunteer Cluster 625,554 +/- 60,382
Volunteer St2WRS 628,949 +/- 60,544

5 Sensitivity Analyses

Using the video count dataset with the cluster sampling method, a series of sensitivity analyses were performed.

5.1 Number of Periods

By default, each day was split into three 4-hour periods from 7 AM to 7 PM, which was the approach used by DMF in the St2WRS method. In this section, we explore how splitting each day into more or fewer periods affects the estimated totals.

This figure shows the daily estimated run for the number of periods per day between 1 and 12 (1 = 12 hour/period, 12 = 1 hour per period).

This figure shows the estimated total run with 95% confidence intervals. Overall, the results are very similar, although a greater number of periods (6 or 12) led to slightly higher estimated totals.

This table tabulates the estimated total and 95% CI range for each number of periods.

# Periods Hours per Period Est. Total 95% CI Range
1 12 411,049 +/- 11,869
2 6 409,375 +/- 11,141
3 4 410,667 +/- 10,829
4 3 409,552 +/- 10,698
6 2 413,597 +/- 10,384
12 1 412,890 +/- 10,915

5.2 Minimum/Mean/Median/Maximum Count for Each Video

The video count dataset includes a number of videos that were counted more than once. By default, the mean of those counts were used for each of those videos. However, in many cases there was a wide range in the counts for a single video. Therefore, to evaluate the effect of this variability, the daily and total run estimates were computed using the minimum, mean, median, and maximum count for each video.

This figure shows the estimated total daily run using each statistic of counts among videos counted more than once.

This figure shows the total estimated run with 95% confidence intervals. The results are very similar for the mean and median, but lower using the minimum count per video and higher using the maximum.

The total estimated run and 95% confidence interval range are listed in the following table. The difference in total estimated run between the minimum and maximum of the video counts was 60,592, which is greater than the individual uncertainty ranges. A review of the videos with the largest count variability did not reveal any automated way of identifying which count is more accurate. Therefore, using the mean of multiple counts is recommended for future estimates.

Video Count Statistic Est. Total 95% CI Range
Minimum 380,881 +/- 10,425
Mean 410,667 +/- 10,829
Median 409,581 +/- 10,846
Maximum 441,473 +/- 12,088

5.3 Number of Counted Videos

To evaluate how many video counts are necessary to obtain an accurate estimate of the total run size, sub-samples of the dataset were generated by randomly selecting a fraction of all existing video counts on each day. For each sub-sample, the cluster sampling methodology was then used to estimate the total run size and its uncertainty. For each fraction, this sub-sampling process was repeated over 100 trials in order to obtain a distribution of estimates for a given fraction of the dataset. The mean values of the estimated total and uncertainty range were then computed over those 100 trials.

This figure shows the estimated total run and 95% confidence interval for each of the 100 trials of each fraction of the dataset. As expected, the variability in the results is higher for smaller dataset fractions.

This figure shows the mean and variability of the estimated total run size for each fraction of the dataset. The variability is represetend using the 5th and 95th percentiles over the 100 trials for each fraction (i.e. this is not the same as the 95% confidence interval of the estimates, which are explored below). The results for the 100% fraction use all available video counts. As expected, as the fraction of the dataset increases, the variability in the estimated total decreases. However, the mean estimated total quickly approaches the total based on 100% of the dataset. With only 1% of the dataset, the estimated total is severely under-estimated.

% of Video Counts 5th Percentile of Est. Total Mean of Est. Total 95th Percentile of Est. Total
1% 135,221 195,167 267,701
10% 371,120 398,664 430,529
25% 386,861 406,796 421,882
50% 399,502 410,348 421,145
75% 404,240 409,846 415,869
90% 406,465 410,461 413,894
99% 409,339 410,673 411,625
100% 410,672 410,672 410,672

Lastly, this figure shows the mean and variability (5th and 95th percentiles) of the 95% confidence interval range for the estimated total run size over varying dataset fractions based on the 100 trials. The confidence interval range is calculated as the difference between the upper and lower bounds of the 95% confidence interval of the estimated total (i.e. if the estimated total run is 400,000 +/- 10,000 then the confidence interval range is 2 x 10,000 = 20,000). Using all of the video counts, the CI range was 21,695. But with only 25% of the videos, the mean CI range was about twice as large (49,157). Using only 1% of the video counts, the mean CI range was 158,004.

% of Video Counts 5th Percentile of Est. Total Mean of Est. Total 95th Percentile of Est. Total
1% 12,986 158,004 440,042
10% 66,645 95,364 143,804
25% 43,523 49,157 53,930
50% 31,000 33,080 35,226
75% 25,180 25,870 26,702
90% 22,656 23,169 23,587
99% 21,741 21,858 21,964
100% 21,695 21,695 21,695

6 Simulated Video Count Dataset

As of now, 6,694 of the total 28,531 videos (23.5%) have been counted. Using these counts, we can generate a complete video count dataset by assigning randomly generated counts to all videos that have not yet been counted. With this complete dataset, we can then perform simulations to determine what fraction of all recorded videos need to be counted in order to obtain an accurate estimate of the total herring run. Note that this analysis is similar to the sensitivity analysis for the number of video counts described above. However, that previous analysis only used fractions of the existing video counts, whereas this analysis will first generate random counts for all unwatched videos to create a complete dataset and then take sub-samples. With a complete video count dataset, we then know the “true” herring run size (assuming no fish passed when videos were not recorded) to which we can compare estimates from the sub-samples.

For each video that has not been counted yet, a simulated count was generated by:

  1. calculating the average fish passage rate (# fish per second) on the day that the video was recorded using the existing video counts
  2. using the poisson distribution to generate a random fish passage rate for the current video (poisson distribution has a single parameter, \(\lambda\), that is estimated using the mean from step 1)
  3. multiply the randomly generated fish passage rate by the duration of the video and round to the nearest integer

After generating a random value for all videos that have not been counted, the total simulated herring run size was 411,859 (note that existing video counts were not replaced with randomly generated values). This simulated run size can thus be used as the “true” run size for comparing simulations based on varying fractions of the dataset. Using this method, we can identify what percent of all videos need to be counted to obtain an accurate estimate of the run size.

Similar to the sensitivity analysis for the number of video counts described above, random sub-samples were generated for varying fractions of the simulated complete dataset (1% to 100%). For each fraction, a sub-sample was taken and the total estimated run and 95% confidence intervals computed using the cluster sampling method. This process was then repeated for 100 independent trials to generate a range of estimates for each dataset fraction.

This figure shows the mean and variability (5th to 95th percentiles) of the total estimated run size for varying fractions of the complete simulated video count dataset. The red point shows the estimate based on the actual video count dataset, for which 23.5% of the videos have been counted. The mean estimated total run quickly approaches the true value of 411,859, and is within a few hundred fish with only 5% of all videos counted. As expected, the variability in the estimated total decreases as more videos are included. With only 5% of all videos counted, the actual estimate could be off by as much as about 60,000 based on the 5th and 95th percentiles of the multiple trials.

% of Video Counts 5th Percentile of Est. Total Mean of Est. Total 95th Percentile of Est. Total
1% 615,588 762,893 910,624
2% 685,289 814,226 910,314
3% 723,122 815,800 898,641
4% 737,516 819,480 897,044
5% 740,966 818,939 903,985
6% 760,880 818,843 862,649
7% 778,654 825,056 877,761
8% 773,965 822,725 875,296
9% 784,818 824,105 867,195
10% 777,975 820,433 862,761
20% 794,319 823,934 849,820
30% 798,998 822,664 845,468
40% 805,191 825,555 841,836
50% 806,580 823,538 842,516
60% 813,442 824,234 835,564
70% 816,800 823,472 831,804
80% 816,081 823,296 830,298
90% 818,762 823,674 828,867
100% 823,766 823,766 823,766

This figure shows the mean and variability (5th to 95th percentile) of the 95% confidence interval range for each fraction of the complete dataset over all 100 sub-sampling trials. The confidence interval range is calculated as the difference between the upper and lower bounds of the 95% confidence interval. The red point shows the estimate based on the actual video count dataset, for which 23.5% of the videos have been counted yielding a confidence interval range of 21,645. This value is lower than the expected range based on the complete simulated dataset likely due to how the simulated counts were generated (assumes a poisson distribution).

% of Video Counts 5th Percentile of Est. Total Mean of Est. Total 95th Percentile of Est. Total
1% 103,319 196,916 323,815
2% 105,381 155,363 286,478
3% 87,367 112,188 129,854
4% 77,001 90,753 111,707
5% 70,398 79,874 93,198
6% 65,003 70,990 78,763
7% 59,738 65,520 71,298
8% 56,074 60,322 65,457
9% 52,889 56,415 61,394
10% 49,533 52,939 56,702
20% 33,720 35,171 36,791
30% 26,127 26,819 27,611
40% 20,931 21,548 22,048
50% 17,180 17,532 17,867
60% 14,080 14,330 14,611
70% 11,294 11,464 11,645
80% 8,651 8,761 8,882
90% 5,762 5,836 5,901
100% 0 0 0

7 Changes in Estimated Run as Videos are Counted

In this section, we look at how the estimated total run progressed over time as more videos were counted through the project website. Using the database of video counts, we can construct the change in estimated counts over time by only including counts performed up to each day of the year.

This figure shows the percent of all recorded videos that were counted over time as more videos were counted through the website. Note this is based on the final total number of videos at the end of the season (and not the number of videos recorded up to each date). The first counts were performed in mid-April at the start of the season. At the end of the season on July 1, 15% of the videos had been counted. As of now (March 30, 2018), 23.5% of the videos have been counted.

This figure shows how the estimated total run size and 95% confidence interval evolved over time as more videos were counted. Over the course of the season, the estimated total run size grew to a peak of 444,322 +/- 32,216 on 2017-06-14 when 14.9% had been counted. As more videos were counted, however, the total estimated run decreased to a final value of 408,780 +/- 10,862 on 2018-03-28. Overall, the estimated total run was fairly consistent from the end of the season to today, although there was a notable decrease in mid-august when a number of videos were counted.

8 Video Count Adjustment using Volunteer Counts

As shown in Section 4.5, the total run estimates were significantly different between the volunteer- and video-based counts even when only videos recorded during the 10-minute volunteer observation periods were used. In this section, we explore the differences between the two datasets and identify potential ways to adjust the video counts to be more consistent with the volunteer counts.

This figure compares the number of fish based on video and volunteer counts for each 10-minute volunteer observation period. The black line is a 1:1 line of equality, the blue line is a linear regression.

The output of the linear regression shows that the intercept is not significantly different from zero, and the slope is 0.569. This suggests that on average, video counts are 56.9% of the volunteer counts. This agrees with the difference between the total estimated runs using the St2WRS method, which was 381,106 based on the video counts and 628,949 based on volunteer counts, which have a ratio of 0.606.

## 
## Call:
## lm(formula = video_count ~ vol_count, data = df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -546.15   -2.77   -2.77   -2.77  521.85 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  2.76554    3.18431   0.868    0.385    
## vol_count    0.56872    0.01044  54.482   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 84.32 on 811 degrees of freedom
## Multiple R-squared:  0.7854, Adjusted R-squared:  0.7851 
## F-statistic:  2968 on 1 and 811 DF,  p-value: < 2.2e-16

This figure shows the total daily count as the sum of all video and volunteer counts on each day (i.e. this is not the estimated daily run). The largest difference occurred early in the season from mid-April to early-May. This was due to mis-configuration of the motion detection software, which resulted in videos not being recorded when fish were passing. From mid-May to early-June, there continued to be significant differences between the two counts. But from June 7 to the end of the season, the two counts were fairly similar.

To reduce the day-to-day variability in these counts, a smoothed version was calculated using a 5-day rolling sum of the daily total count for each dataset. This figure shows the same overall patterns as the previous figure with the largest differences in the beginning of the season and almost no difference towards the end of the season.

Using the 5-day rolling sum, we can calculate a correction factor by dividing the 5-day sum of the volunteer counts by that of the video counts. For days when the 5-day sum of video counts was zero, this factor would be infinite, thus it was set to one for those days.

The daily correction factors can then be multiplied by the original video counts to create an adjusted video count dataset, which is expected to be more similar to the volunteer counts. This figure shows the total daily count for the original video counts, adjusted video counts, and the volunteer counts. The adjusted video counts are now more comparable to the volunteer counts.

We can now use these three datasets to estimate the total run size using the St2WRS method. In addition, we can apply the daily correction factor to all video counts including those outside the 10-minute volunteer periods, and estimate the total daily run using the cluster sampling method. Thus we have four estimates: three estimates using St2WRS based on the volunteer, original video, and adjusted video counts (note the video counts only include videos recorded during the volunteer periods for this method), and two estimates using the cluster sampling method based on the original and adjusted video counts (note this includes all video counts, not just those during the volunteer periods).

The following figure and table show that the estimated totals and 95% CI for the volunteer, original video, and adjusted video counts using the St2WRS method, and for the original and adjusted video counts using the cluster sampling method. Using St2WRS, the estimates based on the volunteer and adjusted video counts are now very similar. However, when the adjusted video counts are applied to the cluster sampling method, the estimate is somewhat higher than based on the St2WRS suggesting that this adjustment factor introduces a bias that leads to over-estimation of the total run size.

Dataset Method Est. Total 95% CI Range
Volunteer St2WRS 628,949 +/- 60,544
Original Video St2WRS 381,106 +/- 42,859
Adjusted Video St2WRS 617,374 +/- 68,085
Original Video Cluster 410,667 +/- 10,829
Adjusted Video Cluster 658,052 +/- 16,062