# Defining and evaluating new continuous distributions based on Mathematica's distributions

A number of functions operate with Mathematica's set of distributions e.g.

Through[{Mean, StandardDeviation, Variance}[UniformDistribution[{umin,umax}]]]


which returns the correct result

    {(umax + umin)/2, (umax - umin)/(2 Sqrt[3]), 1/12 (umax - umin)^2}


However, when I add two continuous distributions, thus creating a kind of annular distribution, it will not be evaluated.

Through[{Mean, StandardDeviation, Variance}[
UniformDistribution[{umin, umax}] -
UniformDistribution[{\[Epsilon] umin, \[Epsilon] umax}]]]


I think I had a very good look at the Mathematica documentation but I simply could not find any indication of how to define "my own distribution".

Please note, that I know how to handle such functions, i.e., how to calculate the Mean ... The issue of this question is, are there ways in Mathematica, I have missed, that allow me to use Mathematica's functionality on distributions with my distributions I have defined using Mathematica's distributions.

-

The way to combine distributions would be to use TransformedDistribution. Your code could be written as follows:

Through[{Mean, StandardDeviation, Variance}[
TransformedDistribution[
x - y,
{
x \[Distributed] UniformDistribution[{umin, umax}],
y \[Distributed] UniformDistribution[{\[Epsilon] umin, \[Epsilon] umax}]
}
]]]


If you want to define distributions that work like the built-in distributions, have a look at this workshop.

-
Thank you very much that was exactly what I was looking for. The collection guide/DerivedDistributions summarizes a number of other functions I was looking for. – Ernst Stelzer Oct 26 '13 at 13:32