Skip to content

Latest commit

 

History

History
210 lines (137 loc) · 4.38 KB

f.rst

File metadata and controls

210 lines (137 loc) · 4.38 KB

F-Distribution

Table of contents


The density function of the F distribution:

f(x; d_1, d_2) = \frac{1}{\mathcal{B} \left( \frac{d_1}{2}, \frac{d_2}{2} \right)} \left( \frac{d_1}{d_2} \right)^{\frac{d_1}{2}} x^{d_1/2 - 1} \left(1 + \frac{d_1}{d_2} x \right)^{- \frac{d_1+d_2}{2}} \times \mathbf{1} [x \geq 0]

where \mathcal{B}(a,b) denotes the Beta function.

Methods for scalar input, as well as for vector/matrix input, are listed below.

.. doxygenfunction:: df(const T1, const T2, const T3, const bool)
   :project: statslib

.. doxygenfunction:: df(const std::vector<eT>&, const T1, const T2, const bool)
   :project: statslib

.. doxygenfunction:: df(const ArmaMat<eT>&, const T1, const T2, const bool)
   :project: statslib

.. doxygenfunction:: df(const BlazeMat<eT, To>&, const T1, const T2, const bool)
   :project: statslib

.. doxygenfunction:: df(const EigenMat<eT, iTr, iTc>&, const T1, const T2, const bool)
   :project: statslib


The cumulative distribution function of the F distribution:

F(x; d_1, d_2) = \int_0^x f(z; d_1, d_2) dz = I_{\frac{d_1 x}{d_2 + d_1 x}} (d_1 / 2, d_2 / 2)

where I_x (a,b) denotes the regularized incomplete Beta function.

Methods for scalar input, as well as for vector/matrix input, are listed below.

.. doxygenfunction:: pf(const T1, const T2, const T3, const bool)
   :project: statslib

.. doxygenfunction:: pf(const std::vector<eT>&, const T1, const T2, const bool)
   :project: statslib

.. doxygenfunction:: pf(const ArmaMat<eT>&, const T1, const T2, const bool)
   :project: statslib

.. doxygenfunction:: pf(const BlazeMat<eT, To>&, const T1, const T2, const bool)
   :project: statslib

.. doxygenfunction:: pf(const EigenMat<eT, iTr, iTc>&, const T1, const T2, const bool)
   :project: statslib


The quantile function of the F distribution:

q(p; a,b) = \inf \left\{ x : p \leq I_{\frac{d_1 x}{d_2 + d_1 x}} (d_1 / 2, d_2 / 2) \right\}

Methods for scalar input, as well as for vector/matrix input, are listed below.

.. doxygenfunction:: qf(const T1, const T2, const T3)
   :project: statslib

.. doxygenfunction:: qf(const std::vector<eT>&, const T1, const T2)
   :project: statslib

.. doxygenfunction:: qf(const ArmaMat<eT>&, const T1, const T2)
   :project: statslib

.. doxygenfunction:: qf(const BlazeMat<eT, To>&, const T1, const T2)
   :project: statslib

.. doxygenfunction:: qf(const EigenMat<eT, iTr, iTc>&, const T1, const T2)
   :project: statslib


Random sampling for the Beta distribution is achieved by simulating two independent \chi^2-distributed random variables, X \sim \chi^2(d_1), Y \sim \chi^2(d_2), then returning:

Z = \frac{d_1}{d_2} \frac{X}{Y}
  1. Random number engines
.. doxygenfunction:: rf(const T1, const T2, rand_engine_t&)
   :project: statslib

  1. Seed values
.. doxygenfunction:: rf(const T1, const T2, const ullint_t)
   :project: statslib

  1. Random number engines
.. doxygenfunction:: rf(const ullint_t, const ullint_t, const T1, const T2, rand_engine_t&)
   :project: statslib

  1. Seed values
.. doxygenfunction:: rf(const ullint_t, const ullint_t, const T1, const T2, const ullint_t)
   :project: statslib