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.

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

Value Members

  1. 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

  2. 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

  3. 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)

  4. 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