object T_Test1
The T_Test1
companion object provides a convenient method for performing t-test.
If 'difference' is false (fail to reject), making a decision on this basis
can be risky, so 'same' should be called.
If neither 'different' or 'same' are true, need to collect more data.
- Alphabetic
- By Inheritance
- T_Test1
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
def
c(df: Int, α: Double = 0.05): Double
Return the critical value for the Student's t-distribution.
Return the critical value for the Student's t-distribution. For a two-sided/two-tailed test, the critical values are '-c' and 'c' and the total probability mass in the tails being 'α'a.
- df
the effective degrees of freedom
- α
the desired sigificance level
-
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. If true, "reject" the null hypothesis that μ = μ0, else "fail to reject"
- p
the probability of a Type I error
- α
the desired sigificance level
-
def
same(p2: Double, pw: Double = 0.9): 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'.
- p2
the probability of a Type II error
- pw
the desired power level (p2 = 1 - power)
-
def
test(x: VectorD, μ0: Double, α: Double = 0.05, pw: Double = 0.9): Unit
Perform a one-sample t-test based on comapring the sample mean with the "known" population mean.
Perform a one-sample t-test based on comapring the sample mean with the "known" population mean.
- x
the sample's vector of data
- μ0
the "known" population mean
- α
the desired sigificance level
- pw
the desired power of the test