Bounds on ratios in sampled sets.
More...
#include <bounds_on_ratios_in_sampled_sets.hpp>
Bounds on ratios in sampled sets.
This class is used to compute the bounds on the estimate of the ratio |B| / |A|, where:
-
|A| is the unknown size of a set A of unique identifiers.
-
|B| is the unknown size of a subset B of A.
-
a = |SA| is the observed size of a sample of A that was obtained by Bernoulli sampling with a known inclusion probability f.
-
b = |SA ∩ B| is the observed size of a subset of SA.
◆ lower_bound_for_b_over_a()
static double lower_bound_for_b_over_a |
( |
uint64_t |
a, |
|
|
uint64_t |
b, |
|
|
double |
f |
|
) |
| |
|
inlinestatic |
Return the approximate lower bound based on a 95% confidence interval.
- Parameters
-
a | See class javadoc |
b | See class javadoc |
f | the inclusion probability used to produce the set with size a and should generally be less than 0.5. Above this value, the results not be reliable. When f = 1.0 this returns the estimate. |
- Returns
- the approximate upper bound
◆ upper_bound_for_b_over_a()
static double upper_bound_for_b_over_a |
( |
uint64_t |
a, |
|
|
uint64_t |
b, |
|
|
double |
f |
|
) |
| |
|
inlinestatic |
Return the approximate upper bound based on a 95% confidence interval.
- Parameters
-
a | See class javadoc |
b | See class javadoc |
f | the inclusion probability used to produce the set with size a. |
- Returns
- the approximate lower bound
◆ get_estimate_of_b_over_a()
static double get_estimate_of_b_over_a |
( |
uint64_t |
a, |
|
|
uint64_t |
b |
|
) |
| |
|
inlinestatic |
Return the estimate of b over a.
- Parameters
-
a | See class javadoc |
b | See class javadoc |
- Returns
- the estimate of b over a
◆ estimate_of_a()
static double estimate_of_a |
( |
uint64_t |
a, |
|
|
double |
f |
|
) |
| |
|
inlinestatic |
Return the estimate of A.
See class javadoc.
- Parameters
-
a | See class javadoc |
f | the inclusion probability used to produce the set with size a. |
- Returns
- the approximate lower bound
◆ estimate_of_b()
static double estimate_of_b |
( |
uint64_t |
b, |
|
|
double |
f |
|
) |
| |
|
inlinestatic |
Return the estimate of B.
See class javadoc.
- Parameters
-
b | See class javadoc |
f | the inclusion probability used to produce the set with size b. |
- Returns
- the approximate lower bound
The documentation for this class was generated from the following file: