pub struct SignificanceLevel<T>(/* private fields */);Expand description
The significance level is expressed as a fraction.
It represents the probability of a type I error, which corresponds to rejection of a null hypothesis which is in fact true.
Implementations§
Source§impl<T: Float + FromPrimitive + ToPrimitive> SignificanceLevel<T>
impl<T: Float + FromPrimitive + ToPrimitive> SignificanceLevel<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Returns the wrapped value as a fraction
Sourcepub fn fractional(level: T) -> Result<Self, ConfidenceError>
pub fn fractional(level: T) -> Result<Self, ConfidenceError>
Create a new significance value from a fractional level
§Errors
- If the provided value is outside [0, 1], or is NaN
Sourcepub fn percentage(level: T) -> Result<Self, ConfidenceError>
pub fn percentage(level: T) -> Result<Self, ConfidenceError>
Create a new significance value from a percentage level
§Errors
- If the provided value is outside [0, 100], or is NaN
Sourcepub fn zero_point_one_percent() -> Self
pub fn zero_point_one_percent() -> Self
Create a new significance value representing a significance level of 0.1%
Sourcepub fn zero_point_five_percent() -> Self
pub fn zero_point_five_percent() -> Self
Create a new significance value representing a significance level of 0.5%
Sourcepub fn one_percent() -> Self
pub fn one_percent() -> Self
Create a new significance value representing a significance level of 1.0%
Sourcepub fn two_point_five_percent() -> Self
pub fn two_point_five_percent() -> Self
Create a new significance value representing a significance level of 2.5%
Sourcepub fn five_percent() -> Self
pub fn five_percent() -> Self
Create a new significance value representing a significance level of 5.0%
Sourcepub fn ten_percent() -> Self
pub fn ten_percent() -> Self
Create a new significance value representing a significance level of 10.0%
Sourcepub fn probability(&self) -> T
pub fn probability(&self) -> T
Return the numerical value associated with the significance level
Sourcepub fn num_standard_deviations(&self) -> Result<T, NormalError>
pub fn num_standard_deviations(&self) -> Result<T, NormalError>
The number of standard deviations from the distribution center represented by the significance level.
This is found by calculating the inverse cumululative distribution function at the significance level. The inverse CDF gives the value of the measurand which leads to the given probability. The number of standard deviations is this divided by the standard deviation of the distribution
Source§impl<T: ToPrimitive> SignificanceLevel<T>
impl<T: ToPrimitive> SignificanceLevel<T>
pub fn to_f64(self) -> Option<SignificanceLevel<f64>>
Trait Implementations§
Source§impl<T: Clone> Clone for SignificanceLevel<T>
impl<T: Clone> Clone for SignificanceLevel<T>
Source§fn clone(&self) -> SignificanceLevel<T>
fn clone(&self) -> SignificanceLevel<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T: Debug> Debug for SignificanceLevel<T>
impl<T: Debug> Debug for SignificanceLevel<T>
Source§impl<T: ToPrimitive> Display for SignificanceLevel<T>
impl<T: ToPrimitive> Display for SignificanceLevel<T>
Source§impl<T: Float> From<ConfidenceLevel<T>> for SignificanceLevel<T>
impl<T: Float> From<ConfidenceLevel<T>> for SignificanceLevel<T>
Source§fn from(confidence_level: ConfidenceLevel<T>) -> Self
fn from(confidence_level: ConfidenceLevel<T>) -> Self
Source§impl<T: Float> From<SignificanceLevel<T>> for ConfidenceLevel<T>
impl<T: Float> From<SignificanceLevel<T>> for ConfidenceLevel<T>
Source§fn from(significance_level: SignificanceLevel<T>) -> Self
fn from(significance_level: SignificanceLevel<T>) -> Self
Source§impl<T: PartialEq> PartialEq for SignificanceLevel<T>
impl<T: PartialEq> PartialEq for SignificanceLevel<T>
impl<T: Copy> Copy for SignificanceLevel<T>
impl<T> StructuralPartialEq for SignificanceLevel<T>
Auto Trait Implementations§
impl<T> Freeze for SignificanceLevel<T>where
T: Freeze,
impl<T> RefUnwindSafe for SignificanceLevel<T>where
T: RefUnwindSafe,
impl<T> Send for SignificanceLevel<T>where
T: Send,
impl<T> Sync for SignificanceLevel<T>where
T: Sync,
impl<T> Unpin for SignificanceLevel<T>where
T: Unpin,
impl<T> UnwindSafe for SignificanceLevel<T>where
T: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.