package hypothesis
This package contains hypothesis tests.
- Alphabetic
- By Inheritance
- hypothesis
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- case class Chi2Result(chi2: Double, pVal: Double) extends Product with Serializable
Value Members
-
def
chi2Test(control: (Long, Long), trials: Seq[(Long, Long)]): 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.
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.
- def chi2Test(successControl: Long, trialsControl: Long, successVariant: Long, trialsVariant: Long): Chi2Result
-
def
sidakCorrectedPVal(p: Double, n: Int): Double
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.
-
def
sidakCorrectedPValCutoff(p: Double, n: Int): Double
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[X](it1: X)(implicit ct: CanTraverseValues[X, Double]): Double
- def tTest[T](it1: Traversable[T])(implicit numeric: Numeric[T]): Double
- def tTest[X](it1: X, it2: X)(implicit ct: CanTraverseValues[X, Double]): Double
-
def
tTest[T](it1: TraversableOnce[T], it2: Traversable[T])(implicit numeric: Numeric[T]): Double
Implements two tailed Welch's T Test (equivalent to t.test in R) Returns a p value