[0,1] 上均匀分布的平均方差 MATLAB
Matlab 中获取 [0,1]
上均匀分布的均值和方差的最佳方法是什么?
What is the best way in Matlab to get the mean and variance of a uniform distribution over [0,1]
?.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
经验分布的均值和方差的计算方式与任何分布相同:
此方法提供对从中抽取样本的分布的均值和方差的估计。请注意,如果 N 较大,
distributionMean
将接近 0.5,distributionVariance
将接近 1/12。如果这是您真正感兴趣的值,有用的 Matlab 命令是Mean and variance of an empirical distribution are calculated the same way for any distribution:
This approach provides an estimate for the mean and variance of the distribution from which your sample was drawn. Note that with larger N,
distributionMean
will approach 0.5, anddistributionVariance
will approach 1/12. If that's the values you're really interested in, the useful Matlab command isUniform (0,1) 甚至 Uniform(a,b) 随机变量的均值和方差是已知公式。
对于
X~Uniform(a,b)
,设置
a = 0
和b = 1
以获得所需结果。点击此处了解更多信息。
The mean and variance of a Uniform (0,1) or even a Uniform(a,b) random variable are known formulas.
For
X~Uniform(a,b)
,Set
a = 0
andb = 1
for the desired result.Read more here.