Weibull分布的CDF为
CDF(x) = 1 − exp[−(x / λ)^k]
CCDF和我的方法:
CCDF(x) = 1 - CDF(x)
CCDF(x) = 1 - (1 − exp[−(x / λ)^k])
CCDF(x) = exp[−(x / λ)^k]
假设以下scale / k值取自然对数ln:
k = 1,
ln(CCDF) = ln(exp[−(x / λ)^k])
ln(CCDF) = -xλ
哪一条直线的斜率为-λ。
代码:
x3 = np.linspace(1,15, 1000)
weibull_cdf = scipy.stats.weibull_min.cdf(x3, c = 1, scale = 1)
weibull_ccdf = (1 - weibull_cdf)
weibull_ccdf = np.log(weibull_ccdf)
此实现是否可靠?更改比例,使scale / k = 2会更改实现吗?