pub struct Geometric<F: Float> { /* private fields */ }Expand description
Represents the state of the computation of the geometric mean.
This is a simple implementation that accumulates information about the samples, such as sum and sum of squares.
It is implemented as a wrapper around Arithmetic to compute the arithmetic mean of the logarithms of the samples.
It is best used through the StatisticsOps trait.
Implementations§
Trait Implementations§
source§impl<F: Float> StatisticsOps<F> for Geometric<F>
impl<F: Float> StatisticsOps<F> for Geometric<F>
source§fn sample_mean(&self) -> F
fn sample_mean(&self) -> F
Geometric mean of the sample
source§fn sample_sem(&self) -> F
fn sample_sem(&self) -> F
Standard error of the geometric mean
Computed as: \( G \frac{s_{\log x_i}}{\sqrt{n-1}} \) where \( G \) is the geometric mean of the sample; \( s_{\log x_i} \) is the estimate of the standard deviation of the logarithms of the samples; and \( n-1 \) is the degree of freedom of the sample data.
Reference
- Nilan Noris. “The standard errors of the geometric and harmonic means and their application to index numbers.” Ann. Math. Statist. 11(4): 445-448 (December, 1940). DOI: 10.1214/aoms/1177731830 JSTOR
source§fn ci_mean(&self, confidence: Confidence) -> CIResult<Interval<F>>
fn ci_mean(&self, confidence: Confidence) -> CIResult<Interval<F>>
Confidence interval for the geometric mean
source§fn sample_count(&self) -> usize
fn sample_count(&self) -> usize
Number of samples Read more
impl<F: Copy + Float> Copy for Geometric<F>
Auto Trait Implementations§
impl<F> RefUnwindSafe for Geometric<F>where F: RefUnwindSafe,
impl<F> Send for Geometric<F>where F: Send,
impl<F> Sync for Geometric<F>where F: Sync,
impl<F> Unpin for Geometric<F>where F: Unpin,
impl<F> UnwindSafe for Geometric<F>where F: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<F, T> MeanCI<F> for Twhere
F: Float,
T: StatisticsOps<F>,
impl<F, T> MeanCI<F> for Twhere F: Float, T: StatisticsOps<F>,
source§fn ci<I>(confidence: Confidence, data: I) -> Result<Interval<F>, CIError>where
I: IntoIterator<Item = F>,
fn ci<I>(confidence: Confidence, data: I) -> Result<Interval<F>, CIError>where I: IntoIterator<Item = F>,
Compute the confidence interval on the mean of a sample Read more
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.