Main Content

std

概率分布的标准差

说明

示例

s = std(pd) 返回概率分布 pd 的标准差 s

示例

全部折叠

加载样本数据。创建包含学生考试成绩数据第一列的向量。

load examgrades
x = grades(:,1);

对数据进行正态分布对象拟合。

pd = fitdist(x,'Normal')
pd = 
  NormalDistribution

  Normal distribution
       mu = 75.0083   [73.4321, 76.5846]
    sigma =  8.7202   [7.7391, 9.98843]

计算拟合分布的标准差。

s = std(pd)
s = 8.7202

对于正态分布,标准差等于参数 sigma

创建威布尔概率分布对象。

pd = makedist('Weibull','A',5,'B',2)
pd = 
  WeibullDistribution

  Weibull distribution
    A = 5
    B = 2

计算分布的标准差。

s = std(pd)
s = 2.3163

创建一个三角分布对象。

pd = makedist('Triangular','A',-3,'B',1,'C',3)
pd = 
  TriangularDistribution

A = -3, B = 1, C = 3

计算分布的标准差。

s = std(pd)
s = 1.2472

加载样本数据。创建包含学生考试成绩数据的第一列的向量。

load examgrades;
x = grades(:,1);

通过对数据进行核分布拟合来创建一个概率分布对象。

pd = fitdist(x,'Kernel')
pd = 
  KernelDistribution

    Kernel = normal
    Bandwidth = 3.61677
    Support = unbounded

计算拟合分布的标准差。

s = std(pd)
s = 9.4069

输入参数

全部折叠

概率分布,指定为下表中的概率分布对象之一。

分布对象用于创建概率分布对象的函数或 App
BetaDistributionmakedistfitdist分布拟合器
BinomialDistributionmakedistfitdist分布拟合器
BirnbaumSaundersDistributionmakedistfitdist分布拟合器
BurrDistributionmakedistfitdist分布拟合器
ExponentialDistributionmakedistfitdist分布拟合器
ExtremeValueDistributionmakedistfitdist分布拟合器
GammaDistributionmakedistfitdist分布拟合器
GeneralizedExtremeValueDistributionmakedistfitdist分布拟合器
GeneralizedParetoDistributionmakedistfitdist分布拟合器
HalfNormalDistributionmakedistfitdist分布拟合器
InverseGaussianDistributionmakedistfitdist分布拟合器
KernelDistributionfitdist分布拟合器
LogisticDistributionmakedistfitdist分布拟合器
LoglogisticDistributionmakedistfitdist分布拟合器
LognormalDistributionmakedistfitdist分布拟合器
LoguniformDistributionmakedist
MultinomialDistributionmakedist
NakagamiDistributionmakedistfitdist分布拟合器
NegativeBinomialDistributionmakedistfitdist分布拟合器
NormalDistributionmakedistfitdist分布拟合器
PiecewiseLinearDistributionmakedist
PoissonDistributionmakedistfitdist分布拟合器
RayleighDistributionmakedistfitdist分布拟合器
RicianDistributionmakedistfitdist分布拟合器
StableDistributionmakedistfitdist分布拟合器
tLocationScaleDistributionmakedistfitdist分布拟合器
TriangularDistributionmakedist
UniformDistributionmakedist
WeibullDistributionmakedistfitdist分布拟合器

输出参数

全部折叠

概率分布的标准差,以非负标量值形式返回。

扩展功能

版本历史记录

在 R2013a 中推出