({{, (RefLink[SurvivalFunction, paclet:ref/SurvivalFunction])[dist,x] 
gives the survival function for the distribution dist evaluated at x.}, {, (RefLink[SurvivalFunction, paclet:ref/SurvivalFunction])[dist,{(Subscript[x, 1]),(Subscript[x, 2]),…}]
gives the multivariate survival function for the distribution dist evaluated at {(Subscript[x, 1]),(Subscript[x, 2]),…}.}, {, (RefLink[SurvivalFunction, paclet:ref/SurvivalFunction])[dist]
gives the survival function as a pure function.}})

OpenersNotesSection(Spacer1)Details

(RefLink[SurvivalFunction, paclet:ref/SurvivalFunction]) is also known as a reliability function.

(RefLink[SurvivalFunction, paclet:ref/SurvivalFunction])[dist,x] gives the probability that an observed value is greater than x.

(RefLink[SurvivalFunction, paclet:ref/SurvivalFunction])[dist,x] is equivalent to (RefLink[Probability, paclet:ref/Probability])[ξ>x,ξ∈dist].

(RefLink[SurvivalFunction, paclet:ref/SurvivalFunction])[dist,{(Subscript[x, 1]),…,(Subscript[x, n])}] is equivalent to (RefLink[Probability, paclet:ref/Probability])[(Subscript[ξ, 1])>(Subscript[x, 1])∧⋯∧(Subscript[ξ, n])>(Subscript[x, n]),{(Subscript[ξ, 1]),…,(Subscript[ξ, n])}\[Distributed]dist].

(RefLink[SurvivalFunction, paclet:ref/SurvivalFunction])[dist,x] is equivalent to 1-(RefLink[CDF, paclet:ref/CDF])[dist,x].

OpenersPrimaryExamplesSection(Spacer1)Examples  (38)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

A survival function for a continuous univariate distribution:

SurvivalFunction[NormalDistribution[0,1],x]

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

A survival function for a discrete univariate distribution:

SurvivalFunction[GeometricDistribution[1/3],x]

DiscretePlot[%,{x,-1,10},ExtentSize->Right,ExtentMarkers->{"Filled","Empty"}]

A survival function for a continuous multivariate distribution:

Plot3D[SurvivalFunction[BinormalDistribution[1/2],{x,y}],{x,-3,3},{y,-3,3},PlotRange->{0,1},MaxRecursion->0]

A survival function for a discrete multivariate distribution:

DiscretePlot3D[SurvivalFunction[MultinomialDistribution[10,{1/3,2/3}],{x,y}],{x,-1,7},{y,-1,7},ExtentSize->Right]

OpenersExampleSection1(Spacer1)Scope  (23)

OpenersExampleSubsection0(Spacer1)Parametric Distributions  (6)

Obtain exact numeric results:

SurvivalFunction[WeibullDistribution[2,5],4]

SurvivalFunction[NegativeBinomialDistribution[20,1/3],5]

Obtain a machine-precision result:

SurvivalFunction[WeibullDistribution[2,5],4.]

Obtain a result at any precision for a continuous distribution:

SurvivalFunction[WeibullDistribution[2,5],N[4,25]]

Obtain a result at any precision for a discrete distribution with inexact parameters:

SurvivalFunction[NegativeBinomialDistribution[20,N[1/3,30]],5]

Survival function for a multivariate distribution:

SurvivalFunction[DirichletDistribution[{2,4,5}],{1/5,2/3}]

Obtain a symbolic expression for the survival function:

SurvivalFunction[ChiSquareDistribution[ν],x]

SurvivalFunction[UniformDistribution[{{a,b},{c,d}}],{x,y}]

OpenersExampleSubsection1(Spacer1)Nonparametric Distributions  (4)

Survival function for nonparametric distributions:

r=RandomVariate[NormalDistribution[],10^4];

SurvivalFunction[HistogramDistribution[r],0.2]

SurvivalFunction[SmoothKernelDistribution[r],0.2]

SurvivalFunction[KernelMixtureDistribution[r],0.2]

Compare with the value for the underlying parametric distribution:

SurvivalFunction[NormalDistribution[],0.2]

Plot the survival function for a histogram distribution:

