pub struct TestResult {
pub statistic: f64,
pub p_value: f64,
pub confidence_interval: Option<(f64, f64)>,
pub degrees_of_freedom: Option<f64>,
pub effect_size: Option<f64>,
pub standard_error: Option<f64>,
pub metadata: HashMap<String, f64>,
}Fields§
§statistic: f64The test statistic value (e.g., t-statistic, U statistic)
p_value: f64The p-value of the test
confidence_interval: Option<(f64, f64)>Confidence interval for the effect size/difference (if available)
degrees_of_freedom: Option<f64>Degrees of freedom (for parametric inference)
effect_size: Option<f64>Effect size measurement
standard_error: Option<f64>Standard error of the effect size or test statistic
metadata: HashMap<String, f64>Additional test-specific information
Implementations§
Source§impl TestResult
impl TestResult
Sourcepub fn new(statistic: f64, p_value: f64) -> Self
pub fn new(statistic: f64, p_value: f64) -> Self
Create a new test result with minimal information
Sourcepub fn with_effect_size(statistic: f64, p_value: f64, effect_size: f64) -> Self
pub fn with_effect_size(statistic: f64, p_value: f64, effect_size: f64) -> Self
Create a new test result with effect size
Sourcepub fn with_confidence_interval(self, lower: f64, upper: f64) -> Self
pub fn with_confidence_interval(self, lower: f64, upper: f64) -> Self
Add confidence interval to the result
Sourcepub fn with_degrees_of_freedom(self, df: f64) -> Self
pub fn with_degrees_of_freedom(self, df: f64) -> Self
Add degrees of freedom to the result
Sourcepub fn with_standard_error(self, se: f64) -> Self
pub fn with_standard_error(self, se: f64) -> Self
Add standard error to the result
Sourcepub fn with_metadata(self, key: &str, value: f64) -> Self
pub fn with_metadata(self, key: &str, value: f64) -> Self
Add additional metadata
Sourcepub fn is_significant(&self, alpha: f64) -> bool
pub fn is_significant(&self, alpha: f64) -> bool
Check if the result is statistically significant at the given threshold
Trait Implementations§
Source§impl Clone for TestResult
impl Clone for TestResult
Source§fn clone(&self) -> TestResult
fn clone(&self) -> TestResult
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TestResult
impl RefUnwindSafe for TestResult
impl Send for TestResult
impl Sync for TestResult
impl Unpin for TestResult
impl UnwindSafe for TestResult
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.