# Location–scale family

In probability theory, especially in mathematical statistics, a location–scale family is a family of probability distributions parametrized by a location parameter and a non-negative scale parameter. For any random variable $X$ whose probability distribution function belongs to such a family, the distribution function of $Y{\stackrel {d}{=}}a+bX$ also belongs to the family (where ${\stackrel {d}{=}}$ means "equal in distribution"—that is, "has the same distribution as").
In other words, a class $\Omega$ of probability distributions is a location–scale family if for all cumulative distribution functions $F\in \Omega$ and any real numbers $a\in \mathbb {R}$ and $b>0$, the distribution function $G(x)=F(a+bx)$ is also a member of $\Omega$.
* If $X$ has a cumulative distribution function $F_{X}(x)=P(X\leq x)$, then $Y{=}a+bX$ has a cumulative distribution function $F_{Y}(y)=F_{X}\left({\frac {y-a}{b}}\right)$.
* If $X$ is a discrete random variable with probability mass function $p_{X}(x)=P(X=x)$, then $Y{=}a+bX$ is a discrete random variable with probability mass function $p_{Y}(y)=p_{X}\left({\frac {y-a}{b}}\right)$.
* If $X$ is a continuous random variable with probability density function $f_{X}(x)$, then $Y{=}a+bX$ is a continuous random variable with probability density function $f_{Y}(y)={\frac {1}{b}}f_{X}\left({\frac {y-a}{b}}\right)$.
Moreover, if $X$ and $Y$ are two random variables whose distribution functions are members of the family, and assuming existence of the first two moments and $X$ has zero mean and unit variance, then $Y$ can be written as $Y{\stackrel {d}{=}}\mu _{Y}+\sigma _{Y}X$ , where $\mu _{Y}$ and $\sigma _{Y}$ are the mean and standard deviation of $Y$.
In decision theory, if all alternative distributions available to a decision-maker are in the same location–scale family, and the first two moments are finite, then a two-moment decision model can apply, and decision-making can be framed in terms of the means and the variances of the distributions.

## Examples

Often, location–scale families are restricted to those where all members have the same functional form. Most location–scale families are univariate, though not all. Well-known families in which the functional form of the distribution is consistent throughout the family include the following:
* Normal distribution
* Elliptical distributions
* Cauchy distribution
* Uniform distribution (continuous)
* Uniform distribution (discrete)
* Logistic distribution
* Laplace distribution
* Student's t-distribution
* Generalized extreme value distribution

## Converting a single distribution to a location–scale family

The following shows how to implement a location–scale family in a statistical package or programming environment where only functions for the "standard" version of a distribution are available. It is designed for R but should generalize to any language and library.
The example here is of the Student's t-distribution, which is normally provided in R only in its standard form, with a single degrees of freedom parameter df. The versions below with _ls appended show how to generalize this to a generalized Student's t-distribution with an arbitrary location parameter m and scale parameter s.
| Probability density function (PDF): | dt_ls(x, df, m, s) = | 1/s * dt((x - m) / s, df) |
| Cumulative distribution function (CDF): | pt_ls(x, df, m, s) = | pt((x - m) / s, df) |
| Quantile function (inverse CDF): | qt_ls(prob, df, m, s) = | qt(prob, df) * s + m |
| Generate a random variate: | rt_ls(df, m, s) = | rt(df) * s + m |
Note that the generalized functions do not have standard deviation s since the standard t distribution does not have standard deviation of 1.