Packages

  • package root
    Definition Classes
    root
  • package grizzled

    The Grizzled Scala Library contains a variety of miscellaneous, general purpose utility classes and objects.

    The Grizzled Scala Library contains a variety of miscellaneous, general purpose utility classes and objects.

    The home page for the Grizzled Scala Library is http://software.clapper.org/grizzled-scala/. Please see that page for complete details, including installation instructions.

    Definition Classes
    root
  • package math

    Miscellaneous math and statistics utilities.

    Miscellaneous math and statistics utilities.

    Definition Classes
    grizzled
  • stats
  • util

object stats

Miscellaneous statistics-related functions.

Note: You must import scala.math.Numeric (or just Numeric._) for these functions to work. For example:

import Numeric._
import grizzled.math.stats._

val l = List[Double]( ... )
println(median(l))
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. stats
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. def arithmeticMean[T](item: T, items: T*)(implicit arg0: Numeric[T]): Double

    Calculates the arithmetic mean of the values of the passed-in numbers.

    Calculates the arithmetic mean of the values of the passed-in numbers.

    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the arithmetic mean

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def geometricMean[T](item: T, items: T*)(implicit arg0: Numeric[T]): Double

    Calculates the geometric mean of the values of the passed-in numbers, namely, the n-th root of (x1 * x2 * ...

    Calculates the geometric mean of the values of the passed-in numbers, namely, the n-th root of (x1 * x2 * ... * xn). Note that all numbers used in the calculation of a geometric mean must be positive.

    For a discussion of when a geometric mean is more suitable than an arithmetic mean, see http://www.math.toronto.edu/mathnet/questionCorner/geomean.html.

    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the geometric mean

  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def harmonicMean[T](item: T, items: T*)(implicit arg0: Numeric[T]): Double

    Calculates the harmonic mean of the values of the passed-in numbers, namely: n / (1/x1 + 1/x2 + ... + 1/xn).

    Calculates the harmonic mean of the values of the passed-in numbers, namely: n / (1/x1 + 1/x2 + ... + 1/xn).

    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the harmonic mean

  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def mean[T](item: T, items: T*)(implicit arg0: Numeric[T]): Double

    Synonym for arithmeticMean.

    Synonym for arithmeticMean.

    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the arithmetic mean

    See also

    arithmeticMean

  16. def median[T](item: T, items: T*)(implicit arg0: Numeric[T]): Double

    Calculates the median of the values of the passed-in numbers.

    Calculates the median of the values of the passed-in numbers.

    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the median

  17. def mode[T](item: T, items: T*)(implicit arg0: Numeric[T]): List[T]

    Calculates the mode (most common value(s)) of the values of the passed-in numbers.

    Calculates the mode (most common value(s)) of the values of the passed-in numbers. If there are multiple common values, they're all returned.

    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    list of modal values

  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. def popStdDev[T](item: T, items: T*)(implicit arg0: Numeric[T]): Double

    Shorter synonym for populationStandardDeviation.

    Shorter synonym for populationStandardDeviation.

    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the standard deviation

  22. def populationStandardDeviation[T](item: T, items: T*)(implicit arg0: Numeric[T]): Double

    Calculate the population standard deviation of the specified values.

    Calculate the population standard deviation of the specified values. The population standard deviation is merely the square root of the population variance. Thus, this function is just shorthand for:

    java.lang.Math.sqrt(populationVariance(items))
    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the standard deviation

  23. def populationVariance[T](item: T, items: T*)(implicit arg0: Numeric[T]): Double

    Calculate the population variance of the finite population defined by the items arguments.

    Calculate the population variance of the finite population defined by the items arguments. The population variance is defined as:

    1
    - *  SUM(i=1, N) { (x[i] - mean)^2^ }
    N

    See:

    - http://en.wikipedia.org/wiki/Variance#Population_variance_and_sample_variance - http://www.quickmba.com/stats/standard-deviation/

    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the variance

  24. def range[T](item: T, items: T*)(implicit arg0: Numeric[T]): T

    Calculate the range of a data set.

    Calculate the range of a data set. This function does a single linear pass over the data set.

    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the range

  25. def sampleStandardDeviation[T](item: T, items: T*)(implicit arg0: Numeric[T]): Double

    Calculate the sample standard deviation of the specified values.

    Calculate the sample standard deviation of the specified values. The sample standard deviation is merely the square root of the sample variance. Thus, this function is just shorthand for:

    java.lang.Math.sqrt(sampleVariance(items))
    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the sample standard deviation

  26. def sampleStdDev[T](item: T, items: T*)(implicit arg0: Numeric[T]): Double

    Shorter synonym for sampleStandardDeviation.

    Shorter synonym for sampleStandardDeviation.

    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the sample standard deviation

    See also

    populationStandardDeviation

  27. def sampleVariance[T](item: T, items: T*)(implicit arg0: Numeric[T]): Double

    Calculate the unbiased sample variance of the finite sample defined by the items arguments.

    Calculate the unbiased sample variance of the finite sample defined by the items arguments. The sample variance is defined as:

      1
    ----- *   SUM(i=1, N) { (x[i] - sampleMean)^2^  }
    N - 1

    See:

    - http://en.wikipedia.org/wiki/Variance#Population_variance_and_sample_variance - http://www.quickmba.com/stats/standard-deviation/

    item

    the first number on which to operate

    items

    the remaining numbers on which to operate

    returns

    the variance

  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped