Skip to main content

t_test

Function t_test 

Source
pub fn t_test<T>(x: &[T], y: &[T], test_type: TTestType) -> TestResult<f64>
where T: FloatOps,
Expand description

Perform a t-test comparing two samples.

This function performs either Student’s t-test (assuming equal variances) or Welch’s t-test (allowing unequal variances) on two samples.

§Arguments

  • x - First sample
  • y - Second sample
  • test_type - Type of t-test to perform

§Returns

TestResult containing the t-statistic and p-value.