({{, (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution])[pdf,{x,(Subscript[x, min]),(Subscript[x, max])}] 
represents the continuous distribution with PDF pdf in the variable x where the pdf is taken to be zero for x<(Subscript[x, min]) and x>(Subscript[x, max]).}, {, (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution])[pdf,{x,(Subscript[x, min]),(Subscript[x, max]),dx}]
represents the discrete distribution with PDF pdf in the variable x where the pdf is taken to be zero for x<(Subscript[x, min]) and x>(Subscript[x, max]).}, {, (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution])[pdf,{x,…},{y,…},…]
represents a multivariate distribution with PDF pdf in the variables x, y, …, etc. }, {, (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution])[{"CDF",cdf},…]
represents a probability distribution with CDF given by cdf. }, {, (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution])[{"SF",sf},…]
represents a probability distribution with survival function given by sf. }, {, (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution])[{"HF",hf},…]
represents a probability distribution with hazard function given by hf. }})

OpenersNotesSection(Spacer1)Details and Options

For a multivariate (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution]) definition, all variables need to be either discrete or continuous; no mixed cases can occur.

(RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution])[pdf,…] is equivalent to (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution])[{"PDF", pdf},…].

(RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution])[…,(RefLink[Assumptions, paclet:ref/Assumptions])->assum] specifies the assumptions assum for parameters in the PDF or domain specification.

The probability density function pdf in the definition of (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution]) is assumed to be valid. In particular, it is assumed that it has been normalized to unity.

The pdf can be normalized by setting (RefLink[Method, paclet:ref/Method])->"Normalize" while defining a (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution]).

(RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution]) can be used with such functions as (RefLink[Mean, paclet:ref/Mean]), (RefLink[CDF, paclet:ref/CDF]), (RefLink[RandomVariate, paclet:ref/RandomVariate]), etc.

OpenersPrimaryExamplesSection(Spacer1)Examples  (37)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Define a continuous probability distribution:

𝒟=ProbabilityDistribution[Sqrt[2]/Pi/(1+x^4),{x,-Infinity,Infinity}];

Probability density function:

PDF[𝒟,x]

Plot[%, {x,-4,4},Filling->Axis]

Cumulative distribution function:

CDF[𝒟,x]

Plot[%, {x,-4,4},Filling->Axis,PlotRange->{0,1}]

The mean and variance:

Mean[𝒟]

Variance[𝒟]

OpenersExampleSection1(Spacer1)Scope  (13)

OpenersExampleSubsection0(Spacer1)Distribution Specification  (8)

Define a univariate continuous probability distribution:

𝒟=ProbabilityDistribution[3(1-x^2)/4,{x,-1,1}];

Probability density function:

