### Details

A collection of distributions which can be approximated via Edgeworth and Cornish-Fisher expansions

### Sum of (non-central) chi-square to powers

Let X_i \sim \chi^2\left(\delta_i, \nu_i\right) be independently distributed non-central chi-squares, where \nu_i are the degrees of freedom, and \delta_i are the non-centrality parameters. Let w_i and p_i be given constants. Suppose

Y = \sum_i w_i X_i^{p_i}.

Then Y follows a weighted sum of chi-squares to power distribution. The special case where all the p_i are one is a 'sum of chi-squares' distribution; The special case where all the p_i are one half is a 'sum of chis' distribution;

### Lambda Prime

Introduced by Lecoutre, the lambda prime distribution finds use in inference on the Sharpe ratio under normal returns. Suppose y \sim \chi^2\left(\nu\right), and Z is a standard normal.

T = Z + t \sqrt{y/\nu}

takes a lambda prime distribution with parameters \nu, t. A lambda prime random variable can be viewed as a confidence variable on a non-central t because

t = \frac{Z' + T}{\sqrt{y/\nu}}

### Upsilon

The upsilon distribution generalizes the lambda prime to the case of the sum of multiple chi variables. That is, suppose y_i \sim \chi^2\left(\nu_i\right) independently and independently of Z, a standard normal. Then

T = Z + \sum_i t_i \sqrt{y_i/\nu_i}

takes an upsilon distribution with parameter vectors [\nu_1, \nu_2, \ldots, \nu_k]', [t_1, t_2, ..., t_k]'.

The upsilon distribution is used in certain tests of the Sharpe ratio for independent observations.

### K Prime

Introduced by Lecoutre, the K prime family of distributions generalize the (singly) non-central t, and lambda prime distributions. Suppose y \sim \chi^2\left(\nu_1\right), and x \sim t \left(\nu_2, a\sqrt{y/\nu_1}/b\right). Then the random variable

T = b x

takes a K prime distribution with parameters \nu_1, \nu_2, a, b. In Lecoutre's terminology, T \sim K'_{\nu_1, \nu_2}\left(a, b\right)

Equivalently, we can think of

T = \frac{b Z + a \sqrt{\chi^2_{\nu_1} / \nu_1}}{\sqrt{\chi^2_{\nu_2} / \nu_2}}

where Z is a standard normal, and the normal and the (central) chi-squares are independent of each other. When a=0 we recover a central t distribution; when \nu_1=\infty we recover a rescaled non-central t distribution; when b=0, we get a rescaled square root of a central F distribution; when \nu_2=\infty, we recover a Lambda prime distribution.

### Doubly Noncentral t

The doubly noncentral t distribution generalizes the (singly) noncentral t distribution to the case where the numerator is the square root of a scaled noncentral chi-square distribution. That is, if X \sim \mathcal{N}\left(\mu,1\right) independently of Y \sim \chi^2\left(k,\theta\right), then the random variable

T = \frac{X}{\sqrt{Y/k}}

takes a doubly non-central t distribution with parameters k, \mu, \theta.

### Doubly Noncentral F

The doubly noncentral F distribution generalizes the (singly) noncentral F distribution to the case where the numerator is a scaled noncentral chi-square distribution. That is, if X \sim \chi^2\left(n_1,\theta_1\right) independently of Y \sim \chi^2\left(n_2,\theta_2\right), then the random variable

T = \frac{X / n_1}{Y / n_2}

takes a doubly non-central F distribution with parameters n_1, n_2, \theta_1, \theta_2.

### Parameter recycling

It should be noted that the functions provided by sadists do not recycle their distribution parameters against the x, p, q or n parameters. This is in contrast to the common R idiom, and may cause some confusion. This is mostly for reasons of performance, but also because some of the distributions have vector-valued parameters; recycling over these would require the user to provide lists of parameters, which would be unpleasant.

### Legal Mumbo Jumbo

sadists is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

### Note

This package is maintained as a hobby.

### Author(s)

Steven E. Pav shabbychef@gmail.com

Maintainer: Steven E. Pav shabbychef@gmail.com (ORCID)

### References

Lecoutre, Bruno. "Two Useful distributions for Bayesian predictive procedures under normal models." Journal of Statistical Planning and Inference 79, no. 1 (1999): 93-105.

Poitevineau, Jacques, and Lecoutre, Bruno. "Implementing Bayesian predictive procedures: The K-prime and K-square distributions." Computational Statistics and Data Analysis 54, no. 3 (2010): 724-731. https://arxiv.org/abs/1003.4890v1

Walck, C. "Handbook on Statistical Distributions for experimentalists." 1996. https://www.stat.rice.edu/~dobelman/textfiles/DistributionsHandbook.pdf