Splice the Body of a Distribution with New Tails
Splice the Body of a Distribution with New Tails
dist1 = LaplaceDistribution[0, 3];
dist2 = NormalDistribution[0, 2];
𝒟 = SplicedDistribution[{1, 1, 1}, {-∞, -1, 1, ∞}, {dist1, dist2, dist1}];plots = GraphicsGrid[Partition[Table[Plot[fun[𝒟, x], {x, -5, 5}, Filling -> Axis, Exclusions -> None, PlotLabel -> fun, ImageSize -> 250, Ticks -> {Automatic, None}], {fun, {PDF, CDF, HazardFunction, SurvivalFunction}}], 2, 2]]dist1 = LaplaceDistribution[0, 3];
dist2 = NormalDistribution[0, 2];
𝒟 = SplicedDistribution[{1, 1, 1}, {-∞, -1, 1, ∞}, {dist1, dist2, dist1}];plot = Plot[PDF[𝒟, x], {x, -5, 5}, Filling -> Axis, Exclusions -> None, FillingStyle -> Lighter[Blue, .6], ImageSize -> 400, Ticks -> {Automatic, None}, FrameTicks -> False, PlotStyle -> {Thick, Darker[Blue, .3]}]