CensoredDistribution[{xmin,xmax},dist]
dist からの,xminから xmaxまでになるように打ち切られた値の分布を表す.
CensoredDistribution[{{xmin,xmax},{ymin,ymax},…},dist]
多変量分布 dist からの,xminから xmaxまで,yminから ymaxまでになるように打ち切られた値の分布を表す.
CensoredDistribution
CensoredDistribution[{xmin,xmax},dist]
dist からの,xminから xmaxまでになるように打ち切られた値の分布を表す.
CensoredDistribution[{{xmin,xmax},{ymin,ymax},…},dist]
多変量分布 dist からの,xminから xmaxまで,yminから ymaxまでになるように打ち切られた値の分布を表す.
詳細
- CensoredDistribution[{xmin,xmax},dist]はTransformedDistribution[f,xdist]に等しい.ただし,f はPiecewise[{{xmin,x<=xmin},{x,xmin<x<xmax},{xmax,x>=xmax}}]で与えられる.
- {xmin,xmax}によく使われるケース
-
{-∞,xmax} 上から打切り,右打切り {xmin,∞} 下から打切り,左打切り {xmin,xmax} 両側打切り,区間打切り {-∞,∞},None 打切りなし - CensoredDistributionは,Mean,CDF,RandomVariate等の関数とともに使うことができる.
予備知識
- CensoredDistribution[{xmin,xmax},dist]は,区間
におけるすべての
についての一様分布 dist から取られたことが分かっており,
について
(
については
)と常に等しいと仮定されるデータをモデル化する統計分布を表す.打切りなし,左打切り,右打切り,両側打切りという用語は,{xmin,xmax}がそれぞれ {-∞,∞},{xmin,∞},{-∞,xmax},{xmin,xmax}の形である一変量の打切り分布を説明するために使われるのに対し,一変量分布 dist は,TransformedDistribution,CensoredDistribution,TruncatedDistributionを使った既知の分布の変換,打切りあるいは切断によって定義できる連続分布(例:NormalDistribution,GammaDistribution,BetaDistribution)あるいは離散分布(例:PoissonDistribution,BinomialDistribution,BernoulliDistribution)を示す. - 多変量打切り分布CensoredDistribution[{{
,
},{
,
},… ,{
,
}},dist]は一変量分布と同じように定義された,多変量分布 dist から取られ,区間
内に収まるように第
成分
が打ち切られたベクトル
の分布を表す.一変量の場合と同じように,多変量分布 dist にも連続分布(例:MultinormalDistribution)と離散分布(例:MultivariateHypergeometricDistribution)があり,(それぞれCopulaDistributionおよびProductDistributionを使って)既知の分布のコピュラ分布あるいは積分布として定義できることがある. - 打切り分布は,値が部分的にしか分からないデータ(つまり,部分的に観測されたデータあるい確度に制約条件が課されているデータ)のモデル化で使われる.打切り値を含むデータ集合の分析は18世紀におけるDaniel Bernoulliの天然痘の研究まで遡ることができる.このようなデータは,医学,生理学等や,失敗予測が実際の失敗を観測することなしに行われる信頼性や製造業の分野で比較的よく見られる.打切り分布は生存分析でもよく使われるツールで,そのようなデータ集合の分析用に特化された統計ツール(例:打切り回帰)が存在する.
- 定義により,CensoredDistribution[{xmin,xmax},dist]はTransformedDistribution[f,xdist]に等しい.ただし,f はPiecewise[{{xmin,x<=xmin},{x,xmin<x<xmax},{xmax,x>=xmax}}]によって与えられる.CensoredDistributionはしばしばTruncatedDistributionと混同されることがあるが,打切り分布が打切り区間の終りに確率を置くのに対し切断分布はその区間全体に確率を分布させる点で,両者は根本的に異なる.
例題
すべて開く すべて閉じる例 (2)
𝒟 = CensoredDistribution[{5, ∞}, 𝒹 = BinomialDistribution[10, .6]];DiscretePlot[{PDF[𝒹, x], PDF[𝒟, x]}//Evaluate, {x, 0, 12}, ExtentSize -> 1 / 2, PlotLegends -> {"𝒹", "𝒟"}]𝒟 = CensoredDistribution[{-∞, 2}, 𝒩 = NormalDistribution[1, 2]];Plot[CDF[First[#], x]//Evaluate, {x, -4, 7}, Exclusions -> None, Filling -> Axis, PlotLabel -> Last[#]]& /@ {{𝒟, "𝒟"}, {𝒩, "𝒩"}}スコープ (26)
基本的な用法 (9)
LeftCensored𝒟 = CensoredDistribution[{5, ∞}, PoissonDistribution[7]];
RightCensored𝒟 = CensoredDistribution[{-∞, 9}, PoissonDistribution[7]];
DoubleCensored𝒟 = CensoredDistribution[{5, 9}, PoissonDistribution[7]];Table[DiscretePlot[{PDF[m, x], PDF[PoissonDistribution[7], x]}//Evaluate, {x, 0, 13}, ExtentSize -> 0.5], {m, {LeftCensored𝒟, RightCensored𝒟, DoubleCensored𝒟}}]LeftCensored𝒟 = CensoredDistribution[{-1, ∞}, NormalDistribution[]];
RightCensored𝒟 = CensoredDistribution[{-∞, 1}, NormalDistribution[]];
DoubleCensored𝒟 = CensoredDistribution[{-1, 1}, NormalDistribution[]];Table[Plot[{CDF[m, x], CDF[NormalDistribution[], x]}, {x, -3, 3}, Filling -> Axis, Exclusions -> None], {m, {LeftCensored𝒟, RightCensored𝒟, DoubleCensored𝒟}}]𝒟 = CensoredDistribution[{0, 9}, 𝒹 = BinomialDistribution[12, .7]];DiscretePlot[{PDF[𝒹, x], PDF[𝒟, x]}, {x, 3, 13}, ExtentSize -> 1 / 2, PlotLegends -> {"𝒹", "𝒟"}]PDF[𝒟, 9]Probability[x ≥ 9, x𝒹]𝒟 = CensoredDistribution[{-1, ∞}, NormalDistribution[]];CDF[𝒟, x]ヒストグラムを使ってもとの密度関数をプロットし,点確率を可視化する:
Show[Histogram[RandomVariate[𝒟, 10 ^ 3], {-3, 3, .2}, "PDF"], Plot[PDF[NormalDistribution[], x], {x, -3, 3}, PlotStyle -> Thick]]𝒟1 = CensoredDistribution[{2, 2}, BinomialDistribution[3, .4]];PDF[𝒟1, x]𝒟2 = CensoredDistribution[{2, 2}, ParetoDistribution[1, 1 / 3]];CDF[𝒟2, x]𝒟 = CensoredDistribution[{{1 / 3, 1 / 2}, {2 / 5, 4 / 5}}, DirichletDistribution[{1, 3, 2}]];NExpectation[x ^ 2 + y, {x, y}𝒟]𝒟 = CensoredDistribution[{{2, 10}, {4, 12}, {3, 19}}, MultinomialDistribution[20, {1 / 3, 1 / 2, 1 / 6}]];Mean[𝒟]//N分布から無作為にサンプルを抽出することで得た結果と比較する:
data = RandomVariate[𝒟, 10 ^ 4];Mean[data]//N𝒟 = CensoredDistribution[{1.2, 2}, 𝒹 = TriangularDistribution[{0, 4}]];Plot[{CDF[𝒹, x], CDF[𝒟, x]}//Evaluate, {x, 0, 5 / 2}, PlotStyle -> {Automatic, Thick}, Filling -> {2 -> Axis}, Exclusions -> None, PlotLegends -> {"𝒹", "𝒟"}]{Mean[𝒟], Variance[𝒟]}Momentは記号次数で閉形式を持つ:
Moment[𝒟, r]data = RandomVariate[CensoredDistribution[{2, 7}, PoissonDistribution[5]], 10 ^ 2];edist = EstimatedDistribution[data, CensoredDistribution[{a, b}, PoissonDistribution[5]]]パラメトリック分布 (5)
𝒟 = CensoredDistribution[{0, 1 / 2}, BetaDistribution[2, 3]];CDF[𝒟, x]ランダムなサンプルのヒストグラムをプロットする.峰はPDFのDiracDelta部分に対応する:
Show[Histogram[RandomVariate[𝒟, 10 ^ 3], Automatic, "PDF"], Plot[PDF[𝒟, x]//Evaluate, {x, 0, 1}, PlotStyle -> Thick, Exclusions -> None]]打切りGeometricDistributionを定義する:
𝒟 = CensoredDistribution[{2, 5}, 𝒹 = GeometricDistribution[.2]];DiscretePlot[{PDF[𝒹, x], PDF[𝒟, x]}//Evaluate, {x, 0, 10}, ExtentSize -> 1 / 2, PlotLegends -> {"𝒹", "𝒟"}]PDF[𝒟, x]{Probability[x ≤ 2, x𝒹], PDF[𝒟, 2]}{Probability[x ≥ 5, x𝒹], PDF[𝒟, 5]}両側打切りGammaDistributionを定義する:
𝒟 = CensoredDistribution[{2, 4}, GammaDistribution[2, 1]];CharacteristicFunction[𝒟, t]//FullSimplifyMomentGeneratingFunction[𝒟, t]//FullSimplifyCumulantGeneratingFunction[𝒟, t]//FullSimplifyFactorialMomentGeneratingFunction[𝒟, t]//FullSimplify右側打切りPoissonDistributionを定義する:
𝒟 = CensoredDistribution[{-∞, 7}, 𝒫 = PoissonDistribution[5]];HazardFunctionを比較する:
DiscretePlot[{HazardFunction[𝒫, x], HazardFunction[𝒟, x]}, {x, 0, 9}, PlotRange -> All, ExtentSize -> 1 / 2]二次元打切りDirichletDistributionを定義する:
𝒟 = CensoredDistribution[{{1 / 3, 1 / 2}, {1 / 3, 3 / 5}}, 𝒹 = DirichletDistribution[{3, 2, 4}]];Plot3D[CDF[#, {x, y}]//Evaluate, {x, -1 / 10, 3 / 4}, {y, -1 / 10, 4 / 5}, PlotRange -> All, AxesLabel -> Automatic, Exclusions -> None]& /@ {𝒹, 𝒟}Mean[𝒟]Variance[𝒟]NProbability[2 / 5 < x < 23 / 50 && y > 2 / 5, {x, y}𝒟]NExpectation[x ^ 3 + y ^ 3, {x, y}𝒟]ノンパラメトリック分布 (3)
打切りEmpiricalDistributionを定義する:
ed = EmpiricalDistribution[RandomVariate[WeibullDistribution[2, 3], 15]];
𝒟 = CensoredDistribution[{0, 2}, ed];Plot[{CDF[ed, x], CDF[𝒟, x]}, {x, 0, 6}, Filling -> Axis, PlotStyle -> {Automatic, Thick}, Exclusions -> None, PlotLegends -> {"ed", "𝒟"}]打切りHistogramDistributionを定義する:
hd = HistogramDistribution[RandomVariate[PoissonDistribution[6], 10 ^ 3]];
𝒟 = CensoredDistribution[{0, 6}, hd];Plot[{CDF[hd, x], CDF[𝒟, x]}, {x, 0, 12}, Filling -> Axis, Exclusions -> None, PlotStyle -> {Automatic, Thick}, PlotLegends -> {"hd", "𝒟"}]打切りSmoothKernelDistributionを定義する:
skd = SmoothKernelDistribution[RandomVariate[LaplaceDistribution[0, 2], 10 ^ 3]];
𝒟 = CensoredDistribution[{-1, 1}, skd];Plot[{CDF[skd, x], CDF[𝒟, x]}, {x, -3, 3}, Filling -> Axis, PlotStyle -> {Automatic, Thick}, Exclusions -> None, PlotLegends -> {"skd", "𝒟"}]派生分布 (9)
打切りParameterMixtureDistributionを定義する:
ℳ = ParameterMixtureDistribution[GammaDistribution[1 / 2, β], βUniformDistribution[{1, 2}]];
𝒟 = CensoredDistribution[{0, 1}, ℳ];CDF[𝒟, x]Plot[CDF[First[#], x]//Evaluate, {x, 0, 2}, Filling -> Axis, Exclusions -> None, PlotLabel -> Last[#]]& /@ {{ℳ, "ℳ"}, {𝒟, "𝒟"}}打切りMixtureDistributionを定義する:
ℳ = MixtureDistribution[{1, 2}, {NormalDistribution[-1, 3], NormalDistribution[1, 2]}];
𝒟 = CensoredDistribution[{-2, 2}, ℳ];CDF[𝒟, x]Plot[Evaluate[CDF[First[#], x]], {x, -3, 3}, Filling -> Axis, Exclusions -> None, PlotLabel -> Last[#]]& /@ {{ℳ, "ℳ"}, {𝒟, "𝒟"}}打切りOrderDistributionを定義する:
𝒫 = OrderDistribution[{BinomialDistribution[10, 0.6], 4}, 1];
𝒟 = CensoredDistribution[{4, ∞}, 𝒫];DiscretePlot[{PDF[𝒫, x], PDF[𝒟, x]}, {x, 0, 10}, ExtentSize -> 1 / 2, PlotLegends -> {"𝒫", "𝒟"}]{Mean[𝒟], Mean[𝒫]}打切りCensoredDistributionを定義する:
𝒞 = CensoredDistribution[{-∞, 9}, 𝒫 = PoissonDistribution[7]];
𝒟 = CensoredDistribution[{6, ∞}, 𝒞];DiscretePlot[Evaluate[PDF[First[#], x]], {x, 0, 15}, ExtentSize -> 1 / 2, PlotLabel -> Last[#]]& /@ {{𝒫, "𝒫"}, {𝒞, "𝒞"}, {𝒟, "𝒟"}}PDF[𝒟, x]PDF[CensoredDistribution[{6, 9}, PoissonDistribution[7]], x]% - %%打切りTruncatedDistributionを定義する:
𝒯 = TruncatedDistribution[{-∞, 1}, 𝒩 = NormalDistribution[0, 2]];
𝒟 = CensoredDistribution[{-1, ∞}, 𝒯];Plot[Evaluate[CDF[First[#], x]], {x, -3, 3}, Filling -> Axis, Exclusions -> None, PlotLabel -> Last[#]]& /@ {{𝒩, "𝒩"}, {𝒯, "𝒯"}, {𝒟, "𝒟"}}打切りTransformedDistributionを定義する:
𝒯 = TransformedDistribution[u + 1, uBenfordDistribution[10]];
𝒟 = CensoredDistribution[{3, 6}, 𝒯];CDF[𝒟, x]打切りMarginalDistributionを定義する:
ℳ = MarginalDistribution[NegativeMultinomialDistribution[3, {1 / 3, 1 / 3, 1 / 6}], 1];
𝒟 = CensoredDistribution[{3, 10}, ℳ];pdf = PDF[𝒟, x]DiscretePlot[{PDF[ℳ, x], pdf}, {x, 0, 15}, ExtentSize -> 1 / 2, PlotLegends -> {"ℳ", "𝒟"}]打切りProductDistributionを定義する:
𝒫 = ProductDistribution[PoissonDistribution[8], PoissonDistribution[9]];
𝒟 = CensoredDistribution[{{-∞, 12}, {5, ∞}}, 𝒫];Histogram3D[RandomVariate[𝒟, 10 ^ 4], 20, "PDF"]QuantityDistributionの打切り分布を評価するとQuantityDistributionになる:
𝒟 = CensoredDistribution[{-∞, Quantity[75, "Miles"/"Hours"]}, QuantityDistribution[NormalDistribution[70, 8], "mph"]]Mean[𝒟]//Nアプリケーション (4)
保険会社が保有レベル
で再保険を買う.保険金請求が対数正規分布に従うと仮定して,保険会社の支払い確率変量を求める:
Refine[Moment[CensoredDistribution[{0, M}, LogNormalDistribution[μ, σ]], n], M > 0 && σ > 0]Refine[Moment[CensoredDistribution[{M, Infinity}, LogNormalDistribution[μ, σ]], n], M > 0 && σ > 0]ある部品の寿命がRayleighDistributionに従う.この部品は故障するかどうかを見るために
時間テストされる.テスト後でも故障していなければ,この部品の寿命は厳密に
時間であると想定される.テストされた部品の寿命が
より長くなる確率が最高で5%になるようなテスト時間を求める:
component𝒟 = RayleighDistribution[Quantity[3, "Hours"]]Solve[CDF[component𝒟, n] == 95 / 100, n]N[%]test𝒟 = CensoredDistribution[{Quantity[0, "Hours"], Quantity[7.35, "Hours"]}, component𝒟];Plot[{CDF[component𝒟, Quantity[x, "Hours"]], CDF[test𝒟, Quantity[x, "Hours"]]}, {x, 0, 10}, Filling -> 1 -> {2}, Epilog -> {Dashed, Line[{{7.35, 0}, {7.35, 1}}]}, PlotLegends -> {"component𝒟", "test𝒟"}, AxesLabel -> {"h"}]Mean /@ {component𝒟, test𝒟}//Nパー4のホールでのゴルフ初心者の打数は平均9打でPoissonDistributionに従う.あるゴルフコースでこのゴルファーが10打でホールアウトしたとしてパー4のホールの打数の平均を求める:
𝒟 = TransformedDistribution[u + 1, uCensoredDistribution[{0, 9}, PoissonDistribution[8]]];DiscretePlot[Evaluate[PDF[𝒟, x]], {x, 0, 11}, ExtentSize -> 1 / 2]PDF[𝒟, x]Mean[𝒟]//NNProbability[x > 4, x𝒟]アメリカ合衆国の成人男性の体重は平均191ポンド,標準偏差70ポンドで正規分布に従う.体重計の上限が300ポンドだと仮定して,一般的な体重計で計った場合の体重分布を求める:
𝒟 = CensoredDistribution[{Quantity[0, "Pounds"], Quantity[300, "Pounds"]}, 𝒹 = NormalDistribution[Quantity[191, "Pounds"], Quantity[70, "Pounds"]]];Plot[Evaluate[CDF[𝒟, Quantity[x, "Pounds"]]], {x, 0, 350}, Filling -> Axis, Exclusions -> None, AxesLabel -> {"lbs"}]Histogram[RandomVariate[𝒟, 10 ^ 5], Automatic, "PDF", AxesLabel -> Automatic]Mean[𝒟]//NNProbability[x ≥ Quantity[200, "Pounds"], x𝒟]Probability[x ≥ Quantity[300, "Pounds"], x𝒟]//NProbability[x ≥ Quantity[300, "Pounds"], x𝒹]//N特性と関係 (4)
CensoredDistributionはTransformedDistributionの特殊ケースである:
𝒟1 = CensoredDistribution[{2, 3}, NormalDistribution[]];
𝒟2 = TransformedDistribution[Piecewise[{{2, u ≤ 2}, {u, 2 ≤ u ≤ 3}, {3, u > 3}}], uNormalDistribution[]];CDF[𝒟1, x]CDF[𝒟2, x]% - %%//FullSimplify𝒞 = CensoredDistribution[{4, 9}, 𝒫 = PoissonDistribution[7]];
𝒯 = TruncatedDistribution[{4, 9}, 𝒫];DiscretePlot[{PDF[𝒫, x], PDF[𝒞, x]}, {x, 0, 12}, ExtentSize -> 1 / 2, PlotLegends -> {"𝒫", "𝒞"}]DiscretePlot[{PDF[𝒫, x], PDF[𝒯, x]}, {x, 0, 12}, ExtentSize -> 1 / 2, PlotLegends -> {"𝒫", "𝒯"}]𝒞 = CensoredDistribution[{1 / 2, ∞}, 𝒩 = NormalDistribution[0, 1 / 2]];
𝒯 = TruncatedDistribution[{1 / 2, ∞}, 𝒩];Plot[{CDF[𝒩, x], CDF[𝒞, x]}, {x, -2, 3}, Filling -> Axis, PlotLegends -> {"𝒩", "𝒞"}]Plot[{CDF[𝒩, x], CDF[𝒯, x]}, {x, -2, 3}, Filling -> Axis, PlotLegends -> {"𝒩", "𝒯"}]連続分布を打ち切ると,連続的でも離散的でもない混合分布になることがある:
cont𝒟 = LogisticDistribution[];
cens𝒟 = CensoredDistribution[{-1, 1}, cont𝒟]混合タイプの打切り分布のCDFは打切り点で不連続である:
cdf = CDF[cens𝒟, x]ticks = {{-1, -0.5, 0, 0.5, 1}, {0, {CDF[cont𝒟, -1], HoldForm[F[-1 + ϵ]]}, 0.5, {CDF[cont𝒟, 1], HoldForm[F[1 - ϵ]]}, 1}};
Plot[{cdf, Style[CDF[cont𝒟, x], DotDashed]}, {x, -1.75, 1.75}, Ticks -> ticks, ExclusionsStyle -> {Directive[Dotted, Red], PointSize[Medium]}, PlotLegends -> {"censored 𝒟", "underlying continuous 𝒟"}]打切り分布の確率密度関数は定義されず,PDFは未評価で返される:
PDF[cens𝒟, x]累積分布関数を微分すると結果として積分しても1にならない関数になる:
D[cdf, x]NIntegrate[D[cdf, x], {x, -∞, ∞}]確率密度推定器のサンプルは,サンプルサイズが大きくなるにつれて収束しなくなる:
Table[Labeled[Histogram[RandomVariate[cens𝒟, 10 ^ k], "Scott", "PDF", ImageSize -> Small], Row[{Text@"Sample size", ":", HoldForm[10] ^ k//TraditionalForm}]], {k, {3, 6}}]これを,推定器が収束するもとになっている連続分布のヒストグラムと比較する:
Table[Labeled[Histogram[RandomVariate[cont𝒟, 10 ^ k], "Scott", "PDF", ImageSize -> Small], Row[{Text@"Sample size", ":", HoldForm[10] ^ k//TraditionalForm}]], {k, {3, 6}}]考えられる問題 (1)
連続分布を打ち切ると連続的でも離散的でもない混合分布になる可能性がある:
cont𝒟 = NormalDistribution[];
cens𝒟 = CensoredDistribution[{-1, 1}, cont𝒟]PDF[cens𝒟, x]混合型分布の計算は完全にサポートされている.特殊なモーメントを計算する:
{Mean[cens𝒟], Variance[cens𝒟], Skewness[cens𝒟], Kurtosis[cens𝒟]}sample = RandomVariate[cens𝒟, 10 ^ 4];EstimatedDistribution[sample, CensoredDistribution[{min, max}, NormalDistribution[μ, σ]]]混合型分布は連続分布と離散分布の混合と解釈することができる:
ProbabilityDistribution[{CDF, CDF[cens𝒟, x]}, {x, -Infinity, Infinity}]//FullSimplifyテキスト
Wolfram Research (2010), CensoredDistribution, Wolfram言語関数, https://reference.wolfram.com/language/ref/CensoredDistribution.html (2016年に更新).
CMS
Wolfram Language. 2010. "CensoredDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/CensoredDistribution.html.
APA
Wolfram Language. (2010). CensoredDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CensoredDistribution.html
BibTeX
@misc{reference.wolfram_2026_censoreddistribution, author="Wolfram Research", title="{CensoredDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/CensoredDistribution.html}", note=[Accessed: 19-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_censoreddistribution, organization={Wolfram Research}, title={CensoredDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/CensoredDistribution.html}, note=[Accessed: 19-August-2026]}