Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

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

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

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

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • 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/STEAM
  • 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
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

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

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • 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/STEAM
      • 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
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
QuantityDistribution
  • See Also
    • Quantity
    • QuantityArray
    • UnitConvert
    • RandomVariate
    • EstimatedDistribution
    • Expectation
    • Probability
    • TransformedDistribution
  • Related Guides
    • Probability & Statistics with Quantities
    • Units & Quantities
    • See Also
      • Quantity
      • QuantityArray
      • UnitConvert
      • RandomVariate
      • EstimatedDistribution
      • Expectation
      • Probability
      • TransformedDistribution
    • Related Guides
      • Probability & Statistics with Quantities
      • Units & Quantities

QuantityDistribution[dist,unit]

represents a distribution dist of quantities with unit specified by unit.

QuantityDistribution[dist,{unit1,unit2,…}]

represents a multivariate distribution with units {unit1,unit2,…}.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Basic Uses  
Construction  
Estimation  
Derived Distributions  
Applications  
Properties & Relations  
Possible Issues  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • Quantity
    • QuantityArray
    • UnitConvert
    • RandomVariate
    • EstimatedDistribution
    • Expectation
    • Probability
    • TransformedDistribution
  • Related Guides
    • Probability & Statistics with Quantities
    • Units & Quantities
    • See Also
      • Quantity
      • QuantityArray
      • UnitConvert
      • RandomVariate
      • EstimatedDistribution
      • Expectation
      • Probability
      • TransformedDistribution
    • Related Guides
      • Probability & Statistics with Quantities
      • Units & Quantities

QuantityDistribution

QuantityDistribution[dist,unit]

represents a distribution dist of quantities with unit specified by unit.

QuantityDistribution[dist,{unit1,unit2,…}]

represents a multivariate distribution with units {unit1,unit2,…}.

Details

  • QuantityDistribution is typically created by using quantities in parametric, derived distributions or estimated from data with quantities.
  • QuantityDistribution will automatically attempt to parse an unknown unit string to its canonical form. »
  • QuantityDistribution[dist,unit] is equivalent to TransformedDistribution[Quantity[x,unit],x dist]. »
  • The arguments to distribution functions are assumed to have units compatible with unit. »
  • The values of distribution functions for univariate distributions have the following units:
  • CDFunitless
    InverseCDFunit
    SurvivalFunctionunitless
    InverseSurvivalFunctionunit
  • The values of PDF and HazardFunction have the following units: »
  • continuous univariate distunit-1
    continuous multivariate distunit1-1 unit2-1 …
    discrete distunitless
  • Moments of univariate QuantityDistribution[dist,unit] have the following units:
  • Moment[…,r]unit r
    CentralMoment[…,r]unit r
    Cumulant[…,r]unit r
    FactorialMoment[…,r]unit r
  • Moments of multivariate QuantityDistribution[dist,unit] have the following units:
  • Moment[…,{r1,r2,…}]unit1r1 unit2r2 …
    CentralMoment[…,{r1,r2,…}]unit1r1 unit2r2 …
    Cumulant[…,{r1,r2,…}]unit1r1 unit2r2 …
    FactorialMoment[…,{r1,r2,…}]unit1r1 unit2r2 …
  • Moment-generating functions require their arguments to be quantities with units that are reciprocal to the units of the QuantityDistribution.
  • Sampling from QuantityDistribution gives Quantity or QuantityArray.
  • QuantityDistribution can be used with such functions as Mean, CDF, RandomVariate, QuantityMagnitude, and Expectation.

Examples

open all close all

Basic Examples  (3)

Define a distribution for a random position:

Compute the probability of the position exceeding a threshold:

Define a distribution of life expectancy:

Compute conditional life expectancy:

Fit a model to data with units:

Convert the distribution to another compatible unit:

Compare with fitting to distribution in hours:

Scope  (29)

Basic Uses  (11)

Find the mean time of service for a device with WeibullDistribution-modeled lifetime:

Find the median time of service:

Compute the cumulative distribution function for a quantity distribution:

The argument of CDF is assumed to be a quantity of time:

Evaluate the cumulative distribution function for a few time values:

Find the cumulative distribution function for the argument in minutes:

Compute quantile of a QuantityDistribution:

Sampling from QuantityDistribution gives Quantity or QuantityArray:

Sample 238 insurance claim sizes according to the chosen model:

Compute log-likelihood for distribution with quantities on data with quantities:

Data can have any compatible units:

PDF for continuous distribution with quantities:

The probability density function has a reciprocal unit:

This is consistent with substituting quantities into the symbolic expression for PDF:

The PDF for discrete distribution with quantities is unitless:

The HazardFunction for continuous distributions with quantities has reciprocal units:

Estimate the distribution of solar radiant energy reaching Earth's surface from synthetic data:

Compare the fit:

QuantityMagnitude and QuantityUnit of a quantity distribution:

Extract the distribution of the magnitude:

Extract the unit:

Use UnitConvert to convert distribution to compatible units:

Distribution of voltage with random resistance and current:

Use UnitSimplify to simplify units to "Volts":

Construction  (6)

Define distribution for a quantity of length:

Define the same distribution using a quantity scale parameter:

Find its median:

Define joint distribution of height and weight:

Define the same distribution using quantity parameters:

Convert the distribution into different units:

Parsing of unknown unit strings is automatically attempted:

Find the interpreted unit:

Quantities can be used to specify units in QuantityDistribution:

Magnitude of the input quantity is ignored:

Use TransformedDistribution to define distribution of random quantities:

Compute the mean distance:

Define data distribution with units:

Plot the cumulative distribution function:

Estimation  (4)

Estimate distribution from quantity data:

Fit a normal distribution in meters to the data:

Fit a normal distribution in feet to the data:

Estimate parameters of a multivariate distribution:

Fit a multivariate distribution in the units of the data:

Fit a multivariate distribution in compatible units:

Estimate distribution from the quantity data:

The data is bimodal, suggesting a mixture of bivariate normal distributions might be a good fit:

EstimatedDistribution gives QuantityDistribution with fitted parameters:

FindDistributionParameters gives rules with Quantity values when possible:

Substituting these parameters into the model results in QuantityDistribution:

Estimate distribution from quantity data:

Specify starting values of relevant parameters using quantities:

Parameters of magnitude distribution dist in QuantityDistribution[dist,units] are numeric:

Derived Distributions  (8)

Truncate a quantity distribution:

Truncation of QuantityDistribution gives another QuantityDistribution:

Censor a quantity distribution:

Censoring of QuantityDistribution gives another QuantityDistribution:

Compute the mean of the censored quantity distribution:

Define mixture of quantity distributions:

Mixture of compatible QuantityDistributions gives another QuantityDistribution:

Define a spliced distribution with quantity distributions:

Splicing several QuantityDistributions gives another QuantityDistribution:

Sample from the spliced distribution and visualize the histogram:

ProductDistribution of quantity distributions:

Product distribution evaluates to QuantityDistribution:

Evaluate moment:

Create a parameter mixture with quantity distribution:

Parameter mixture of QuantityDistribution evaluates to QuantityDistribution:

Define distribution of the maximum of random quantities:

The distribution of the order statistics gives QuantityDistribution:

QuantityDistribution of a QuantityDistribution:

The result is consistent with the behavior of Quantity under composition:

For a data distribution:

Applications  (8)

The average speed of cars traveling from Champaign, Illinois, to Chicago, Illinois, is well described as a triangular random variable:

Find the expected time of travel:

Define the distribution of a cube's side-length measurements:

Plot the distribution density:

Compute the mean and the dispersion measures of the cube's volume:

Plot the PDF of the cube's volume:

Recorded body weights in kilograms:

Plot the histogram of the data:

Fit NormalDistribution to the data:

Compare the histogram with the estimated PDF:

Express the estimated distribution in pounds:

Test data normality:

The waiting time a customer spends in a restaurant is believed to be exponentially distributed with an average wait time of 5 minutes:

Find the probability that the customer will have to wait more than 10 minutes:

The lifetime of a component has WeibullDistribution with shape and scale parameters of 2 and 997.5 hours, respectively. Find the probability that the component survives 300 hours:

Find the probability that the component is still working after 500 hours, given that it has survived 300 hours:

Find the mean time to failure:

Estimate the distribution of the daily mean temperature in Chicago in the summer of 2015:

Fit the distribution to PERTDistribution:

Check goodness of fit:

Find the estimated distribution for temperature in degrees Fahrenheit:

Velocity density function along any direction of a gas molecule follows a normal distribution with mean 0 and standard deviation . The standard deviation for molecular hydrogen at 573 K is:

The distribution of the speeds of molecules in a hydrogen gas at 573 K is given:

Find the probability that a hydrogen molecule has speed at least 4000 meters per second:

Find the average speed of such a molecule:

Compare the ratios of the average speed and the RMS speed to the most probable speed:

Simulate the speed of 100 hydrogen molecules in the above conditions:

The acceleration of gravity can be measured by measuring a pendulum's period and its length using . The uncertainty in the average of five repeated measurements of the period is modeled with a BatesDistribution:

The pendulum's length has been measured using a ruler with resolution of 1 mm, so its uncertainty is modeled with a UniformDistribution:

The uncertainty in the measurement of the acceleration of gravity:

Compare to the linear approximation:

Compute the average acceleration using the exact and the linearized distributions:

Compute the scales of uncertainty:

Find the sampling estimate of the 90% confidence interval for the measured acceleration:

Properties & Relations  (6)

QuantityDistribution with dimensionless units will auto-evaluate to the magnitude distribution:

Use QuantityMagnitude and QuantityUnit to extract distribution and units:

QuantityDistribution[dist,unit] is equivalent to TransformedDistribution:

Skewness and kurtosis of a QuantityDistribution are unitless:

Joint distribution of mass and acceleration:

The unit of the moment of order (1,1) is the product of units of each component:

The moment can be interpreted as the expected value of force:

PDF of a continuous distribution with units integrates to 1 over its domain:

Reciprocal units of the density function are canceled by the unit of the measure to give unitless antiderivative:

Total probability is equal to 1:

Possible Issues  (4)

The dimensionality of the distribution and units must agree:

Specify two units for two dimensions:

The identical unit for all dimensions:

The unit conversion may map the data outside of the support of the distribution:

Estimate a quantity distribution in kilograms:

Estimate using the units of the data:

Then convert the distribution:

Setting fixed values for parameter estimation is unit dependent:

Compare standard deviations:

This is caused by:

Convert the whole quantity distribution instead:

Use converted units in call to estimation:

The magnitude of the factorial moment of a QuantityDistribution coincides with the factorial moment of the magnitude distribution:

Factorial moment expression is not homogeneous in the location and scale parameters, hence direct substitution of quantity parameters results in an error:

See Also

Quantity  QuantityArray  UnitConvert  RandomVariate  EstimatedDistribution  Expectation  Probability  TransformedDistribution

Related Guides

    ▪
  • Probability & Statistics with Quantities
  • ▪
  • Units & Quantities

History

Introduced in 2016 (10.4)

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

Text

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

CMS

Wolfram Language. 2016. "QuantityDistribution." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/QuantityDistribution.html.

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2025_quantitydistribution, organization={Wolfram Research}, title={QuantityDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/QuantityDistribution.html}, note=[Accessed: 01-December-2025]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

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

  • Wolfram Player
  • Wolfram Engine

  • 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
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English