Plot[PDF[𝒟,x]//Evaluate,{x,-2,2},Filling->Axis]

Define a univariate discrete probability distribution:

𝒟=ProbabilityDistribution[2^(-x-1),{x,0,∞,1}];

Cumulative distribution function:

DiscretePlot[CDF[𝒟,x]//Evaluate,{x,0,8},ExtentSize->Right]

Define a multivariate continuous distribution:

𝒟=ProbabilityDistribution[((3 (E^(-((x^2)/2))) (y^2))/(Sqrt[2 π])),{x,-∞,∞},{y,0,1}];

Verify that the integral of the PDF over the domain of the distribution is 1:

Integrate[PDF[𝒟,{x,y}],{x,-∞,∞},{y,0,1}]

Define a multivariate discrete distribution:

𝒟=ProbabilityDistribution[(((2^x) (y^2))/(55 (E^2) x!)),{x,0,∞,1},{y,0,5,1}];

Compute the expectation for an expression in this distribution:

Expectation[x^2+3y,{x,y}\[Distributed]𝒟]

Formula distribution specified by its CDF:

𝒟=ProbabilityDistribution[{"CDF",Piecewise[{{-2+x,2≤x≤3},{1,x>3}},0]},{x,-∞,∞}];

Mean and variance for the distribution:

{Mean[𝒟],Variance[𝒟]}

Formula distribution specified by its survival function:

𝒟=ProbabilityDistribution[{"SF",Piecewise[{{1-2 (((-2+x))^2),2≤x≤(5/2)},{2 (((3-x))^2),(5/2)<x≤3},{1,x<2}},0]},{x,2,3}];

Kurtosis for the distribution:

Kurtosis[𝒟]//N

Compare with the value obtained by using a random sample from the distribution:

data=RandomVariate[𝒟,10^3];

Kurtosis[data]

Define probability distribution by its hazard function:

𝒟=ProbabilityDistribution[{"HF",x/(x^2+1)},{x,0,Infinity}];

Compute survival probability:

Probability[t>τ,t\[Distributed]𝒟]//Simplify

Plot[%,{τ,0,5}]

Specify assumptions on a parameter in the definition of a formula distribution:

𝒟=ProbabilityDistribution[UnitTriangle[x-a],{x,-2,2},Assumptions-> -1<a<1];

Probability density function:

PDF[𝒟,x]

Table[Plot[PDF[𝒟,x]//Evaluate,{x,-2,2},Filling->Axis],{a,-1,1}]

Verify that the integral of the PDF is 1 under the given assumptions:

Integrate[PDF[𝒟,x],{x,-2,2},Assumptions->-1<a<1]

OpenersExampleSubsection1(Spacer1)Continuous Univariate Distributions  (2)

Define a two-sided exponential distribution:

𝒟=ProbabilityDistribution[Piecewise[{{λ Exp[λ x]/3,x<0},{2/3 λ Exp[-λ x],x≥0}}],{x,-∞,∞},Assumptions->λ>0];

Probability density function:

Plot[Table[PDF[𝒟,x],{λ,{0.3,0.7,1.5}}]//Evaluate,{x,-3,3},Filling->Axis,PlotRange->All]

PDF[𝒟,x]

Cumulative distribution function:

Plot[Table[CDF[𝒟,x],{λ,{0.3,0.7,1.5}}]//Evaluate,{x,-3,3},Filling->Axis,PlotRange->All]

CDF[𝒟,x]

Quantile function:

Plot[Table[Quantile[𝒟,p],{λ,{0.3,0.7,1.5}}]//Evaluate,{p,0.01,0.99},Filling->Axis,PlotRange->All]

Moments:

Mean[𝒟]

Variance[𝒟]

Define a distribution with PDF given in terms of (RefLink[DiracDelta, paclet:ref/DiracDelta]):

𝒟=ProbabilityDistribution[(∑_(k=-3)^3)(1/7) DiracDelta[x-k],{x,-∞,∞}];

Cumulative distribution function:

cdf=CDF[𝒟,x];

Plot[cdf,{x,-4,4},Filling->Axis,PlotRange->All,Exclusions->None]

cdf

Quantile function:

Plot[Quantile[𝒟,p]//Evaluate,{p,0.01,0.99},Filling->Axis,PlotRange->All]

OpenersExampleSubsection2(Spacer1)Discrete Univariate Distributions  (1)

A discrete distribution with hypergeometric term PDF:

𝒟=ProbabilityDistribution[16^(2x+1)/(Sinh[16](2x + 1)!), 
            {x, 0, ∞, 1}];

Probability density function:

DiscretePlot[PDF[𝒟,x]//Evaluate,{x,0,15},ExtentSize->1/2]

PDF[𝒟,x]

Cumulative distribution function:

DiscretePlot[CDF[𝒟,x]//Evaluate,{x,0,15},ExtentSize->Right]

CDF[𝒟,x]

Mean and variance:

Mean[𝒟]

Variance[𝒟]

MomentGeneratingFunction[𝒟,t]

OpenersExampleSubsection3(Spacer1)Continuous Multivariate Distributions  (1)

A bivariate triangular distribution:

𝒟 = ProbabilityDistribution[PDF[TriangularDistribution[{2, 5}], x]
     PDF[TriangularDistribution[{3, 7}], y], {x, 0, ∞}, 
    {y, 0, ∞}];

Probability density function:

Plot3D[PDF[𝒟,{x,y}]//Evaluate,{x,1,6},{y,2,8},Exclusions->None,PlotRange-> All]

PDF[𝒟,{x,y}]

Cumulative distribution function:

Plot3D[CDF[𝒟,{x,y}]//Evaluate,{x,1,6},{y,2,8},Exclusions->None,PlotRange-> All]

CDF[𝒟,{x,y}]

Mean and variance:

Mean[𝒟]

Variance[𝒟]

CumulantGeneratingFunction[𝒟,{u,v}]

OpenersExampleSubsection4(Spacer1)Discrete Multivariate Distributions  (1)

A discrete bivariate rectangular distribution:

𝒟 = ProbabilityDistribution[PDF[DiscreteUniformDistribution[{2, 7}], x]
     PDF[GeometricDistribution[1/5], y], {x, 0, ∞,1}, 
    {y, 0, ∞,1}];

Probability density function:

DiscretePlot3D[PDF[𝒟,{x,y}]//Evaluate,{x,0,10},{y,0,10},ExtentSize->1/2]

PDF[𝒟,{x,y}]

Cumulative distribution function:

DiscretePlot3D[CDF[𝒟,{x,y}]//Evaluate,{x,0,10},{y,0,10},ExtentSize->Right]

Mean and variance:

Mean[𝒟]

Variance[𝒟]

CharacteristicFunction[𝒟,{u,v}]

OpenersExampleSection2(Spacer1)Options  (2)

OpenersExampleSubsection5(Spacer1)Assumptions  (1)

Specify assumptions:

𝒟=ProbabilityDistribution[ x/a,{x,0,Sqrt[2 a]},Assumptions->a>0];

PDF[𝒟,x]

𝒟/.ProbabilityDistribution->Integrate

OpenersExampleSubsection6(Spacer1)Method  (1)

Normalize a continuous probability distribution:

𝒟=ProbabilityDistribution[x,{x,0,1},Method->"Normalize"]

Verify that the (RefLink[PDF, paclet:ref/PDF]) of the distribution is normalized to unity:

𝒟/.{ProbabilityDistribution->Integrate}

Normalize a multivariate probability distribution:

ProbabilityDistribution[x(1-x y(1-y  )),{x,0,1},{y,0,1},Method->"Normalize"]

OpenersExampleSection3(Spacer1)Applications  (14)

Define a continuous univariate distribution using its probability density function:

𝒟=ProbabilityDistribution[Piecewise[{{x^2/9,0<x≤3}}],{x,-∞,∞}];

Obtain the cumulative distribution function for this distribution:

CDF[𝒟,x]

Plot[CDF[𝒟,x]//Evaluate,{x,-1,5},Filling->Axis]

Study the statistical properties of the distribution:

{Mean[𝒟],Variance[𝒟],Kurtosis[𝒟]}

MomentGeneratingFunction[𝒟,t]

Find the probability of an event:

Probability[x^2-x>1,x\[Distributed]𝒟]

N[%]

NProbability[x^2-x>1,x\[Distributed]𝒟]

Compute a conditional expectation:

Expectation[Conditioned[x^3,x>1],x\[Distributed]𝒟]

NExpectation[Conditioned[x^3,x>1],x\[Distributed]𝒟]

Compute the probability that a random variable is within one standard deviation from the mean:

𝒟=ProbabilityDistribution[Sqrt[2]/Pi/(1+x^4),{x,-∞,∞}];

μ=Mean[𝒟];
σ=StandardDeviation[𝒟];
pdf= PDF[𝒟,x];

Show[Plot[pdf,{x,-3,μ-σ},Filling->Axis,AxesOrigin->{0,0}],Plot[pdf,{x,μ-σ,μ+σ}],Plot[pdf,{x,μ+σ,3},Filling->Axis,AxesOrigin->{0,0}],PlotRange->{0,1/2},Ticks->{Automatic,None}]

Probability[μ-σ<x<μ+σ,x\[Distributed]𝒟]

N[%]

Probability of being within two standard deviations from the mean:

Probability[μ-2σ<x<μ+2σ,x\[Distributed]𝒟]

N[%]

Package it up as a function using (RefLink[NProbability, paclet:ref/NProbability]):

percentage[n_]:=NProbability[μ-n σ<x<μ+n σ,x\[Distributed] 𝒟]

Table[percentage[n],{n,1,3,1/3}]

Estimate the value of a parameter in (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution]):

r={0.2,0.07,0.04,0.14,0.21,0.23,0.16,0.06,0.44,1.025};

𝒟=ProbabilityDistribution[a E^(-a x),{x,0,∞},Assumptions->a>0];

EstimatedDistribution[r,𝒟]

Muth distribution is related to (RefLink[GompertzMakehamDistribution, paclet:ref/GompertzMakehamDistribution]) and has a PDF:

PDF[GompertzMakehamDistribution[b,1/b,-b,0],x]

However, the third parameter of a (RefLink[GompertzMakehamDistribution, paclet:ref/GompertzMakehamDistribution]) is required to be positive:

With[{b=1/2},PDF[GompertzMakehamDistribution[b,1/b,-b,0],x]]

Define a new distribution:

MuthDistribution[b_]=ProbabilityDistribution[(Exp[b x]-b) Exp[b x-(Exp[b x]-1)/b],{x,0,Infinity},Assumptions->1≥ b≥0];

Probability density function:

Plot[Table[PDF[MuthDistribution[b],x],{b,{.2,.5,.7}}]//Evaluate,{x,0,3},Filling->Axis]

Hazard function:

Plot[Table[HazardFunction[MuthDistribution[b],x],{b,{.2,.5,.7}}]//Evaluate,{x,0,3},Filling->Axis]

A double-sided power distribution is used in economics:

TwoSidedPowerDistribution[n_,θ_]=ProbabilityDistribution[Piecewise[{{n (x/θ)^(n-1),0<x<θ},{n ((1-x)/(1-θ))^(n-1),θ<x<1}},0],{x,0,1},Assumptions->0<θ<1&&n>0];

Probability density function:

Plot[Table[PDF[TwoSidedPowerDistribution[3,θ],x],{θ,{0.2,0.5,1}}]//Evaluate,{x,0,1},Filling->Axis,Exclusions->None]

Skewness:

sk[n_,θ_]=Skewness[TwoSidedPowerDistribution[n,θ]]//FullSimplify[#,0<θ<1]&

Kurtosis:

ks[n_,θ_]=Kurtosis[TwoSidedPowerDistribution[n,θ]]//FullSimplify[#,0<θ<1]&

Moment ratio diagram:

ParametricPlot[{sk[n,θ],ks[n,θ]},{θ,0.1,0.9},{n,1,6},FrameLabel->{Skewness,Kurtosis}]

Create a uniform distribution over the unit disk:

𝒟=ProbabilityDistribution[Piecewise[{{1/π,0≤(Sqrt[(x^2)+(y^2)])≤1}}],{x,-1,1},{y,-1,1}];

Plot3D[PDF[𝒟,{x,y}]//Evaluate,{x,-1,1},{y,-1,1}]

Find each (RefLink[MarginalDistribution, paclet:ref/MarginalDistribution]):

PDF[MarginalDistribution[𝒟,1],x]

PDF[MarginalDistribution[𝒟,2],y]

If dist is the joint distribution of the vector {x,y}, then x and y are not independent:

PDF[𝒟,{x,y}]===PDF[MarginalDistribution[𝒟,1],x]PDF[MarginalDistribution[𝒟,2],y]//FullSimplify

In a reliability study the CDF for the lifetime distribution is given by 1-0.7` (e^(-(Subscript[c, 1]) t)) -0.3` (e^(-(Subscript[c, 2]) t)) with (Subscript[c, 1])=(10^(-5))(h^(-1)) and (Subscript[c, 2])=2 (10^(-5))(h^(-1)). What is the mean time to failure (MTTF) for the system? MTTF is also known as the mean:

lifetimeDistribution=ProbabilityDistribution[{"CDF",1-0.7Exp[-(10^(-5))t]-0.3Exp[-2 (10^(-5))t]},{t,0,∞}]

Hence the mean time to failure is:

Mean[lifetimeDistribution]

Change point distribution is characterized by a two-value hazard function:

ChangePointDistribution[λ0_,λ1_,τ_]=ProbabilityDistribution[Piecewise[{{λ0 Exp[-λ0 x],0<x≤τ},{λ1 Exp[-λ0 τ-λ1 (x-τ)],x>τ}}],{x,0,∞},Assumptions->τ>0&&λ0>0&&λ1>0];

Hazard function:

HazardFunction[ChangePointDistribution[λ0,λ1,τ],x]//FullSimplify

The probability density function is discontinuous at x=τ:

Plot[Table[PDF[ChangePointDistribution[λ0,12,2],x],{λ0,{1,1.5,2}}]//Evaluate,{x,0,3},Filling->Axis]

The limiting case is (RefLink[ExponentialDistribution, paclet:ref/ExponentialDistribution]):

Limit[PDF[ChangePointDistribution[λ0,λ1,τ],x],τ->0]

PDF[ExponentialDistribution[λ1],x]

FullSimplify[%-%%,x≠0]

The second limit:

Limit[PDF[ChangePointDistribution[λ0,λ1,τ],x],τ->∞]

PDF[ExponentialDistribution[λ0],x]

FullSimplify[%-%%,x≠0]

Define a joint probability density function for two variables x and y:

f[x_,y_]=Piecewise[{{k(x+3y),0< x<10&&0<y<10}}]

Determine the value of the normalization factor k:

{sol}=Solve[Integrate[f[x,y],{x,-∞,∞},{y,-∞,∞}]==1,k]

The joint probability distribution is given by:

𝒟=ProbabilityDistribution[f[x,y]/.sol,{x,-∞,∞},{y,-∞,∞}];

Compute the probability of an event in this distribution:

Probability[x<7&&y>2,{x,y}\[Distributed]𝒟]

N[%]

Obtain the numerical value of the probability directly:

NProbability[x<7&&y>2,{x,y}\[Distributed]𝒟]

The waiting times for buying tickets and for buying popcorn at a movie theater are independent and both follow an exponential distribution. The average waiting time for buying a ticket is 10 minutes and the average waiting time for buying popcorn is 5 minutes. Find the probability that a moviegoer waits for a total of less than 25 minutes before taking his or her seat:

ticketwait[x_]=PDF[ExponentialDistribution[1/10],x]

popcornwait[y_]=PDF[ExponentialDistribution[1/5],y]

totalwait[x_,y_]=PiecewiseExpand[ticketwait[x]popcornwait[y]]

𝒟=ProbabilityDistribution[totalwait[x,y],{x,-∞,∞},{y,-∞,∞}];

Probability[x+y<25,{x,y}\[Distributed]𝒟]//Expand

N[%]

Obtain the numerical value of the probability directly:

NProbability[x+y<25,{x,y}\[Distributed]𝒟]

A factory produces cylindrically shaped roller bearings. The diameters of the bearings are normally distributed with mean 5 cm and standard deviation 0.01 cm. The lengths of the bearings are normally distributed with mean 7 cm and standard deviation 0.01 cm. Assuming that the diameter and the length are independently distributed, find the probability that a bearing has either diameter or length that differs from the mean by more than 0.02 cm:

diameter[x_]=PDF[NormalDistribution[5,0.01],x]

length[y_]=PDF[NormalDistribution[7,0.01],y]

𝒟=ProbabilityDistribution[diameter[x]length[y],{x,-∞,∞},{y,-∞,∞}];

Plot3D[PDF[𝒟,{x,y}]//Evaluate,{x,4.95,5.05},{y,6.95,7.05},PlotRange->All,ColorFunction->"Rainbow"]

1-NProbability[Abs[x-5]<0.02&&Abs[y-7]<0.02,{x,y}\[Distributed]𝒟]

Define the distribution corresponding to an electron's radial density in a hydrogen atom:

HydrogenAtomRadialDistribution[n_,l_,m_]:=ProbabilityDistribution[(((n-l-1)!)/(2n(n+l)!))Exp[-r](r^(2l+2))LaguerreL[n-l-1,2l+1,r]^2,{r,0,∞},Assumptions->{n,m,l}∈Integers&&n>0&&0≤l<n&&-l≤m≤l]

Generate random numbers from an instance of this distribution:

ℛ𝒟=HydrogenAtomRadialDistribution[4,1,1];

radii=RandomVariate[ℛ𝒟,10^5];

Compare a sample histogram to the distribution density plot:

Show[Histogram[radii,50,"PDF"],Plot[PDF[ℛ𝒟,r],{r,0,30},PlotStyle->Thick]]

Find the mean radius and its standard deviation:

{Mean[ℛ𝒟],StandardDeviation[ℛ𝒟]}

Define a joint probability distribution on a square:

j𝒟=ProbabilityDistribution[(1/4)(1+x y((x^2)-(y^2))),{x,-1,1},{y,-1,1}];

Plot3D[PDF[j𝒟,{x,y}]//Evaluate,{x,-1,1},{y,-1,1}]

Each marginal distribution is the uniform distribution on the interval from -1 to 1:

PDF[MarginalDistribution[j𝒟,1],x]

PDF[MarginalDistribution[j𝒟,2],y]

Verify that random variate x+y is equal in distribution to the sum of independent uniforms, using characteristic functions:

CharacteristicFunction[TransformedDistribution[x+y,{x,y}\[Distributed]j𝒟],t]

This is equal to the product of characteristic functions of marginals, i.e. (Subscript[ϕ, x+y])(t)==(Subscript[ϕ, x])(t) (Subscript[ϕ, y])(t):

%==CharacteristicFunction[MarginalDistribution[j𝒟,1],t]CharacteristicFunction[MarginalDistribution[j𝒟,2],t]

This is possible because x and y are uncorrelated, albeit dependent:

Correlation[j𝒟, 1, 2]

Compute properties for the slice distribution at time t of an inhomogeneous Poisson process with intensity function λ(u):

𝒟[μ_,t_]:=ProbabilityDistribution[((μ^k Exp[-μ])/(k!)),{k,0,∞,1}]

The mean μ is the integral of the intensity function up to time t:

m=Integrate[λ[u],{u,0,t}];

{Mean[𝒟[μ,t]],Variance[𝒟[μ,t]]}/.μ->m

Compare to the continuous time version of the process:

𝒫=InhomogeneousPoissonProcess[λ[u],u];

{Mean[𝒫[t]],Variance[𝒫[t]]}

OpenersExampleSection4(Spacer1)Properties & Relations  (3)

The first argument of (RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution]) is the PDF by default:

𝒟=ProbabilityDistribution[Sqrt[2]/Pi/(1+x^4),{x,-∞,∞}];

First[%]

PDF[𝒟,x]

The integral of the PDF over the distribution domain needs to be unity:

Integrate[PDF[𝒟,x],{x,-∞,∞}]

(RefLink[ProbabilityDistribution, paclet:ref/ProbabilityDistribution]) decomposes into absolutely continuous and discrete parts:

cdf=CDF[MixtureDistribution[{1/3,2/3},{LaplaceDistribution[0,1],TransformedDistribution[x-2,x\[Distributed]BinomialDistribution[4,1/3]]}],z]

ProbabilityDistribution[{CDF,cdf},{z,-∞,∞}]

(RefLink[PDF, paclet:ref/PDF]) can be given as (RefLink[InterpolatingFunction, paclet:ref/InterpolatingFunction]):

pts=MapAt[#+2&,{{0,0},{4/3,1},{2,3},{3,4},{4,3},{5,0},{6,0},{7,1/2}},{All,2}];

if=Interpolation[pts,Method->"Spline",InterpolationOrder->4];
With[{int=NIntegrate[if[x],{x,0,7}]},
if=Interpolation[MapAt[#/int&,pts,{All,2}],Method->"Spline",InterpolationOrder->4]]

dist=ProbabilityDistribution[if[x],{x,0,7}];

sample=RandomVariate[dist,10^6];

Show[
Histogram[sample,100,"PDF"],
Plot[if[x],{x,0,7}]]

OpenersExampleSection5(Spacer1)Possible Issues  (4)

Probability density function used to define the distribution is assumed to be valid:

invalidDist=ProbabilityDistribution[x-1,{x,0,1}];

The specified (RefLink[PDF, paclet:ref/PDF]) is invalid since it is not non-negative and not normalized to 1:

invalidDist/.{ProbabilityDistribution->Integrate}

Sampling from this distribution may generate variates outside the distribution domain:

RandomVariate[invalidDist,10]

The PDF of this distribution is not normalized to unity:

𝒟=ProbabilityDistribution[x^2,{x,0,1}];

nconst=Integrate[PDF[𝒟,x],{x,0,1}]

Normalize the distribution:

𝒟1=ProbabilityDistribution[x^2/nconst,{x,0,1}];

Integrate[PDF[𝒟1,x],{x,0,1}]

Automatically normalize:

𝒟2=ProbabilityDistribution[x^2,{x,0,1},Method->"Normalize"];

Integrate[PDF[𝒟2,x],{x,0,1}]

Normalization will not change the sign of the PDF:

ProbabilityDistribution[x-1,{x,0,1},Method->"Normalize"]

Normalization will not be meaningful when the integral is not defined:

ProbabilityDistribution[Exp[x^2],{x,0,∞},Method->"Normalize"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Probability, paclet:ref/Probability])  ▪  (RefLink[Expectation, paclet:ref/Expectation])  ▪  (RefLink[PDF, paclet:ref/PDF])  ▪  (RefLink[CDF, paclet:ref/CDF])  ▪  (RefLink[TransformedDistribution, paclet:ref/TransformedDistribution])  ▪  (RefLink[OrderDistribution, paclet:ref/OrderDistribution])  ▪  (RefLink[CopulaDistribution, paclet:ref/CopulaDistribution])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Random Variables, paclet:guide/RandomVariables])}})}})