FDistribution

case class FDistribution(numeratorDegreesOfFreedom: Double, denominatorDegreesOfFreedom: Double) extends ApacheContinuousDistribution

The F-distribution - ratio of two scaled chi^2 variables

Companion
object
trait Product
trait Equals
trait HasCdf
trait ContinuousDistr[Double]
trait Rand[Double]
trait Serializable
trait Density[Double]
class Object
trait Matchable
class Any

Value members

Concrete methods

def mode: Double

Inherited methods

def apply(x: Double): Double
Inherited from
ContinuousDistr
override def cdf(x: Double): Double
def condition(p: Double => Boolean): Rand[Double]
Inherited from
Rand
def draw(): Double
def drawMany(n: Int): Array[Double]
def drawOpt(): Option[Double]

Overridden by filter/map/flatmap for monadic invocations. Basically, rejeciton samplers will return None here

Overridden by filter/map/flatmap for monadic invocations. Basically, rejeciton samplers will return None here

Inherited from
Rand
def filter(p: Double => Boolean): Rand[Double]
Inherited from
Rand
def flatMap[E](f: Double => Rand[E]): Rand[E]

Converts a random sampler of one type to a random sampler of another type. Examples: randInt(10).flatMap(x => randInt(3 * x.asInstanceOf[Int]) gives a Rand[Int] in the range [0,30] Equivalently, for(x <- randInt(10); y <- randInt(30 *x)) yield y

Converts a random sampler of one type to a random sampler of another type. Examples: randInt(10).flatMap(x => randInt(3 * x.asInstanceOf[Int]) gives a Rand[Int] in the range [0,30] Equivalently, for(x <- randInt(10); y <- randInt(30 *x)) yield y

Value Params
f

the transform to apply to the sampled value.

Inherited from
Rand
def foreach(f: Double => Unit): Unit

Samples one element and qpplies the provided function to it. Despite the name, the function is applied once. Sample usage:

Samples one element and qpplies the provided function to it. Despite the name, the function is applied once. Sample usage:

<pre> for(x &lt;- Rand.uniform) { println(x) } </pre>

Value Params
f

the function to be applied

Inherited from
Rand
def get(): Double
Inherited from
Rand
def inverseCdf(p: Double): Double
override def logApply(x: Double): Double
Definition Classes
Inherited from
ContinuousDistr
def logPdf(x: Double): Double
Inherited from
ContinuousDistr
def map[E](f: Double => E): Rand[E]

Converts a random sampler of one type to a random sampler of another type. Examples: uniform.map(_2) gives a Rand[Double] in the range [0,2] Equivalently, for(x <- uniform) yield 2x

Converts a random sampler of one type to a random sampler of another type. Examples: uniform.map(_2) gives a Rand[Double] in the range [0,2] Equivalently, for(x <- uniform) yield 2x

Value Params
f

the transform to apply to the sampled value.

Inherited from
Rand
def mean: Double
override def pdf(x: Double): Double
def probability(x: Double, y: Double): Double
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product
def sample(n: Int): IndexedSeq[Double]

Gets n samples from the distribution.

Gets n samples from the distribution.

Inherited from
Rand
def sample(): Double

Gets one sample from the distribution. Equivalent to get()

Gets one sample from the distribution. Equivalent to get()

Inherited from
Rand
def samples: Iterator[Double]

An infinitely long iterator that samples repeatedly from the Rand

An infinitely long iterator that samples repeatedly from the Rand

Returns

an iterator that repeatedly samples

Inherited from
Rand
def samplesVector[U >: Double](size: Int)(implicit m: ClassTag[U]): DenseVector[U]

Return a vector of samples.

Return a vector of samples.

Inherited from
Rand
def unnormalizedLogPdf(x: Double): Double
def unnormalizedPdf(x: Double): Double

Returns the probability density function up to a constant at that point.

Returns the probability density function up to a constant at that point.

Inherited from
ContinuousDistr
def variance: Double
def withFilter(p: Double => Boolean): Rand[Double]
Inherited from
Rand

Inherited fields

lazy val logNormalizer: Double
lazy val normalizer: Double
Inherited from
ContinuousDistr