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 -----------------------------------------------------------------------------
- Alphabetic
- By Inheritance
- T_Test
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
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
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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
-
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
-
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)
-
def
se: Double
Compute the standard error for mean difference.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
t(se: Double): Double
Compute the Student's t statistic.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated