class T_Test extends AnyRef

The T_Test class is used to test whether the means, 'μ1' and 'μ2', of two data samples, 'x' and 'y', are different, 'μ1 ≠ μ2', using a Two-Sample, Independent t-test. Assumes samples are drawn from Normal distributions. The error in the test is measured by the conditional probability 'p' that a "difference is detected" when there "actually is none".

p = P(different | μ1 = μ2)

The power of the test is the ability to detect actual differences. '1 - power' is measured by the conditional probability 'q' that a "difference is not detected" when there "actually is one".

q = P(! different | μ1 ≠ μ2)

These are called type I (measured by p) and type II (measured by q) errors.

See also

en.wikipedia.org/wiki/Type_I_and_type_II_errors -----------------------------------------------------------------------------

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. T_Test
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new T_Test(x: VectorD, y: VectorD, pooled: Boolean = true)

    x

    the first sample's vector of data

    y

    the second sample's vector of data

    pooled

    whether the variances can be assumed to be the same (hence pooled)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. def df: Double

    Compute the effective degrees of freedom: For pooled, it is the sum of the two degrees of freedom of the samples after their means are estimated.

    Compute the effective degrees of freedom: For pooled, it is the sum of the two degrees of freedom of the samples after their means are estimated.

    df = df1 + df2 = n1 + n2 - 2

    while for unequal variances, it is the scaled weighted harmonic mean of the two degrees of freedom.

    See also

    stats.stackexchange.com/questions/116511/ explanation-for-non-integer-degrees-of-freedom-in-t-test-with-unequal-variances/116556#116556

  7. def different(p: Double, α: Double = 0.05): Boolean

    Determine whether the difference in the two means is statistically significant.

    Determine whether the difference in the two means is statistically significant.

    p

    the probability of a type I error

    α

    the desired sigificance level

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def p(t: Double, df: Double): Double

    Compute the probability of a type I error using the Student's t distribution.

    Compute the probability of a type I error using the Student's t distribution.

    t

    the value of the Student's t statistic

    df

    the effective degrees of freedom

    See also

    scalation.random.CDF.studentTCDF

  17. def q(t: Double, df: Double): Double

    Compute the probability of a type II error using the Noncentral t distribution.

    Compute the probability of a type II error using the Noncentral t distribution.

    t

    the value of the Student's t statistic

    df

    the effective degrees of freedom

    See also

    scalation.random.CDF.noncentralTCDF

  18. def same(q: Double, β: Double = 0.1): Boolean

    Determine whether the difference in the two means is statistically insignificant.

    Determine whether the difference in the two means is statistically insignificant. Note, typically this is a weaker test than 'different'.

    q

    the probability of a type II error

    β

    the desired power level (β = 1 - power)

  19. def se: Double

    Compute the standard error for mean difference.

  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def t(se: Double): Double

    Compute the Student's t statistic.

  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped