breeze.stats.hypothesis

This package contains hypothesis tests.

Type members

Classlikes

case class Chi2Result(chi2: Double, pVal: Double)

Value members

Concrete methods

def chi2Test(successControl: Int, trialsControl: Int, successVariant: Int, trialsVariant: Int): Chi2Result
def chi2Test(control: (Int, Int), trials: Seq[(Int, Int)]): Seq[Chi2Result]

Takes a sequence of N Bernoulli trials, and determines using a chi2 test whether there is a statistically significant difference between the N variants and a control. I.e., the variants may differ from each other, but this only determines whether they differ from control.

Takes a sequence of N Bernoulli trials, and determines using a chi2 test whether there is a statistically significant difference between the N variants and a control. I.e., the variants may differ from each other, but this only determines whether they differ from control.

The pVal reported in the results is the probability (assuming the null hypothesis) of a false positive at least this large in any variant, not in one particular variant. I.e., multiple comparisons are corrected for.

Takes a p-value run for a single statistical test, and then corrects for multiple comparisons.

Takes a p-value run for a single statistical test, and then corrects for multiple comparisons.

I.e., if you run n tests with a p-value cutoff of 5% yielding p-values p1, p2, ..., pn, then if sidakCorrectedPVal(p1,n) < 5% or sidakCorrectedPVal(p2, n) < 5%, etc, you can reject the null hypothesis.

Takes a p-value run for a single statistical test, and then corrects for multiple comparisons.

Takes a p-value run for a single statistical test, and then corrects for multiple comparisons.

This function is the inverse of sidakCorrectedPVal. If you run n tests and want a 5% chance of false positive (assuming null hypothesis is true) across all tests, then you can run each individual test with a p-value cutoff of sidakCorrectedPValCutoff(0.05, n).

def tTest[T](it1: IterableOnce[T], it2: Iterable[T])(implicit numeric: Numeric[T]): Double

Implements two tailed Welch's T Test (equivalent to t.test in R) Returns a p value

Implements two tailed Welch's T Test (equivalent to t.test in R) Returns a p value

def tTest[X](it1: X, it2: X)(implicit ct: CanTraverseValues[X, Double]): Double
def tTest[T](it1: Iterable[T])(implicit numeric: Numeric[T]): Double
def tTest[X](it1: X)(implicit ct: CanTraverseValues[X, Double]): Double