# SplicedDistribution

SplicedDistribution[{w1,w2,,wn},{c0,c1,,cn},{dist1,dist2,,distn}]

represents the distribution obtained by splicing the distributions dist1, dist2, truncated on the intervals {c0,c1}, {c1,c2}, with weights w1, w2, .

# Details • SplicedDistribution is equivalent to MixtureDistribution[{w1,w2,},{TruncatedDistribution[{c0,c1},dist1],}].
• The distributions dist1, dist2, need to be all continuous univariate distributions.
• The weights wi can be any non-negative real numbers.
• The interval limits can be any real numbers such that .
• SplicedDistribution can be used with such functions as Mean, CDF, and RandomVariate, etc.

# Examples

open allclose all

## Basic Examples(2)

Define a spliced distribution with a normal body and a Pareto tail:

Probability density function:

Find the mean and variance of a spliced distribution:

Compare with the values obtained by using a random sample:

## Scope(4)

Add symmetric exponential tails to normal distribution:

Distribution functions:

Since distribution is symmetric, all odd moments are 0:

Even moments:

Create a Student distribution with a heavier right tail:

Probability density function:

Generate a set of pseudorandom numbers that follow this distribution:

Compare the histogram of the sample to the PDF:

Generate a set of pseudorandom numbers following lognormal distribution with exponential tails:

Estimate the tail parameter:

Compare the histogram of the sample with the PDF:

Splicing QuantityDistribution with compatible units yields QuantityDistribution:

Plot the probability density function:

## Applications(1)

Create a spliced distribution, with normal distribution in the center and tails of a heavy-tail distribution:

Find spliced distribution with continuous PDF by adjusting the weights:

Equate limits at both points of possible discontinuity:

Substitute the solution:

Plot PDF of the spliced distribution:

## Properties & Relations(3)

A spliced distribution is related to ProbabilityDistribution and TruncatedDistribution:

Represent as a linear combination of truncated PDFs:

A spliced distribution is related to MixtureDistribution and TruncatedDistribution:

Represent as a mixture of truncated distributions:

SplicedDistribution with one distribution simplifies to TruncatedDistribution: