Each element frequencies[i] states the number of sampled delimitations of i species. i ranges between 1 and tips. Compute a 95% confidence interval in the following way:
for (mean = 0, i = 1; i <= tips; ++i)
mean += frequencies[i]*i;
mean /= samples_count
for (stdev = 0, i = 1; i <= tips; ++i)
stdev += frequencies[i]*(i - mean)*(i - mean)
stdev = sqrt(stdev/samples)
error_margin = 1.96 * stdev / sqrt(samples)
Output: <mean - error_margin , mean + error_margin>
Each element
frequencies[i]
states the number of sampled delimitations ofi
species.i
ranges between 1 andtips
. Compute a 95% confidence interval in the following way:Output:
<mean - error_margin , mean + error_margin>