Wolfram Language

Extended Probability & Statistics

Handle Discontinuities in a CDF

Define a formula distribution by a cumulative distribution function. The distribution function contains jump discontinuities, which represent a mixture of continuous and discrete components.

In[1]:=
Click for copyable input
cdf = CDF[ MixtureDistribution[{1/3, 2/3}, {LaplaceDistribution[0, 1], TransformedDistribution[x - 2, x \[Distributed] BinomialDistribution[4, 1/3]]}], z];
show complete Wolfram Language input
In[2]:=
Click for copyable input
Plot[cdf, {z, -5, 5}, PlotTheme -> "Detailed", Filling -> Axis, ImageSize -> Medium, PlotLegends -> None]
Out[2]=

ProbabilityDistribution decomposes the distribution into absolutely continuous and discrete parts.

In[3]:=
Click for copyable input
ProbabilityDistribution[{CDF, cdf}, {z, -Infinity, Infinity}]
Out[3]=

Handle PDF input with DiracDelta weights.

In[4]:=
Click for copyable input
ProbabilityDistribution[ Sum[1/7 DiracDelta[x - k], {k, -3, 3}], {x, -Infinity, Infinity}]
Out[4]=

Related Examples

de es fr ja ko pt-br ru zh