TransformedDistribution

TransformedDistribution[expr,xdist]

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

TransformedDistribution[expr,{x1,x2,}dist]

represents the transformed distribution of expr where {x1,x2,} 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,{x1dist1,x2dist2 ,}]

represents a transformed distribution where x1, x2, are independent and follow the distributions dist1, dist2, .

Details and Options

Examples

open allclose all

Basic Examples  (3)

Simple transformations of random variables:

Transformed distributions can be used like any other distribution:

Shift a discrete distribution:

Scope  (61)

Basic Uses  (6)

Scaled distribution:

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

Compare medians:

Shifted distribution:

Compare the PDFs:

Generate random numbers following shifted distribution:

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

Without assumptions:

Define a nonlinear transformation of a discrete distribution:

Probability density function is defined on integer square roots:

Mean and variance:

Find the distribution of the sum of two different variables:

Probability density function:

Compare the resulting distribution with the summands:

The mean of is the sum of the means:

Find the distribution of the product:

Probability density function:

Compare all three distributions:

Find skewness and kurtosis:

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,u1]QuantityDistribution[dist,u2] to indicate that x is the magnitude of the random variable relative to unit u1:

The preceding is equivalent to the following:

Transformations  (9)

Use trigonometric functions:

Probability density function:

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

Find characteristic function:

Create a piecewise continuous distribution:

Probability density function:

Mean and variance:

Transformation composed of few functions:

Probability density function:

Compare with the original distribution:

Find the distribution of the maximum of two different distributions:

Probability density function:

Cumulative distribution function and survival function:

Hazard function:

Plot all of them:

Find the mean:

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:

Probability density function:

Mean and variance:

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 :

Find the distribution of GCD:

Transformation of two identically distributed independent variables:

Probability density function:

Characteristic function:

Cumulant generating function:

Add two discrete independent distributions:

Cumulative distribution function:

Moments:

Central moments:

Cumulants:

Factorial moments:

Create an arbitrary two-dimensional distribution:

Probability density function:

The components are uncorrelated:

Define a bivariate discrete distribution:

Generate a pseudorandom sample:

Density histogram:

Compare means:

Compare standard deviations:

Nonparametric Distributions  (3)

Shift an EmpiricalDistribution:

Compare cumulative distribution functions:

Scale a HistogramDistribution:

Compare probability density functions:

Define a transformed SmoothKernelDistribution:

Compare PDFs:

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:

Probability density function:

Compare the PDFs:

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

Find a transformation of a ParameterMixtureDistribution:

Cumulative distribution function:

Compare the CDFs:

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

Find a transformation of a TruncatedDistribution:

Compare the PDFs:

Find moments:

Find central moments:

Find a transformation of a CensoredDistribution:

Plot the probability density function:

Find a transformation of an OrderDistribution:

Probability density function:

Compare the PDFs:

Mean:

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

Find a transformation of a MarginalDistribution:

Probability density function:

Transform a CopulaDistribution:

Probability density function:

Define a transformation of a ProductDistribution:

Probability density function:

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:

Find the mean:

TransformedDistribution supports coincident use of both processes and distributions:

Find variance:

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

Cumulative distribution function:

Simulate the slice distribution at time for switch rate :

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:

For specific values:

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  (8)

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:

Plot the probability density function:

Find the mean distance to the origin:

Use TransformedDistribution to create a discrete probability distribution with noninteger support:

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:

The resulting distributions are equal:

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:

Compare the probability density functions:

Neat Examples  (1)

Affine transformations of a normal distribution:

Wolfram Research (2010), TransformedDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/TransformedDistribution.html (updated 2016).

Text

Wolfram Research (2010), TransformedDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/TransformedDistribution.html (updated 2016).

CMS

Wolfram Language. 2010. "TransformedDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/TransformedDistribution.html.

APA

Wolfram Language. (2010). TransformedDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TransformedDistribution.html

BibTeX

@misc{reference.wolfram_2024_transformeddistribution, author="Wolfram Research", title="{TransformedDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/TransformedDistribution.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_transformeddistribution, organization={Wolfram Research}, title={TransformedDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/TransformedDistribution.html}, note=[Accessed: 22-December-2024 ]}