# TransformedDistribution

TransformedDistribution[expr,xdist]

represents the transformed distribution of expr where the random variable x follows the distribution dist.

TransformedDistribution[expr,{x_{1},x_{2},…}dist]

represents the transformed distribution of expr where {x_{1},x_{2},…} follows the multivariate distribution dist.

TransformedDistribution[expr,xproc]

represents the transformed distribution where expr contains expressions of the form x[t], referring the value at time t from the random process proc.

TransformedDistribution[expr,{x_{1}dist_{1},x_{2}dist_{2} ,…}]

represents a transformed distribution where x_{1}, x_{2}, … are independent and follow the distributions dist_{1}, dist_{2}, ….

# Details and Options

- xdist can be entered as x dist dist or x \[Distributed] dist.
- TransformedDistribution will simplify to known special distributions whenever possible.
- Assumptions on parameters can be specified using the options Assumptions->assum.
- TransformedDistribution can be used with such functions as Mean, CDF, RandomVariate, etc.

# Examples

open allclose all## Basic Examples (3)

## Scope (61)

### Basic Uses (6)

Compare the PDFs with the probability density function of the original distribution:

Generate random numbers following shifted distribution:

Use Assumptions to specify conditions on a parameter in the transformation:

Define a nonlinear transformation of a discrete distribution:

Probability density function is defined on integer square roots:

Find the distribution of the sum of two different variables:

Compare the resulting distribution with the summands:

The mean of is the sum of the means:

Find the distribution of the product:

### Quantity Uses (4)

Consistent use of Quantity in the transformation function yields QuantityDistribution:

Define a transformation with Quantity to obtain QuantityDistribution:

Transformations of QuantityDistribution:

Use Quantity[x,u_{1}]QuantityDistribution[dist,u_{2}] to indicate that x is the magnitude of the random variable relative to unit u_{1}:

### Transformations (9)

The domain has been automatically chosen so it is a probability distribution:

Create a piecewise continuous distribution:

Transformation composed of few functions:

Compare with the original distribution:

Find the distribution of the maximum of two different distributions:

Cumulative distribution function and survival function:

Notice it is larger than the means of both original distributions:

Find the distribution of a product of powers of two independent distributions:

Visualize distribution by smooth histogram and histogram based on a random sample:

Add two bivariate distributions:

Visualize the distribution of the sum:

Scale a bivariate distribution:

Visualize the probability density function:

Create a multivariate distribution given its marginals:

It is the same as using product kernel in copula construction:

Plot the distribution function:

Dimension-reducing transformation of a multivariate distribution:

### Parametric Distributions (7)

Prove a relation between distributions:

Create a heavy-tail distribution using exponential transformation:

The moments exist only for the orders less than :

Transformation of two identically distributed independent variables:

Add two discrete independent distributions:

Cumulative distribution function:

Create an arbitrary two-dimensional distribution:

The components are uncorrelated:

Define a bivariate discrete distribution:

### Nonparametric Distributions (3)

Shift an EmpiricalDistribution:

Compare cumulative distribution functions:

Scale a HistogramDistribution:

Compare probability density functions:

Define a transformed SmoothKernelDistribution:

### Derived Distributions (9)

Complex transformations can be done in steps:

The direct calculation may take longer than calculation in steps:

Split the transformation to find the probability density function:

Find a transformation of a MixtureDistribution:

The mean is shifted by the same amount as the distribution:

Find a transformation of a ParameterMixtureDistribution:

Cumulative distribution function:

Standard deviation is scaled by the same factor as the distribution:

Find a transformation of a TruncatedDistribution:

Find a transformation of a CensoredDistribution:

Plot the probability density function:

Find a transformation of an OrderDistribution:

The mean is not the exponent of the mean of the original distribution:

Find a transformation of a MarginalDistribution:

Transform a CopulaDistribution:

Define a transformation of a ProductDistribution:

### Random Processes (4)

Define transformations on the values of a random process:

This is equivalent to the exponential transformation of SliceDistribution:

