‹›概率和统计延伸更快的分布估计
版本 11 特别是性能上对分布估计进行了多种改善. 以下图表展示了对不同样本大小的多种分布估计时间. 测试在 Intel Xeon Processor E3-1245 v2 3.40 GHz Windows 10 系统上进行. 图底部数字显示了与版本 10 相比版本 11 的速度提高.
标准 t 分布.
显示完整的 Wolfram 语言输入
dist = StudentTDistribution[loc, sc, df];
ndist = StudentTDistribution[-1, 1, 2];
Table[
sample = BlockRandom[SeedRandom["MarketingExample"];
RandomVariate[ndist, n]];
Mean[Table[
First[AbsoluteTiming[EstimatedDistribution[sample, dist];]], {5}]]
, {n, {10, 100, 1000}}]
威布尔分布.
显示完整的 Wolfram 语言输入
dist = WeibullDistribution[al, be];
ndist = WeibullDistribution[3, 2];
Table[
sample = BlockRandom[SeedRandom["MarketingExample"];
RandomVariate[ndist, n]];
Mean[Table[
First[AbsoluteTiming[EstimatedDistribution[sample, dist];]], {5}]]
, {n, {10, 100, 1000}}]
混合二项式分布.
显示完整的 Wolfram 语言输入
dist = MixtureDistribution[{w1,
w2}, {BinormalDistribution[{m11, m12}, {s11, s12}, \[Rho]1],
BinormalDistribution[{m21, m22}, {s21, s22}, \[Rho]2]}];
ndist = MixtureDistribution[{0.3,
0.7}, {BinormalDistribution[{0, 1}, {0.5, 0.25}, 0.7],
BinormalDistribution[{-0.5, 0}, {0.5, 0.25}, 0.1]}];
Table[
sample = BlockRandom[SeedRandom["MarketingExample"];
RandomVariate[ndist, n]];
Mean[Table[
First[AbsoluteTiming[
TimeConstrained[EstimatedDistribution[sample, dist];,
100]]], {5}]]
, {n, {10, 100, 1000}}]
多元 t 分布.
显示完整的 Wolfram 语言输入
dist = MultivariateTDistribution[{{m11, m12}, {m21, m22}}, n];
ndist = MultivariateTDistribution[{{1, 1/3}, {1/3, 1}}, 10];
Table[
sample = BlockRandom[SeedRandom["MarketingExample"];
RandomVariate[ndist, n]];
Mean[Table[
First[AbsoluteTiming[EstimatedDistribution[sample, dist];]], {5}]]
, {n, {10, 100, 1000}}]