cmsbounds

版本 1.0.0.0 (3.1 KB) 作者: Ben Petschel
Determine bounds on a distribution given the first few moments
756.0 次下载
更新时间 2009/8/24

查看许可证

usage: [x,y]=cmsbounds(m)

Given a sequence M of the first 2*n raw moments of a distribution, CMSBOUNDS calculates arrays X and Y of length n and n+1 respectively such that Y(i) <= F(X(i)) <= Y(i+1) for any distribution F with the given moments M (Chebyshev-Markov-Stieltjes inequalities).

The raw moments are M(k) = E[X^k] = Integral of x^k dF(x).

Example: Normal distribution

mu=0;
sig=1;
n=20;
M(1)=mu;
M(2)=sig^2+mu^2;
for k=3:2*n
M(k)=mu*M(k-1)+(k-1)*sig^2*M(k-2);
end;
[x,y] = cmsbounds(M) % returns 1x20 and 1x21 arrays
all(normcdf(x,mu,sig)<=y(2:end)) % true
all(normcdf(x,mu,sig)>=y(1:end-1)) % true

See the help file for further details of the theory and algorithm.

引用格式

Ben Petschel (2024). cmsbounds (https://www.mathworks.com/matlabcentral/fileexchange/25115-cmsbounds), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2009a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0