A time ordering is implied for multiple distinct time stamps:

Use Assumptions to give an explicit ordering:

TransformedDistribution supports coincident use of both processes and distributions:

Find the slice distribution of a product of a process and a distribution:

### Automatic Simplifications (19)

#### Continuous Distributions (9)

Special transformations of NormalDistribution:

Special transformations of ExponentialDistribution:

Special transformations of UniformDistribution:

Special transformations between SinghMaddalaDistribution and DagumDistribution:

Special transformation of ChiSquareDistribution:

Special transformations of StudentTDistribution:

Special transformation of BetaDistribution:

Special transformations of BinormalDistribution:

Special transformation of ParetoDistribution:

#### Discrete Distributions (7)

Special transformations of BernoulliDistribution:

Special transformation of BorelTannerDistribution:

Special transformations of GeometricDistribution:

Special transformations of PoissonDistribution:

Special transformation of PoissonConsulDistribution:

Special transformation of PolyaAeppliDistribution:

Special transformations of SkellamDistribution:

#### Multivariate Distributions (3)

The multinormal distribution is closed under affine transformation:

Multivariate Student distribution is closed under affine transformations:

Transformation creating LogMultinormalDistribution:

## Options (1)

### Assumptions (1)

Compute the PDF for an affine transformation of a Weibull distribution:

Use Assumptions to specify the condition :

## Applications (7)

Two points are chosen randomly and independently from the interval , according to a uniform distribution. Compute the expected distance between the two points:

Two archers shoot at a target. The distance of each shot from the center of the target is uniformly distributed from 0 to 10 inches, independent of the other shot. Find the probability that the losing shot is more than 5 inches away from the target:

Romeo and Juliet have a date at a given time, and each, independently, will be late by an amount of minutes that is exponentially distributed with parameter . Find the distribution of the difference between their times of arrival:

Probability that they miss each other by at least t minutes:

A driver travels with an average speed of 65 mph for a distance of 120 miles. Assuming the speed has normal distribution with standard deviation of 3 mph and there was no road work, find the distribution of time it takes the driver to cover the distance:

Plot the probability density function:

Find the median travel time in hours:

The Young modulus and the shear modulus of a bar have been measured as and , respectively. Assuming a symmetric triangular distribution for measurement uncertainty, and that respective coverage intervals have 90% coverage probability, determine the uncertainty of Poisson's ratio :

Confirm that measurements are contained in given intervals with 90% probability:

Use TransformedDistribution to define the distribution for uncertainty of Poisson's ratio:

Compare to the linear approximation:

Find the mean ratio using the exact and the approximate distributions:

Find the standard deviation of the ratio using the exact and the approximate distributions:

Compute the Poisson's ratio measurement density function:

Visualize the density function and compare it to the normal approximation:

Concentration-time curve for the circulation of a medication injected in a bloodstream is described by lagged normal distribution:

Compute the first several moments:

Plot the distribution density:

Find the distribution of the distance between the origin and the points placed according to DirichletDistribution on a plane:

## Properties & Relations (8)

TransformedDistribution uses local names for the variables in the input:

Hence subsequent computations can be done with the original variable name:

The support of the PDF may change under a transformation:

Applying the identity transformation to a distribution leaves it unchanged:

Components of the identity transformation give marginal distributions:

Compute the probability of an event for a transformed distribution:

Substituting transformation into the event:

Compute the expectation of an expression for a transformed distribution:

Substituting transformation into the expression:

CensoredDistribution is a special case of TransformedDistribution:

OrderDistribution is a special case of TransformedDistribution:

In particular, the extreme cases correspond to Min and Max:

SliceDistribution relates TransformedProcess to TransformedDistribution:

## Possible Issues (3)

Let be a sum of random variates . Distribution of may be different from distribution of :

Distribution of the sum of two independent identically distributed variates may be different from that of :

Compare distribution densities:

Autoevaluation may fail for complicated expressions:

Evaluating TransformedDistribution in steps may allow special rules to be recognized: