Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • System Modeler

    Multidomain modeling and simulation of complex systems

  • Compute ServicesUse with Mathematica and Wolfram|One
  • AI AccessUse with Mathematica and Wolfram|One
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Wolfram|Alpha

  • Wolfram|Alpha Website
  • Wolfram|Alpha APIs

AI Products

  • Wolfram AI Ecosystem
  • Wolfram Foundation Tool
  • Wolfram Cloud MCP
  • Wolfram Local MCP
  • Agent One API
  • CAG Component APIs

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • Linguistic Understanding

Additional Deployment Options

  • Wolfram Cloud
  • Wolfram Web Engine
  • wolframscript
  • WSTPServer
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

Wolfram Consulting

Data Science, Finance & Business

  • Artificial Intelligence
  • Data Science
  • Healthcare
  • Real Estate

Engineering

  • Civil Engineering
  • Automotive Engineering
  • Sustainable Energy

Science & Technology

  • AgTech
  • Biosciences
  • Environmental Science
  • Food Science
  • Quantum Computation
  • Social and Behavioral Sciences

More Wolfram Solutions

Technology for Education

  • Research Universities
  • Colleges & Teaching Universities
  • High Schools
  • Resources for Students

Education Initiatives

  • Next-Gen EdTech
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
For AIs
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • System Modeler
    • Compute ServicesUse with Mathematica and Wolfram|One
    • AI AccessUse with Mathematica and Wolfram|One
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Wolfram|Alpha
      • Wolfram|Alpha Website
      • Wolfram|Alpha APIs
    • AI Products
      • Wolfram AI Ecosystem
      • Wolfram Foundation Tool
      • Wolfram Cloud MCP
      • Wolfram Local MCP
      • Agent One API
      • CAG Component APIs
    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • Linguistic Understanding
    • Additional Deployment Options
      • Wolfram Cloud
      • Wolfram Web Engine
      • wolframscript
      • WSTPServer
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions
    • Wolfram Consulting

    Data Science, Finance & Business

    • Artificial Intelligence
    • Data Science
    • Healthcare
    • Real Estate

    Engineering

    • Civil Engineering
    • Automotive Engineering
    • Sustainable Energy

    Science & Technology

    • AgTech
    • Biosciences
    • Environmental Science
    • Food Science
    • Quantum Computation
    • Social and Behavioral Sciences

    More Wolfram Solutions

    Technology for Education

    • Research Universities
    • Colleges & Teaching Universities
    • High Schools
    • Resources for Students

    Education Initiatives

    • Next-Gen EdTech
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • For AIs
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
TransformedDistribution
  • See Also
    • Distributed
    • ProbabilityDistribution
    • OrderDistribution
    • TruncatedDistribution
    • CensoredDistribution
    • CopulaDistribution
    • Probability
    • Expectation
    • RandomVariate
  • Related Guides
    • Random Variables
    • Derived Statistical Distributions
    • Probability & Statistics
    • Probability & Statistics with Quantities
    • Extreme Value Distributions
    • Distributions in Reliability Analysis
    • Numbers with Uncertainty
    • See Also
      • Distributed
      • ProbabilityDistribution
      • OrderDistribution
      • TruncatedDistribution
      • CensoredDistribution
      • CopulaDistribution
      • Probability
      • Expectation
      • RandomVariate
    • Related Guides
      • Random Variables
      • Derived Statistical Distributions
      • Probability & Statistics
      • Probability & Statistics with Quantities
      • Extreme Value Distributions
      • Distributions in Reliability Analysis
      • Numbers with Uncertainty

TransformedDistribution[expr,xdist]

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,xproc]

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,{x1dist1,x2dist2 ,…}]

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

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Basic Uses  
Quantity Uses  
Transformations  
Show More Show More
Parametric Distributions  
Nonparametric Distributions  
Derived Distributions  
Random Processes  
Automatic Simplifications  
Continuous Distributions  
Discrete Distributions  
Multivariate Distributions  
Options  
Assumptions  
Applications  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • Distributed
    • ProbabilityDistribution
    • OrderDistribution
    • TruncatedDistribution
    • CensoredDistribution
    • CopulaDistribution
    • Probability
    • Expectation
    • RandomVariate
  • Related Guides
    • Random Variables
    • Derived Statistical Distributions
    • Probability & Statistics
    • Probability & Statistics with Quantities
    • Extreme Value Distributions
    • Distributions in Reliability Analysis
    • Numbers with Uncertainty
    • See Also
      • Distributed
      • ProbabilityDistribution
      • OrderDistribution
      • TruncatedDistribution
      • CensoredDistribution
      • CopulaDistribution
      • Probability
      • Expectation
      • RandomVariate
    • Related Guides
      • Random Variables
      • Derived Statistical Distributions
      • Probability & Statistics
      • Probability & Statistics with Quantities
      • Extreme Value Distributions
      • Distributions in Reliability Analysis
      • Numbers with Uncertainty

TransformedDistribution

TransformedDistribution[expr,xdist]

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,xproc]

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,{x1dist1,x2dist2 ,…}]

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

Details and Options

  • xdist 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 all close all

Basic Examples  (3)

Simple transformations of random variables:

Wolfram Language code: TransformedDistribution[2 u + b, uNormalDistribution[μ, σ]]
Wolfram Language code: TransformedDistribution[u + v, {uPoissonDistribution[Subscript[μ, 1]], vPoissonDistribution[Subscript[μ, 2]]}]
Wolfram Language code: TransformedDistribution[Exp[u], uNormalDistribution[μ, σ]]
Wolfram Language code: TransformedDistribution[{{1, 2}, {-1, 3}}.{u1, u2} + 3, {u1, u2}BinormalDistribution[0.3]]

Transformed distributions can be used like any other distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[u ^ 2, uBetaDistribution[4, 3]]
Wolfram Language code: Plot[PDF[𝒟, x], {x, 0, 1}, Filling -> Axis]
Wolfram Language code: PDF[𝒟, x]
Wolfram Language code: RandomVariate[𝒟]

Shift a discrete distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[u + 2, uZipfDistribution[.2]]
Wolfram Language code: DiscretePlot[{PDF[ZipfDistribution[.2], x], PDF[𝒟, x]}, {x, 0, 12}, PlotRange -> All, ExtentSize -> 1 / 2]
Wolfram Language code: CDF[𝒟, x]

Scope  (61)

Basic Uses  (6)

Scaled distribution:

Wolfram Language code: 𝒟1 = TransformedDistribution[2 u, uBetaDistribution[2, 3]]; 𝒟2 = TransformedDistribution[u / 2, uBetaDistribution[2, 3]];

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

Wolfram Language code: Plot[{PDF[BetaDistribution[2, 3], x], PDF[𝒟1, x], PDF[𝒟2, x]}, {x, 0, 2}, Filling -> Axis, PlotRange -> All, PlotLegends -> {"U", "2 U", "U / 2"}]

Compare medians:

Wolfram Language code: N /@ Median /@ {BetaDistribution[2, 3], 𝒟1, 𝒟2}

Shifted distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[u + 5, uPoissonDistribution[4]];

Compare the PDFs:

Wolfram Language code: DiscretePlot[{PDF[PoissonDistribution[4], x], PDF[𝒟, x]}, {x, 0, 16}, PlotLegends -> {"U", "U + 5"}]

Generate random numbers following shifted distribution:

Wolfram Language code: ListPlot[{RandomVariate[𝒟, 100], {{0, Mean[𝒟]}, {100, Mean[𝒟]}}}, Joined -> {False, True}, Filling -> {1 -> Axis}]

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

Wolfram Language code: 𝒟 = TransformedDistribution[a x + b, xExponentialDistribution[2], Assumptions -> a > 0];
Wolfram Language code: SurvivalFunction[𝒟, x]

Without assumptions:

Wolfram Language code: SurvivalFunction[TransformedDistribution[a x + b, xExponentialDistribution[2]], x]

Define a nonlinear transformation of a discrete distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[u ^ 2, uGeometricDistribution[1 / 12]];
Wolfram Language code: PDF[𝒟, x]//FullSimplify

Probability density function is defined on integer square roots:

Wolfram Language code: DiscretePlot[PDF[𝒟, x], {x, Table[i ^ 2, {i, 0, 15}]}]

Mean and variance:

Wolfram Language code: {Mean[𝒟], Variance[𝒟]}

Find the distribution of the sum of two different variables:

Wolfram Language code: 𝒟 = TransformedDistribution[u + v, {uRayleighDistribution[a], vNormalDistribution[μ, σ]}];

Probability density function:

Wolfram Language code: pdf = PDF[𝒟, x]//Simplify

Compare the resulting distribution with the summands:

Wolfram Language code: Block[{a = 2, μ = 0, σ = 1}, Plot[{pdf, PDF[RayleighDistribution[a], x], PDF[NormalDistribution[μ, σ], x]}, {x, -3, 8}, Filling -> Axis, PlotStyle -> {Thick, Automatic, Automatic}, PlotLegends -> {"𝒟", "Rayleigh", "Normal"}]]

The mean of  is the sum of the means:

Wolfram Language code: Mean[𝒟]
Wolfram Language code: Mean /@ {RayleighDistribution[a], NormalDistribution[μ, σ]}
Wolfram Language code: FullSimplify[Total[%] - %%]

Find the distribution of the product:

Wolfram Language code: 𝒟 = TransformedDistribution[u v, {uExponentialDistribution[1 / 2], vExponentialDistribution[1 / 3]}];

Probability density function:

Wolfram Language code: pdf = PDF[𝒟, x]

Compare all three distributions:

Wolfram Language code: d1 = ExponentialDistribution[1 / 2]; d2 = ExponentialDistribution[1 / 3]; Plot[{pdf, PDF[d1, x], PDF[d2, x]}, {x, 0, 6}, Filling -> Axis, PlotStyle -> {Thick, Automatic, Automatic}, PlotLegends -> {U V, Ud1, Vd2}]

Find skewness and kurtosis:

Wolfram Language code: {Skewness[𝒟], Kurtosis[𝒟]}

Quantity Uses  (4)

Consistent use of Quantity in the transformation function yields QuantityDistribution:

Wolfram Language code: TransformedDistribution[Quantity[25, "Meters" / "Seconds"]Quantity[t, "Seconds"], tExponentialDistribution[λ]]
Wolfram Language code: TransformedDistribution[ Quantity[x, "Millimeters"] + Quantity[y, "Centimeters"], {xCauchyDistribution[], yNormalDistribution[]}]

Define a transformation with Quantity to obtain QuantityDistribution:

Wolfram Language code: TransformedDistribution[Quantity[x, "Meters"], xLogNormalDistribution[μ, σ]]

Transformations of QuantityDistribution:

Wolfram Language code: TransformedDistribution[x ^ 2, xQuantityDistribution[NormalDistribution[0, 1], "Feet"]]
Wolfram Language code: TransformedDistribution[x + y, {xQuantityDistribution[GammaDistribution[2, 3], "Minutes"], yQuantityDistribution[GammaDistribution[5, 3], "Minutes"]}]

Use Quantity[x,u1]QuantityDistribution[dist,u2] to indicate that x is the magnitude of the random variable relative to unit u1:

Wolfram Language code: len𝒟 = NormalDistribution[Quantity[100, "Meters"], Quantity[1, "Meters"]]
Wolfram Language code: TransformedDistribution[x / 100, Quantity[x, "Centimeters"]len𝒟]

The preceding is equivalent to the following:

Wolfram Language code: TransformedDistribution[QuantityMagnitude[x, "Centimeters"] / 100, xlen𝒟]

Transformations  (9)

Use trigonometric functions:

Wolfram Language code: 𝒟 = TransformedDistribution[ArcSin[u], uBetaDistribution[4, 3]];

Probability density function:

Wolfram Language code: pdf = PDF[𝒟, x]//PiecewiseExpand

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

Wolfram Language code: NIntegrate[pdf, {x, -∞, ∞}]
Wolfram Language code: Plot[pdf, {x, 0, π / 2}, Filling -> Axis]

Find characteristic function:

Wolfram Language code: CharacteristicFunction[𝒟, t]

Create a piecewise continuous distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[E ^ (-Abs[u]), uUniformDistribution[{-2, 1}]];

Probability density function:

Wolfram Language code: Plot[PDF[𝒟, x]//Evaluate, {x, 0, 1.2}, Filling -> Axis, PlotRange -> All]
Wolfram Language code: PDF[𝒟, x]

Mean and variance:

Wolfram Language code: {Mean[𝒟], Variance[𝒟]}

Transformation composed of few functions:

Wolfram Language code: 𝒟 = TransformedDistribution[Log[u ^ 2 + 1], uNormalDistribution[2, 3]];

Probability density function:

Wolfram Language code: pdf = PDF[𝒟, x]//FullSimplify

Compare with the original distribution:

Wolfram Language code: Plot[{pdf, PDF[NormalDistribution[2, 3], x]}, {x, -1, 7}, Filling -> Axis, PlotLegends -> {Log[Z ^ 2 + 1], Z}]

Find the distribution of the maximum of two different distributions:

Wolfram Language code: 𝒟 = TransformedDistribution[Max[u, v], {uExponentialDistribution[1 / 2], vExponentialDistribution[1 / 3]}];

Probability density function:

Wolfram Language code: pdf = PDF[𝒟, x]

Cumulative distribution function and survival function:

Wolfram Language code: sf = SurvivalFunction[𝒟, x]
Wolfram Language code: cdf = CDF[𝒟, x]
Wolfram Language code: cdf + sf//PiecewiseExpand

Hazard function:

Wolfram Language code: hf = pdf / sf//PiecewiseExpand

Plot all of them:

Wolfram Language code: Partition[MapThread[Plot[#1, {x, 0, 10}, Filling -> Axis, PlotLabel -> #2]&, {{pdf, sf, hf, cdf}, {"PDF", "SF", "HF", "CDF"}}], 2, 2]//Grid

Find the mean:

Wolfram Language code: Mean[𝒟]//N

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

Wolfram Language code: {Mean[ExponentialDistribution[1 / 2]], Mean[ExponentialDistribution[1 / 3]]}

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

Wolfram Language code: 𝒟 = TransformedDistribution[u v ^ 2, {u, v}ProductDistribution[NormalDistribution[0, 1], KumaraswamyDistribution[2, 4]]];

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

Wolfram Language code: sample = RandomVariate[𝒟, 10 ^ 4];
Wolfram Language code: Show[Histogram[sample, {-.55, .55, .025}, "PDF"], SmoothHistogram[sample, PlotStyle -> Thick, PlotRange -> All]]

Add two bivariate distributions:

Wolfram Language code: 𝒟 = TransformedDistribution[{u, v} + {w, z}, {u, v, w, z}ProductDistribution[BinormalDistribution[{0, 0}, {1, 1}, .2], BinormalDistribution[{-1, 2}, {1, 1}, .7]]]

Visualize the distribution of the sum:

Wolfram Language code: SmoothHistogram3D[RandomVariate[𝒟, 10 ^ 3]]

Scale a bivariate distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[.5 {u, v}, {u, v}DirichletDistribution[{1, 2, 3}]];

Visualize the probability density function:

Wolfram Language code: SmoothHistogram3D[RandomVariate[𝒟, 10 ^ 4]]

Create a multivariate distribution given its marginals:

Wolfram Language code: 𝒟 = TransformedDistribution[{u, v}, {uNormalDistribution[], vExponentialDistribution[λ]}];
Wolfram Language code: pdf1 = PDF[𝒟, {x, y}]

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

Wolfram Language code: 𝒟2 = CopulaDistribution["Product", {NormalDistribution[], ExponentialDistribution[λ]}];
Wolfram Language code: pdf2 = PDF[𝒟2, {x, y}]
Wolfram Language code: Simplify[pdf1 - pdf2]

Plot the distribution function:

Wolfram Language code: Block[{λ = 3}, Plot3D[pdf1, {x, -3, 3}, {y, 0, 2}, PlotRange -> All]]

Dimension-reducing transformation of a multivariate distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[x + y, {x, y}DirichletDistribution[{1, 2, 4}]];

Probability density function:

Wolfram Language code: PDF[𝒟, x]

Mean and variance:

Wolfram Language code: {Mean[𝒟], Variance[𝒟]}

Parametric Distributions  (7)

Prove a relation between distributions:

Wolfram Language code: 𝒟 = TransformedDistribution[u ^ 2, uNakagamiDistribution[μ, ω]]
Wolfram Language code: CDF[𝒟, x]//FullSimplify
Wolfram Language code: CDF[GammaDistribution[μ, ω / μ], x]
Wolfram Language code: FullSimplify[% - %%, x > 0]

Create a heavy-tail distribution using exponential transformation:

Wolfram Language code: 𝒟 = TransformedDistribution[Exp[u], uLindleyDistribution[δ]];
Wolfram Language code: pdf = PDF[𝒟, x]//Refine[#, δ > 0]&
Wolfram Language code: Block[{δ = 2}, Plot[pdf, {x, 0, 10}, Filling -> Axis]]

The moments exist only for the orders less than :

Wolfram Language code: Integrate[x ^ k Refine[pdf, x > 1], {x, 1, ∞}, Assumptions -> δ > 0 && k > 0]

Find the distribution of GCD:

Wolfram Language code: 𝒟 = TransformedDistribution[GCD[u, v], {uPoissonDistribution[30], vPoissonDistribution[20]}];
Wolfram Language code: Histogram[RandomVariate[𝒟, 10 ^ 4], {0.5, 15.5, 1}, "PDF"]

Transformation of two identically distributed independent variables:

Wolfram Language code: 𝒟 = TransformedDistribution[u ^ 2 + 3v, {u, v} ProductDistribution[{ExponentialDistribution[3], 2}]];

Probability density function:

Wolfram Language code: Plot[PDF[𝒟, x]//Evaluate, {x, 0, 2}, Filling -> Axis]
Wolfram Language code: PDF[𝒟, x]

Characteristic function:

Wolfram Language code: CharacteristicFunction[𝒟, t]

Cumulant generating function:

Wolfram Language code: CumulantGeneratingFunction[𝒟, ConditionalExpression[t, t < 0]]

Add two discrete independent distributions:

Wolfram Language code: 𝒟 = TransformedDistribution[u + 2v, {uDiscreteUniformDistribution[{2, 9}], vBenfordDistribution[10]}];

Cumulative distribution function:

Wolfram Language code: DiscretePlot[CDF[𝒟, x]//Evaluate, {x, 0, 30}, ExtentSize -> Right]

Moments:

Wolfram Language code: Table[Moment[𝒟, i], {i, 5}]//N

Central moments:

Wolfram Language code: Table[CentralMoment[𝒟, i], {i, 5}]//N

Cumulants:

Wolfram Language code: Table[Cumulant[𝒟, i], {i, 5}]//N

Factorial moments:

Wolfram Language code: Table[FactorialMoment[𝒟, i], {i, 5}]//N

Create an arbitrary two-dimensional distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[{u - v , u + v}, {uNormalDistribution[], vNormalDistribution[]}];

Probability density function:

Wolfram Language code: Plot3D[PDF[𝒟, {x, y}]//Evaluate, {x, -3, 3}, {y, -3, 3}]
Wolfram Language code: PDF[𝒟, {x, y}]

The components are uncorrelated:

Wolfram Language code: Correlation[𝒟]//MatrixForm

Define a bivariate discrete distribution:

Wolfram Language code: 𝒟 = TransformedDistribution[{x, 2y}, {x, y} ProductDistribution[{GeometricDistribution[1 / 3], 2}]];

Generate a pseudorandom sample:

Wolfram Language code: sample = RandomVariate[𝒟, 10 ^ 4];

Density histogram:

Wolfram Language code: Histogram3D[sample, 30, "PDF"]

Compare means:

Wolfram Language code: {Mean[sample]//N, Mean[𝒟]}//Column

Compare standard deviations:

Wolfram Language code: {StandardDeviation[sample], StandardDeviation[𝒟]}//N//Column

Nonparametric Distributions  (3)

Shift an EmpiricalDistribution:

Wolfram Language code: ed = EmpiricalDistribution[RandomVariate[PoissonDistribution[3], 20]]; 𝒟 = TransformedDistribution[u + 5, ued];

Compare cumulative distribution functions:

Wolfram Language code: DiscretePlot[{Legended[CDF[ed, x], "ed"], Legended[CDF[𝒟, x], "𝒟"]}, {x, 0, 15}, Filling -> Axis, ExtentSize -> Right, PlotStyle -> {Automatic, Thick}]

Scale a HistogramDistribution:

Wolfram Language code: hd = HistogramDistribution[RandomVariate[NormalDistribution[], 10 ^ 3]]; 𝒟 = TransformedDistribution[1 / 2 u, uhd];

Compare probability density functions:

Wolfram Language code: Plot[{Legended[PDF[hd, x], "hd"], Legended[PDF[𝒟, x], "𝒟"]}, {x, -3, 3}, Exclusions -> None, Filling -> Axis, PlotStyle -> {Automatic, Thick}]

Define a transformed SmoothKernelDistribution:

Wolfram Language code: skd = SmoothKernelDistribution[RandomVariate[MaxwellDistribution[3], 10 ^ 3]]; 𝒟 = TransformedDistribution[2u - 1, uskd];

Compare PDFs:

Wolfram Language code: pdfs = {PDF[skd, x], PDF[𝒟, x]};
Wolfram Language code: Plot[pdfs, {x, 0, 2Max[skd["Domain"]]}, Filling -> Axis, PlotStyle -> {Automatic, Thick}, PlotLegends -> {"skd", "𝒟"}]

Derived Distributions  (9)

Complex transformations can be done in steps:

Wolfram Language code: 𝒟 = TransformedDistribution[ArcSin[u] ^ 2, uBetaDistribution[1, 3]];

The direct calculation may take longer than calculation in steps:

Wolfram Language code: PDF[𝒟, x]//AbsoluteTiming

Split the transformation to find the probability density function:

Wolfram Language code: 𝒟1 = TransformedDistribution[ArcSin[u], uBetaDistribution[1, 3]];
Wolfram Language code: AbsoluteTiming[PDF[𝒟1, x]//FullSimplify]
Wolfram Language code: 𝒟2 = TransformedDistribution[v ^ 2, v𝒟1, Assumptions -> λ > 0];
Wolfram Language code: AbsoluteTiming[PDF[𝒟2, x]//FullSimplify]

Find a transformation of a MixtureDistribution:

Wolfram Language code: ℳ = MixtureDistribution[{1, 2}, {NormalDistribution[-1, 1], NormalDistribution[2, 1 / 2]}]; 𝒟 = TransformedDistribution[u + 3, uℳ];

Probability density function:

Wolfram Language code: PDF[𝒟, x]

Compare the PDFs:

Wolfram Language code: Plot[{PDF[ℳ, x], PDF[𝒟, x]}, {x, -4, 7}, PlotRange -> All, Filling -> Axis, PlotLegends -> {"ℳ", "𝒟"}]

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

Wolfram Language code: {Mean[ℳ], Mean[𝒟]}

Find a transformation of a ParameterMixtureDistribution:

Wolfram Language code: ℳ = ParameterMixtureDistribution[PoissonDistribution[μ], μGammaDistribution[4, 3]]; 𝒟 = TransformedDistribution[u / 2, uℳ];

Cumulative distribution function:

Wolfram Language code: CDF[𝒟, x]

Compare the CDFs:

Wolfram Language code: DiscretePlot[{CDF[ℳ, x], CDF[𝒟, x]}, {x, 0, 12}, ExtentSize -> Right, PlotLegends -> {"ℳ", "𝒟"}]

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

Wolfram Language code: {StandardDeviation[ℳ], StandardDeviation[𝒟]}

Find a transformation of a TruncatedDistribution:

Wolfram Language code: 𝒫 = TruncatedDistribution[{0, ∞}, StudentTDistribution[3]]; 𝒟 = TransformedDistribution[Sqrt[u], u𝒫];

Compare the PDFs:

Wolfram Language code: Plot[{PDF[𝒫, x], PDF[𝒟, x]}, {x, 0, 3}, PlotRange -> All, Filling -> Axis, PlotLegends -> {"𝒫", "𝒟"}]

Find moments:

Wolfram Language code: Table[Moment[𝒟, r], {r, 5}]

Find central moments:

Wolfram Language code: Table[CentralMoment[𝒟, r], {r, 5}]

Find a transformation of a CensoredDistribution:

Wolfram Language code: 𝒫 = CensoredDistribution[{18, 24}, BinomialDistribution[30, 2 / 3]]; 𝒟 = TransformedDistribution[Log[u], u𝒫];

Plot the probability density function:

Wolfram Language code: pts = Table[Log[i], {i, 10, 30}];
Wolfram Language code: DiscretePlot[PDF[𝒟, x]//Evaluate, {x, pts}, PlotRange -> All, PlotStyle -> PointSize[Medium]]

Find a transformation of an OrderDistribution:

Wolfram Language code: 𝒫 = OrderDistribution[{WeibullDistribution[2, 3], 10}, 2]; 𝒟 = TransformedDistribution[Exp[u], u𝒫];

Probability density function:

Wolfram Language code: PDF[𝒟, x]

Compare the PDFs:

Wolfram Language code: Plot[{PDF[𝒫, x], PDF[𝒟, x]}//Evaluate, {x, 0, 6}, Filling -> Axis, PlotRange -> All, PlotLegends -> {"𝒫", "𝒟"}]

Mean:

Wolfram Language code: Mean[𝒟]

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

Wolfram Language code: {%, Exp[Mean[𝒫]]}//N

Find a transformation of a MarginalDistribution:

Wolfram Language code: ℳ = MarginalDistribution[MultinomialDistribution[13, {.2, .3, .4, .1}], 2]; 𝒟 = TransformedDistribution[u + 1, uℳ];

Probability density function:

Wolfram Language code: PDF[𝒟, x]
Wolfram Language code: DiscretePlot[PDF[𝒟, x], {x, 0, 12}, ExtentSize -> 1 / 2]

Transform a CopulaDistribution:

Wolfram Language code: 𝒞 = CopulaDistribution[{"FGM", 1 / 3}, {UniformDistribution[{0, 1}], UniformDistribution[{0, 1}]}]; 𝒟 = TransformedDistribution[{u + 2, v / 3}, {u, v}𝒞];

Probability density function:

Wolfram Language code: Plot3D[PDF[𝒟, {x, y}]//Evaluate, {x, 1.8, 3.2}, {y, -0.2, 0.6}]
Wolfram Language code: PDF[𝒟, {x, y}]//FullSimplify

Define a transformation of a ProductDistribution:

Wolfram Language code: 𝒫 = ProductDistribution[GammaDistribution[2, 3], GammaDistribution[3, 2]]; 𝒟 = TransformedDistribution[{u + v, v - u}, {u, v}𝒫];

Probability density function:

Wolfram Language code: Plot3D[PDF[𝒟, {x, y}], {x, 0, 20}, {y, -15, 15}]
Wolfram Language code: PDF[𝒟, {x, y}]//Simplify

Random Processes  (4)

Define transformations on the values of a random process:

Wolfram Language code: TransformedDistribution[Exp[w[t]], wWienerProcess[μ, σ]]

This is equivalent to the exponential transformation of SliceDistribution:

Wolfram Language code: TransformedDistribution[Exp[x], xWienerProcess[μ, σ][t]]

A time ordering is implied for multiple distinct time stamps:

Wolfram Language code: TransformedDistribution[Max[w[t1], w[t2]], wWienerProcess[]]

Use Assumptions to give an explicit ordering:

Wolfram Language code: TransformedDistribution[Max[w[t1], w[t2]], wWienerProcess[], Assumptions -> t1 > t2]

Find the mean:

Wolfram Language code: Mean[%]

TransformedDistribution supports coincident use of both processes and distributions:

Wolfram Language code: TransformedDistribution[u ^ p[t], {uUniformDistribution[], pPoissonProcess[μ]}]

Find variance:

Wolfram Language code: Variance[%]

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

Wolfram Language code: 𝒟 = TransformedDistribution[d * p[t], {dTriangularDistribution[Quantity[{90, 110}, "Volts"], Quantity[100, "Volts"]], pTelegraphProcess[μ]}]

Cumulative distribution function:

Wolfram Language code: CDF[𝒟, Quantity[x, "Volts"]]

Simulate the slice distribution at time for switch rate :

Wolfram Language code: sample = RandomVariate[𝒟 /. {t -> 10, μ -> 1 / 3}, 10 ^ 6];
Wolfram Language code: Histogram[sample, "Scott", "PDF", AxesOrigin -> {0, 0}, AxesLabel -> Automatic, PlotRange -> All]

Automatic Simplifications  (19)

Continuous Distributions  (9)

Special transformations of NormalDistribution:

Wolfram Language code: TransformedDistribution[a x + b, xNormalDistribution[μ, σ]]
Wolfram Language code: TransformedDistribution[x + y, {xNormalDistribution[Subscript[μ, 1], Subscript[σ, 1]], yNormalDistribution[Subscript[μ, 2], Subscript[σ, 2]]}]
Wolfram Language code: TransformedDistribution[x ^ 2 + y ^ 2, {xNormalDistribution[], yNormalDistribution[]}]
Wolfram Language code: TransformedDistribution[Sqrt[x ^ 2 + y ^ 2], {xNormalDistribution[], yNormalDistribution[]}]
Wolfram Language code: TransformedDistribution[Sqrt[x ^ 2 + y ^ 2 + z ^ 2], {xNormalDistribution[], yNormalDistribution[], zNormalDistribution[]}]
Wolfram Language code: TransformedDistribution[x / y, {xNormalDistribution[], yNormalDistribution[]}]
Wolfram Language code: TransformedDistribution[Exp[u], uNormalDistribution[μ, σ]]
Wolfram Language code: TransformedDistribution[Exp[a x + b], xNormalDistribution[μ, σ]]

Special transformations of ExponentialDistribution:

Wolfram Language code: TransformedDistribution[ k u, uExponentialDistribution[λ]]
Wolfram Language code: TransformedDistribution[x - y, {x, y}ProductDistribution[{ExponentialDistribution[m], 2}]]
Wolfram Language code: TransformedDistribution[ k Exp[x], xExponentialDistribution[λ]]
Wolfram Language code: TransformedDistribution[Min[u, v], {uExponentialDistribution[Subscript[λ, 1]], vExponentialDistribution[Subscript[λ, 2]]}]
Wolfram Language code: TransformedDistribution[x + y + z, {x, y, z}ProductDistribution[{ExponentialDistribution[m], 3}]]
Wolfram Language code: TransformedDistribution[Exp[-x], xExponentialDistribution[1]]
Wolfram Language code: TransformedDistribution[Sqrt[x], xExponentialDistribution[1]]
Wolfram Language code: TransformedDistribution[α - β Log[u], uExponentialDistribution[1]]
Wolfram Language code: TransformedDistribution[α + β Log[u], uExponentialDistribution[1]]
Wolfram Language code: TransformedDistribution[β * 1 / u ^ (1 / α), uExponentialDistribution[1], Assumptions -> α > 0 && β > 0]
Wolfram Language code: TransformedDistribution[β * u ^ (1 / α), uExponentialDistribution[1], Assumptions -> α > 0 && β > 0]

Special transformations of UniformDistribution:

Wolfram Language code: TransformedDistribution[2x + 3, xUniformDistribution[{0, 1}]]
Wolfram Language code: TransformedDistribution[Tan[x], xUniformDistribution[{-Pi / 2, Pi / 2}]]
Wolfram Language code: TransformedDistribution[Sin[x], xUniformDistribution[{-Pi, Pi}]]
Wolfram Language code: TransformedDistribution[x + y, {x, y}ProductDistribution[{UniformDistribution[{min, max}], 2}]]

Special transformations between SinghMaddalaDistribution and DagumDistribution:

Wolfram Language code: TransformedDistribution[1 / x, xSinghMaddalaDistribution[p, a, c]]
Wolfram Language code: TransformedDistribution[1 / x, xDagumDistribution[p, a, c]]

Special transformation of ChiSquareDistribution:

Wolfram Language code: TransformedDistribution[(u / n) / (v / m), {uChiSquareDistribution[n], vChiSquareDistribution[m]}]

Special transformations of StudentTDistribution:

Wolfram Language code: TransformedDistribution[u σ + μ, uStudentTDistribution[ν]]
Wolfram Language code: TransformedDistribution[x ^ 2, xStudentTDistribution[ν]]

Special transformation of BetaDistribution:

Wolfram Language code: TransformedDistribution[x ^ α, xBetaDistribution[1, b]]
Wolfram Language code: TransformedDistribution[1 - x, xBetaDistribution[a, b]]

Special transformations of BinormalDistribution:

Wolfram Language code: TransformedDistribution[Sqrt[x ^ 2 + y ^ 2], {x, y}BinormalDistribution[{a, b}, {c, d}, e]]
Wolfram Language code: TransformedDistribution[{α x + γ, β y + δ}, {x, y}BinormalDistribution[{a, b}, {c, d}, e]]

Special transformation of ParetoDistribution:

Wolfram Language code: TransformedDistribution[Min[u, v], {uParetoDistribution[k, α1], vParetoDistribution[k, α2]}]

Discrete Distributions  (7)

Special transformations of BernoulliDistribution:

Wolfram Language code: TransformedDistribution[x + y + z, {x, y, z}ProductDistribution[{BernoulliDistribution[p], 3}]]

Special transformation of BorelTannerDistribution:

Wolfram Language code: TransformedDistribution[x + y, {xBorelTannerDistribution[α, n], yBorelTannerDistribution[α, m]}]

Special transformations of GeometricDistribution:

Wolfram Language code: TransformedDistribution[x + y, {x, y}ProductDistribution[{GeometricDistribution[p], 2}]]
Wolfram Language code: TransformedDistribution[Min[x, y], {xGeometricDistribution[Subscript[p, 1]], yGeometricDistribution[Subscript[p, 2]]}]

Special transformations of PoissonDistribution:

Wolfram Language code: TransformedDistribution[x + y + z, {x, y, z}ProductDistribution[PoissonDistribution[Subscript[μ, 1]], PoissonDistribution[Subscript[μ, 2]], PoissonDistribution[Subscript[μ, 3]]]]
Wolfram Language code: TransformedDistribution[x - y, {xPoissonDistribution[Subscript[μ, 1]], yPoissonDistribution[Subscript[μ, 2]]}]

Special transformation of PoissonConsulDistribution:

Wolfram Language code: TransformedDistribution[x + y + z, {xPoissonConsulDistribution[Subscript[μ, 1], λ], yPoissonConsulDistribution[Subscript[μ, 2], λ], zPoissonConsulDistribution[Subscript[μ, 3], λ]}]

Special transformation of PolyaAeppliDistribution:

Wolfram Language code: TransformedDistribution[x + y + z, {xPolyaAeppliDistribution[Subscript[θ, 1], p], yPolyaAeppliDistribution[Subscript[θ, 2], p], zPolyaAeppliDistribution[Subscript[θ, 3], p]}]

Special transformations of SkellamDistribution:

Wolfram Language code: TransformedDistribution[x + y + z, {xSkellamDistribution[Subscript[μ, 1], Subscript[μ, 2]], ySkellamDistribution[Subscript[μ, 3], Subscript[μ, 4]], zSkellamDistribution[Subscript[μ, 5], Subscript[μ, 6]]}]
Wolfram Language code: TransformedDistribution[x - y, {xSkellamDistribution[Subscript[μ, 1], Subscript[μ, 2]], ySkellamDistribution[Subscript[μ, 3], Subscript[μ, 4]]}]

Multivariate Distributions  (3)

The multinormal distribution is closed under affine transformation:

Wolfram Language code: A = (⁠| | | | | --- | --- | --- | | a11 | a12 | a13 | | a21 | a22 | a23 | | a31 | a32 | a33 |⁠);b = {b1, b2, b3};
Wolfram Language code: Σ = (⁠| | | | | --------- | --------- | --------- | | σ1^2 | ρ12 σ1 σ2 | ρ13 σ1 σ3 | | ρ12 σ1 σ2 | σ2^2 | ρ23 σ2 σ3 | | ρ13 σ1 σ3 | ρ23 σ2 σ3 | σ3^2 |⁠);
Wolfram Language code: TransformedDistribution[A.{u, v, w} + b, {u, v, w}MultinormalDistribution[{μ1, μ2, μ3}, Σ]] == MultinormalDistribution[A.{μ1, μ2, μ3} + b, Expand[A.Σ.A]]

For specific values:

Wolfram Language code: M = (⁠| | | | | - | - | -- | | 1 | 2 | 3 | | 4 | 5 | -6 | | 7 | 8 | 9 |⁠);c = {1, 2, 3}; Σ2 = (⁠| | | | | ----- | ----- | ----- | | 3 | 1 / 3 | 3 / 2 | | 1 / 3 | 2 / 3 | -1 | | 3 / 2 | -1 | 4 |⁠);
Wolfram Language code: TransformedDistribution[M.{u, v, w} + c, {u, v, w}MultinormalDistribution[{1, -2, 2}, Σ2]]

Multivariate Student distribution is closed under affine transformations:

Wolfram Language code: A = (⁠| | | | --- | --- | | a11 | a12 | | a21 | a22 |⁠);b = {b1, b2};Σ = {{1, ρ}, {ρ, 1}};
Wolfram Language code: TransformedDistribution[A.{u, v} + b, {u, v}MultivariateTDistribution[Σ, ν]]
Wolfram Language code: % == MultivariateTDistribution[b, A.Σ.A//Expand, ν]

Transformation creating LogMultinormalDistribution:

Wolfram Language code: TransformedDistribution[Exp[{u, v}], {u, v}BinormalDistribution[{Subscript[μ, 1], Subscript[μ, 2]}, {Subscript[σ, 1], Subscript[σ, 2]}, ρ]]

Options  (1)

Assumptions  (1)

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

Wolfram Language code: 𝒟1 = TransformedDistribution[a x + 5, xNormalDistribution[2, 1]];
Wolfram Language code: PDF[𝒟1, x]

Use Assumptions to specify the condition :

Wolfram Language code: 𝒟2 = TransformedDistribution[a x + 5, xNormalDistribution[2, 1], Assumptions -> a > 0];
Wolfram Language code: PDF[𝒟2, x]

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:

Wolfram Language code: Mean[TransformedDistribution[Abs[x - y], {x, y}UniformDistribution[{{0, 1}, {0, 1}}]]]

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:

Wolfram Language code: LosingShot𝒟 = TransformedDistribution[Max[x, y], {x, y}UniformDistribution[{{Quantity[0, "Inches"], Quantity[10, "Inches"]}, {Quantity[0, "Inches"], Quantity[10, "Inches"]}}]];
Wolfram Language code: Probability[z > Quantity[5, "Inches"], zLosingShot𝒟]

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:

Wolfram Language code: LateForDate𝒟 = TransformedDistribution[x - y, {x, y}ProductDistribution[{ExponentialDistribution[Quantity[λ, 1 / "Minutes"]], 2}]]

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

Wolfram Language code: Probability[Abs[z] >= Quantity[t, "Minutes"], zLateForDate𝒟, Assumptions -> t > 0]

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:

Wolfram Language code: time𝒟 = TransformedDistribution[Quantity[120, "Miles"] / v, vTruncatedDistribution[{Quantity[0, "Miles"/"Hours"], ∞}, NormalDistribution[Quantity[65, "Miles"/"Hours"], Quantity[3, "Miles"/"Hours"]]]];
Wolfram Language code: pdf = PDF[time𝒟, Quantity[t, "Hours"]]//Refine[#, t > 0]&

Plot the probability density function:

Wolfram Language code: Plot[pdf, {t, 1.5, 2.5}, Filling -> Axis, AxesLabel -> {"h"}]

Find the median travel time in hours:

Wolfram Language code: Median[time𝒟]
Wolfram Language code: N[%]

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 :

Wolfram Language code: {μ𝒴, σ𝒴, μ𝒢, σ𝒢} = Quantity[{209.2, 1.2, 81.2, 1.5}, "Kilonewtons" / "Millimeters" ^ 2];
Wolfram Language code: 𝒻 = InverseCDF[TriangularDistribution[{-1, 1}], (1 + Quantity[90, "Percent"]) / 2]; y𝒟 = TriangularDistribution[{μ𝒴 - σ𝒴 / 𝒻, μ𝒴 + σ𝒴 / 𝒻}]; s𝒟 = TriangularDistribution[{μ𝒢 - σ𝒢 / 𝒻, μ𝒢 + σ𝒢 / 𝒻}];

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

Wolfram Language code: Probability[Abs[μ𝒴 - 𝒴] < σ𝒴, 𝒴y𝒟]
Wolfram Language code: Probability[Abs[μ𝒢 - 𝒢] < σ𝒢, 𝒢s𝒟]

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

Wolfram Language code: pr𝒟 = TransformedDistribution[(𝒴/2𝒢) - 1, {𝒴y𝒟, 𝒢s𝒟}]

Compare to the linear approximation:

Wolfram Language code: lin[e_, {x_, x0_}, {y_, y0_}] := Block[{f = Function@@{{x, y}, e}}, f[x0, y0] + f^(1, 0)[x0, y0](x - x0) + f^(0, 1)[x0, y0](y - y0)]
Wolfram Language code: lin𝒟[𝒟_] := NormalDistribution[Mean[𝒟], StandardDeviation[𝒟]]
Wolfram Language code: prApprox𝒟 = TransformedDistribution[lin[(𝒴/2𝒢) - 1, {𝒴, μ𝒴}, {𝒢, μ𝒢}], {𝒴lin𝒟[y𝒟], 𝒢lin𝒟[s𝒟]}]

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

Wolfram Language code: {μpr, μprApprox} = {Mean[pr𝒟], Mean[prApprox𝒟]}

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

Wolfram Language code: {σpr, σprApprox} = {StandardDeviation[pr𝒟], StandardDeviation[prApprox𝒟]}

Compute the Poisson's ratio measurement density function:

Wolfram Language code: pdf = PDF[pr𝒟, r];

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

Wolfram Language code: Plot[{pdf, PDF[prApprox𝒟, r]}, {r, μpr - 4σpr, μpr + 4 σpr}, PlotRange -> All, Exclusions -> None]

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

Wolfram Language code: LaggedNormal𝒟[τ_, tc_, σ_] = TransformedDistribution[x + y, {xNormalDistribution[tc, σ], yExponentialDistribution[1 / τ]}];
Wolfram Language code: pdf = PDF[LaggedNormal𝒟[τ, Subscript[t, c], σ], t]

Compute the first several moments:

Wolfram Language code: {Mean[LaggedNormal𝒟[τ, Subscript[t, c], σ]], Variance[LaggedNormal𝒟[τ, Subscript[t, c], σ]], CentralMoment[LaggedNormal𝒟[τ, Subscript[t, c], σ], 3]}

Plot the distribution density:

Wolfram Language code: Plot[pdf /. {τ -> 1.3, Subscript[t, c] -> 5.3, σ -> 0.7}, {t, 0, 12}, Filling -> Axis]

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

Wolfram Language code: 𝒟 = TransformedDistribution[Sqrt[u ^ 2 + v ^ 2], {u, v}QuantityDistribution[DirichletDistribution[{3, 2, 1}], "Centimeters"]];
Wolfram Language code: pdf = PDF[𝒟, Quantity[x, "Centimeters"]]

Plot the probability density function:

Wolfram Language code: Plot[pdf, {x, 0, 1}, Exclusions -> None, Filling -> Axis]

Find the mean distance to the origin:

Wolfram Language code: Mean[𝒟]
Wolfram Language code: N[%]

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

Wolfram Language code: With[{x0 = 0, x1 = 1, dx = 1 / 12}, TransformedDistribution[x0 + dx * k, Distributed[k, ProbabilityDistribution[Piecewise[{{0.25, x == 1 / 12}, {0.5, x == 1 / 6}, {0.25, x == 1 / 4}}] /. x -> x0 + dx * k, {k, 0, (x1 - x0) / dx, 1}]]]]
Wolfram Language code: PDF[%, 1 / 12]

Properties & Relations  (8)

TransformedDistribution uses local names for the variables in the input:

Wolfram Language code: 𝒟 = TransformedDistribution[x ^ 2, xBetaDistribution[2, 3]]

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

Wolfram Language code: PDF[𝒟, x]

The support of the PDF may change under a transformation:

Wolfram Language code: 𝒟 = TransformedDistribution[x + 3, xTriangularDistribution[{2, 4}]];
Wolfram Language code: Plot[{Legended[PDF[TriangularDistribution[{2, 4}], x], XTriangularDistribution[{2, 4}]], Legended[PDF[𝒟, x], X + 3]}//Evaluate, {x, 0, 8}, PlotRange -> All, Filling -> Axis]

Applying the identity transformation to a distribution leaves it unchanged:

Wolfram Language code: TransformedDistribution[x, xExponentialDistribution[2]]

Components of the identity transformation give marginal distributions:

Wolfram Language code: TransformedDistribution[x, {x, y}DirichletDistribution[{1, 3, 4}]]
Wolfram Language code: MarginalDistribution[DirichletDistribution[{1, 3, 4}], 1]

Compute the probability of an event for a transformed distribution:

Wolfram Language code: Probability[x ^ 2 + x < 6, xTransformedDistribution[y ^ 2 + 1, yNormalDistribution[0, 1]]]

Substituting transformation into the event:

Wolfram Language code: Probability[(y ^ 2 + 1) ^ 2 + (y ^ 2 + 1) < 6, yNormalDistribution[0, 1]]
Wolfram Language code: %% - %//Simplify

Compute the expectation of an expression for a transformed distribution:

Wolfram Language code: Expectation[x ^ 2 + x, xTransformedDistribution[y ^ 2 + 1, yNormalDistribution[0, 1]]]

Substituting transformation into the expression:

Wolfram Language code: Expectation[(y ^ 2 + 1) ^ 2 + (y ^ 2 + 1), yNormalDistribution[0, 1]]

CensoredDistribution is a special case of TransformedDistribution:

Wolfram Language code: 𝒟1 = CensoredDistribution[{2, 3}, NormalDistribution[]];
Wolfram Language code: 𝒟2 = TransformedDistribution[Piecewise[{{2, x ≤ 2}, {x, 2 ≤ x ≤ 3}, {3, x > 3}}], xNormalDistribution[]];
Wolfram Language code: CDF[𝒟1, y]
Wolfram Language code: CDF[𝒟2, y]
Wolfram Language code: %% - %//FullSimplify

OrderDistribution is a special case of TransformedDistribution:

Wolfram Language code: Table[PDF[OrderDistribution[{NormalDistribution[], 3}, k], w], {k, 3}]
Wolfram Language code: Table[PDF[TransformedDistribution[RankedMin[{x, y, z}, k], {x, y, z}ProductDistribution[{NormalDistribution[], 3}]], w], {k, 3}]
Wolfram Language code: FullSimplify[%% - %]

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

Wolfram Language code: {RankedMin[{x, y, z}, 1] - Min[x, y, z], RankedMin[{x, y, z}, 3] - Max[x, y, z]}//FullSimplify

SliceDistribution relates TransformedProcess to TransformedDistribution:

Wolfram Language code: 𝒟1 = TransformedProcess[3b[t] + 5, bPoissonProcess[2], t][s]; 𝒟2 = TransformedDistribution[3b + 5, bPoissonProcess[2][s]];

The resulting distributions are equal:

Wolfram Language code: CDF[𝒟1, x] == (CDF[𝒟2, x]//FunctionExpand)

Possible Issues  (3)

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

Wolfram Language code: 𝒟z = TransformedDistribution[x + y, {xNormalDistribution[], yNormalDistribution[]}]
Wolfram Language code: TransformedDistribution[z - x, {z𝒟z, xNormalDistribution[]}]

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

Wolfram Language code: 𝒟s = TransformedDistribution[x + y, {xExponentialDistribution[1], yExponentialDistribution[1]}]
Wolfram Language code: 𝒟d = TransformedDistribution[2x, xExponentialDistribution[1]]

Compare distribution densities:

Wolfram Language code: Plot[{PDF[𝒟s, x], PDF[𝒟d, x]}, {x, 0, 10}, Filling -> Axis]

Autoevaluation may fail for complicated expressions:

Wolfram Language code: tr = TransformedDistribution[k * u / (1 - u), uBetaDistribution[a, b]]

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

Wolfram Language code: 𝒟1 = TransformedDistribution[u / (1 - u), uBetaDistribution[a, b]]
Wolfram Language code: 𝒟2 = TransformedDistribution[k * y, y𝒟1]

Compare the probability density functions:

Wolfram Language code: PDF[tr, x] - PDF[𝒟2, x]//FullSimplify[#, a > 0 && b > 0 && k > 0]&

Neat Examples  (1)

Affine transformations of a normal distribution:

Wolfram Language code: funs = {x, x + 1, x - 1, 1.2x, x / 2.1};
Wolfram Language code: Plot[Table[PDF[TransformedDistribution[f, xNormalDistribution[]], x], {f, funs}]//Evaluate, {x, -5, 5}, Filling -> Axis, PlotLegends -> funs]

See Also

Distributed  ProbabilityDistribution  OrderDistribution  TruncatedDistribution  CensoredDistribution  CopulaDistribution  Probability  Expectation  RandomVariate

Function Repository: MappedTransformedDistribution  TimeShiftedDistribution

Related Guides

    ▪
  • Random Variables
  • ▪
  • Derived Statistical Distributions
  • ▪
  • Probability & Statistics
  • ▪
  • Probability & Statistics with Quantities
  • ▪
  • Extreme Value Distributions
  • ▪
  • Distributions in Reliability Analysis
  • ▪
  • Numbers with Uncertainty

History

Introduced in 2010 (8.0) | Updated in 2016 (10.4)

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_2026_transformeddistribution, author="Wolfram Research", title="{TransformedDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/TransformedDistribution.html}", note=[Accessed: 01-September-2026]}

BibLaTeX

@online{reference.wolfram_2026_transformeddistribution, organization={Wolfram Research}, title={TransformedDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/TransformedDistribution.html}, note=[Accessed: 01-September-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • AI Access
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English