Plot[SurvivalFunction[HistogramDistribution[RandomVariate[NormalDistribution[],10^3]],x]//Evaluate,{x,-3,3},Filling->Axis,Exclusions->None]

Closed form expression for the survival function of a kernel mixture distribution:

SurvivalFunction[KernelMixtureDistribution[RandomVariate[GammaDistribution[1,2],10
]],x]

Plot of the survival function of a bivariate smooth kernel distribution:

Plot3D[SurvivalFunction[SmoothKernelDistribution[RandomVariate[BinormalDistribution[1/3],30]],{x,y}]//Evaluate,{x,-4,4},{y,-4,4},PlotRange->{0,1.2}]

OpenersExampleSubsection2(Spacer1)Derived Distributions  (10)

Product of independent distributions:

𝒟=ProductDistribution[TriangularDistribution[{2,4}],TriangularDistribution[{1,7}]];

sf=SurvivalFunction[𝒟,{x,y}]

Plot3D[sf,{x,1,5},{y,0,8},PlotRange->All,Exclusions->None]

Component mixture distribution:

𝒟=MixtureDistribution[{1,4},{NormalDistribution[a,b],NormalDistribution[c,d]}];

sf=SurvivalFunction[𝒟,x]

Plot[sf/.{a-> 0,b->1,c->6,d-> 3/2},{x,-2,10},Filling-> Axis]

Quadratic transformation of a discrete distribution:

𝒟=TransformedDistribution[x^2,x\[Distributed]PoissonDistribution[2]];

SurvivalFunction[𝒟,y]

DiscretePlot[%,{y,0,50},PlotRange->{0,0.7}]

Censored distribution:

𝒟=CauchyDistribution[0,1];
𝒞=CensoredDistribution[{-2,4},𝒟];

SurvivalFunction[𝒞,x]

Compare survival function of the censored distribution with the original:

Plot[{SurvivalFunction[𝒟,x],%},{x,-3,6},Filling->Axis,PlotLegends->{"𝒟","𝒞"}]

Truncated distribution:

𝒟=TriangularDistribution[{1,4}];
𝒯=TruncatedDistribution[{2,3},𝒟];

SurvivalFunction[𝒯,x]

Compare survival function of the truncated distribution with the original:

Plot[{SurvivalFunction[𝒟,x],%},{x,1,4},Filling->Axis,Exclusions->None,PlotLegends->{"𝒟","𝒯"}]

Parameter mixture distribution:

𝒟=ParameterMixtureDistribution[GeometricDistribution[r],r\[Distributed]UniformDistribution[{1/2,2/3}]];

SurvivalFunction[𝒟,x]

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

Copula distribution:

𝒟=CopulaDistribution[{"AMH",1/3},{UniformDistribution[{2,4}],UniformDistribution[{3,7}]}];

sf=SurvivalFunction[𝒟,{x,y}]//Simplify

Plot3D[sf,{x,0,5},{y,0,10}]

Formula distributions defined by its PDF:

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

SurvivalFunction[𝒟,x]

Defined by its CDF:

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

SurvivalFunction[𝒟,x]

Defined 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,-Infinity,Infinity}];

SurvivalFunction[𝒟,x]

Marginal distribution:

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

SurvivalFunction[𝒟,y]

The survival function for (RefLink[QuantityDistribution, paclet:ref/QuantityDistribution]) assumes the argument is a (RefLink[Quantity, paclet:ref/Quantity]) with compatible units:

𝒟=NormalDistribution[Quantity[4,"Meters"],Quantity[1/2,"Meters"]]

SurvivalFunction[𝒟,x]

This allows for direct quantity substitution:

%/.x->Quantity[387.,"Centimeters"]

Compare with the direct use of the quantity argument:

SurvivalFunction[𝒟,Quantity[387.,"Centimeters"]]

OpenersExampleSubsection3(Spacer1)Random Processes  (3)

Find the survival function for a (RefLink[SliceDistribution, paclet:ref/SliceDistribution]) of a discrete-state random process:

SurvivalFunction[PoissonProcess[μ][2],x]

DiscretePlot[Evaluate[%/.μ->2],{x,-5,10},ExtentSize->0.5]

A continuous-state random process:

SurvivalFunction[WienerProcess[][2],x]

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

Find the multiple time-slice survival function for a discrete-state process:

SurvivalFunction[PoissonProcess[μ][{2,3}],{x,y}]

DiscretePlot3D[Evaluate[%/.μ->2],{x,-5,6},{y,-5,6},ExtentSize->0.5]

A multi-slice for a continuous-state process:

Plot3D[SurvivalFunction[WienerProcess[][{2,3}],{x,y}],{x,-5,3},{y,-5,3}]

Survival function for the (RefLink[StationaryDistribution, paclet:ref/StationaryDistribution]) of a discrete-state random process:

SurvivalFunction[StationaryDistribution[QueueingProcess[λ,μ,2]],x]//FullSimplify

DiscretePlot[Evaluate[%/.{μ->6,λ->5.9}],{x,-3,8},ExtentSize->0.5]

OpenersExampleSection2(Spacer1)Generalizations & Extensions  (1)

(RefLink[SurvivalFunction, paclet:ref/SurvivalFunction]) threads element-wise over lists:

SurvivalFunction[NormalDistribution[],{0.2,0.3}]

{SurvivalFunction[NormalDistribution[],0.2],SurvivalFunction[NormalDistribution[],0.3]}

Multivariate distributions:

SurvivalFunction[BinormalDistribution[1/2],{{0.0,0.0},{0.2,0.2},{0.3,0.3}}]

OpenersExampleSection3(Spacer1)Applications  (2)

Compute the probability of t>3 for a t distribution with 20 degrees of freedom:

SurvivalFunction[StudentTDistribution[20],3.]

NProbability[t>3,t\[Distributed]StudentTDistribution[20]]

Compute the probability of t<3.5 for the same distribution:

1-SurvivalFunction[StudentTDistribution[20],3.5]

NProbability[t<3.5,t\[Distributed]StudentTDistribution[20]]

Probability of getting at least one six in 6 throws of a regular six-sided die:

pA=SurvivalFunction[BinomialDistribution[6,1/6],0]

Probability of getting at least two sixes in 12 throws:

pB=SurvivalFunction[BinomialDistribution[12,1/6],1]

Probability of getting at least three sixes in 18 throws:

pC=SurvivalFunction[BinomialDistribution[18,1/6],2]

Getting at least one six in 6 throws is the most favorable bet:

pA==Max[pA,pB,pC]

DiscretePlot[SurvivalFunction[BinomialDistribution[6 n,1/6],n-1],{n,1,12},AxesOrigin->{0,1/2}]

OpenersExampleSection4(Spacer1)Properties & Relations  (6)

The probability of x>a for a continuous univariate distribution is given by (RefLink[SurvivalFunction, paclet:ref/SurvivalFunction]):

Probability[x>a,x\[Distributed]NormalDistribution[]]

SurvivalFunction[NormalDistribution[],a]

The survival function has value 1 at -∞ and is 0 at ∞:

SurvivalFunction[NormalDistribution[],-Infinity]

SurvivalFunction[NormalDistribution[],Infinity]

The sum of the survival function and the CDF is 1:

SurvivalFunction[UniformDistribution[],x]

CDF[UniformDistribution[],x]

%+%%//Simplify

(RefLink[SurvivalFunction, paclet:ref/SurvivalFunction]) and (RefLink[InverseSurvivalFunction, paclet:ref/InverseSurvivalFunction]) are inverses for continuous distributions:

dist=ExponentialDistribution[λ];

Assuming[x>0&&λ>0,Simplify[InverseSurvivalFunction[dist,SurvivalFunction[dist,x]]==x]]

Assuming[1>q>0&&λ>0,Simplify[SurvivalFunction[dist,InverseSurvivalFunction[dist,q]]==q]]

Compositions of (RefLink[SurvivalFunction, paclet:ref/SurvivalFunction]) and (RefLink[InverseSurvivalFunction, paclet:ref/InverseSurvivalFunction]) give step functions for a discrete distribution:

dist=PoissonDistribution[2];

Plot[SurvivalFunction[dist,InverseSurvivalFunction[dist,q]],{q,0,1}]

Plot[InverseSurvivalFunction[dist,SurvivalFunction[dist,y]],{y,0,20}]

Calculate the (RefLink[PDF, paclet:ref/PDF]) of a continuous univariate distribution:

dist=NormalDistribution[μ,σ];

PDF[dist,x]==-D[SurvivalFunction[dist,x],x]

OpenersExampleSection5(Spacer1)Possible Issues  (2)

Symbolic closed forms do not exist for some distributions:

SurvivalFunction[StableDistribution[0,1.8,-0.5,1,2],x]

Numerical evaluation works:

SurvivalFunction[StableDistribution[0,1.8,-0.5,1,2],0.3]

Substitution of invalid values into symbolic outputs gives results that are not meaningful:

SurvivalFunction[CauchyDistribution[2,3],y]/.{y->1.+I}

Passing it as an argument, it stays unevaluated:

SurvivalFunction[CauchyDistribution[2,3],1.+I]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[CDF, paclet:ref/CDF])  ▪  (RefLink[InverseSurvivalFunction, paclet:ref/InverseSurvivalFunction])  ▪  (RefLink[HazardFunction, paclet:ref/HazardFunction])  ▪  (RefLink[RarerProbability, paclet:ref/RarerProbability])  ▪  (RefLink[PDF, paclet:ref/PDF])  ▪  (RefLink[Quantile, paclet:ref/Quantile])  ▪  (RefLink[Probability, paclet:ref/Probability])  ▪  (RefLink[NProbability, paclet:ref/NProbability])  ▪  (RefLink[Integrate, paclet:ref/Integrate])  ▪  (RefLink[Sum, paclet:ref/Sum])  ▪  (RefLink[Histogram, paclet:ref/Histogram])  ▪  (RefLink[Histogram3D, paclet:ref/Histogram3D])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Reliability, paclet:guide/Reliability])}, {▪(RefLinkPlain[Statistical Distribution Functions, paclet:guide/StatisticalDistributionFunctions])}, {▪(RefLinkPlain[Random Variables, paclet:guide/RandomVariables])}, {▪(RefLinkPlain[System Model Analytics & Design, paclet:guide/SystemModelAnalyticsDesign])}})}})