Main Content

wblplot

威布尔概率图

描述

例子

wblplot((X创建一个Weibull概率图,以比较数据的分布Xto the Weibull distribution.

wblplotplots each data point inX使用加号('+')标记并绘制两个代表理论分布的参考线。实心参考线连接数据的第一个四分位数和第三四分位数,虚线的参考线将实线扩展到数据末端。如果示例数据具有Weibull分布,则数据点沿参考线出现。除了Weibull以外的其他分布在数据图中引入了曲率。

wblplot((斧头,,,,X将Weibull概率图添加到指定的轴上斧头

H= wblplot(___returns graphics handles corresponding to the plotted lines, using any of the input arguments in the previous syntaxes.

例子

全部收缩

生成矢量r包含来自Weibull分布的50个随机数,具有比例参数1.2和形状参数1.5。

rng('default'% For reproducibilityr = wblrnd(1.2,1.5,50,1);

创建一个Weibull概率图,以视觉上确定数据是否来自Weibull分布。

wblplot((r)

该图表明数据可能来自Weibull分布。

生成两个示例数据集,一个来自Weibull分布,另一个来自对数正态分布。执行Lilliefors测试以评估每个数据集是否来自Weibull分布。通过使用Weibull概率图进行视觉比较来确认测试决策(wblplot)。

从Weibull分布生成样品。

rng('default')data1 = wblrnd(0.5,2,[500,1]);

通过使用lillietest。To test data for a Weibull distribution, test if the logarithm of the data has an extreme value distribution.

h1 = lillietest(log(data1),'分配',,,,'极值'
H1 = 0

返回的值H1 = 0一世ndicates thatlillietest未能在默认的5%显着性水平上拒绝零假设。使用Weibull概率图确认测试决策。

wblplot((data1)

该图表明数据遵循Weibull分布。

从对数正态分布中生成样品。

data2 = lognrnd(5,2,[500,1]);

执行Lilliefors测试。

h2 = lillietest(log(data2),,'分配',,,,'极值'
H2 = 1

返回的值H2 = 1一世ndicates thatlillietest在默认的5%显着性水平上拒绝零假设。使用Weibull概率图确认测试决策。

wblplot((data2)

该图表明数据不遵循Weibull分布。

输入参数

全部收缩

样本数据,,,,specified as a numeric vector or numeric matrix.wblplot显示每个值X使用符号'+'。如果X一世s a matrix, thenwblplotdisplays a separate line for each column ofX

数据类型:单身的|双倍的

目标轴,指定为Axes目的or auiaxes目的。wblplot在指定的轴上添加一个额外的图斧头。For details, see轴属性anduiaxesProperties

UseGCA要返回当前图的当前轴。

输出参数

全部收缩

Graphics handles for line objects, returned as a vector of线图形处理。Graphics handles are unique identifiers that you can use to query and modify the properties of a specific line on the plot. For each column ofX,,,,wblplotreturns three handles:

  • 这line representing the data points.wblplotrepresents each data point inX使用加号('+')标记。

  • 加入第一和第三问uartiles of each column ofX,,,,represented as a solid line.

  • 四分位线的外推到最小值和最大值X,表示为虚线。

To view and set properties of line objects, use dot notation. For information on using dot notation, see访问属性值。有关有关的信息线properties that you can set, see线属性

Algorithms

wblplotmatches the quantiles of sample data to the quantiles of a Weibull distribution. The sample data is sorted, scaled logarithmically, and plotted on the x-axis. The y-axis represents the quantiles of the Weibull distribution, converted into probability values. Therefore, the y-axis scaling is not linear.

x轴值是一世th sorted value from a sample of sizen,Y轴值是数据的经验累积分布函数的评估点之间的中点。中点等于 (( 一世 - 0.5 n

wblplotsuperimposes a reference line to assess the linearity of the plot. The line goes through the first and third quartiles of the data.

Alternative Functionality

您可以使用probplot函数以创建概率图。这probplotfunction enables you to indicate censored data and specify the distribution for a probability plot.

Introduced before R2006a