Skip to main content

brunnermunzel

Function brunnermunzel 

Source
pub fn brunnermunzel(
    x: &[f64],
    y: &[f64],
    alternative: Alternative,
    distribution: BrunnerMunzelDistribution,
) -> Result<TestResult, ErrorsJSL>
Expand description

The Brunner-Munzel test of P(X < Y) + ½ P(X = Y) = ½ (SciPy’s brunnermunzel): unlike the Mann-Whitney test it does not assume equal variances or shapes. With ranks R in the pooled sample and R⁽ˣ⁾ within each sample, the placement variances are S_x² = Σ (R_i − R_i⁽ˣ⁾ − R̄ + R̄⁽ˣ⁾)² / (n_x − 1) (likewise for y), and W = n_x n_y (R̄_y − R̄_x) / ((n_x + n_y) √(n_x S_x² + n_y S_y²)).