pub struct StatisticalTestResult {
pub test_name: String,
pub statistic: f64,
pub p_value: f64,
pub critical_value: Option<f64>,
pub degrees_of_freedom: Option<f64>,
pub effect_size: Option<f64>,
pub is_significant: bool,
pub confidence_interval: Option<(f64, f64)>,
pub interpretation: String,
}Expand description
Statistical test result
Fields§
§test_name: StringName of the test performed
statistic: f64Test statistic value
p_value: f64P-value of the test
critical_value: Option<f64>Critical value (if applicable)
degrees_of_freedom: Option<f64>Degrees of freedom (if applicable)
effect_size: Option<f64>Effect size (if applicable)
is_significant: boolWhether the result is statistically significant at α = 0.05
confidence_interval: Option<(f64, f64)>Confidence interval for the difference (if applicable)
interpretation: StringInterpretation message
Implementations§
Source§impl StatisticalTestResult
impl StatisticalTestResult
Sourcepub fn new(test_name: String, statistic: f64, p_value: f64, alpha: f64) -> Self
pub fn new(test_name: String, statistic: f64, p_value: f64, alpha: f64) -> Self
Create a new test result
Sourcepub fn with_critical_value(self, critical_value: f64) -> Self
pub fn with_critical_value(self, critical_value: f64) -> Self
Set critical value
Sourcepub fn with_degrees_of_freedom(self, df: f64) -> Self
pub fn with_degrees_of_freedom(self, df: f64) -> Self
Set degrees of freedom
Sourcepub fn with_effect_size(self, effect_size: f64) -> Self
pub fn with_effect_size(self, effect_size: f64) -> Self
Set effect size
Sourcepub fn with_confidence_interval(self, lower: f64, upper: f64) -> Self
pub fn with_confidence_interval(self, lower: f64, upper: f64) -> Self
Set confidence interval
Trait Implementations§
Source§impl Clone for StatisticalTestResult
impl Clone for StatisticalTestResult
Source§fn clone(&self) -> StatisticalTestResult
fn clone(&self) -> StatisticalTestResult
Returns a duplicate 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 StatisticalTestResult
impl RefUnwindSafe for StatisticalTestResult
impl Send for StatisticalTestResult
impl Sync for StatisticalTestResult
impl Unpin for StatisticalTestResult
impl UnwindSafe for StatisticalTestResult
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 more