Options
All
  • Public
  • Public/Protected
  • All
Menu

Cumulative (generalized) BehrensFisher distribution.

Exact analitical computation of the cumulative probability distribution of the linear combination of an arbitrary number (not just two) of T random variables of odd integer order. Adapted from the algorithm in:\par V. Witkovsky, Journal of Statistical Planning and Inference 94 (2001) 1-13\par see also:\par On the distribution of a linear combination of t-distributed variables; Glenn Alan Walker, Ph.D.thesis University of Florida 1977\par 'Convolutions of the T Distribution'; S. Nadarajah, D. K. Dey in Computers and Mathematics with Applications 49 (2005) 715-721\par The last reference provides direct expressions for some of the densities when the linear combination of only two Ts is just an addition. It can be used for testing the results here.\par Another available test on this algorithm stems from the realization that a linear convex ($ \sum a_i=1$) combination of Ts of order one is stable in the distribution sense (but this result is often of no practical use because of its non-finite variance).\par This implementation is for two or more T variables in the linear combination albeit these must be of odd order. The case of exactly two T of odd order is known to be a finite mixture of Ts but that result is not used here. On this line see 'Linearization coefficients of Bessel polynomials' C.Berg, C.Vignat; February 2008; arXiv:math/0506458

todo

Implement the series expansion solution for the addition of two Ts of even order described in: 'On the density of the sum of two independent Student t-random vectors' C.Berg, C.Vignat; June 2009; eprint arXiv:0906.3037

Hierarchy

  • CumulativeBehrensFisher

Implements

Index

Constructors

constructor

  • Parameters

    • Default value degreesFreedom: Integer[] = []
    • Default value factors: Real[] = []

    Returns CumulativeBehrensFisher

Properties

Private _a

_a: Real

Private _a2

_a2: Real

Private _degreesFreedom

_degreesFreedom: Integer[]

Private _factors

_factors: Real[]

Private _polyConvolved

_polyConvolved: Real[]

Private _polynCharFnc

_polynCharFnc: Real[][] = [[]]

Methods

Private convolveVectorPolynomials

  • Parameters

    Returns Real[]

degreeFreedom

  • Returns Integer[]

density

  • Returns the probability density of the resulting distribution.

    Similarly to the cumulative probability, Gil-Pelaez theorem is applied, the integration is similar.

    todo

    Implement in a separate class? given the name of this class..

    Parameters

    Returns Probability

f

  • Returns the cumulative probability of the resulting distribution.

    To obtain the cumulative probability the Gil-Pelaez theorem is applied:\par First compute the characteristic function of the linear combination variable by multiplying the individual characteristic functions. Then transform back integrating the characteristic function according to the GP theorem; this is done here analytically feeding in the expression of the total characteristic function this: $$ \int_0^{\infty}x^n e^{-ax}sin(bx)dx = (-1)^n \Gamma(n+1) \frac{sin((n+1)arctg2(-b/a))} {(\sqrt{a^2+b^2})^{n+1}}; for,a>0,,b>0 $$ and for the first term I use: $$ \int_0^{\infty} \frac{e^{-ax}sin(bx)}{x} dx = arctg2(b/a) $$ The GP complex integration is simplified thanks to the symetry of the distribution.

    Parameters

    Returns Probability

factors

  • Returns Real[]

Private polynCharactT

  • Student t characteristic polynomials.

    Generates the polynomial coefficients defining the characteristic function of a T distribution $T_\nu$ of odd order; $\nu=2n+1$. In general the characteristic function is given by: $$ \phi_{\nu}(t) = \varphi_{n}(t) \exp{-\nu^{1/2}|t|} ;,where,\nu = 2n+1 $$ where $ \varphi $ are polynomials that are computed recursively.

    The convolved characteristic function is the product of the two previous characteristic functions and the problem is then the convolution (a product) of two polynomials.

    Parameters

    • n: Natural

      Natural number defining the order of the T for which the characteristic function is to be computed. The order of the T is then $ \nu=2n+1 $

    Returns Real[]