【问题标题】:Cumulative distribution in pythonpython中的累积分布
【发布时间】:2016-02-29 07:50:13
【问题描述】:

我需要计算两个数据集的 CDF,并使用第二个数据集的 CDF 校正第一个数据集的 CDF。我使用下面显示的代码来查找 CDF。

sorted_data = np.sort(f_o_data[:,0])
cdf_fcs=np.arange(len(sorted_data))/(float(len(sorted_data)))
plt.plot(sorted_data,cdf_fcs,'g')


sorted_data = np.sort(f_o_data[:,1])
cdf_obs=np.arange(len(sorted_data))/(float(len(sorted_data)))
plt.plot(sorted_data,cdf_obs,'r')
plt.grid()
plt.show()

现在我卡住了,我不知道如何找到 CDF 的逆。 任何人都可以帮我在 python 中找到 CDF 的倒数

【问题讨论】:

  • 作为CDF,您是指累积分布函数吗?逆是指概率密度函数吗?

标签: python cdf


【解决方案1】:

我敢冒险你需要逆 CDF 进行采样

好吧,如果您构建 CDF 以使您拥有 X 数组(在 ab 范围内),并且 Y数组从0a1b,然后问题有简单的解决方案-交换X和Y,所以新X从01,新Y从ab

【讨论】:

    猜你喜欢
    • 2013-03-02
    • 1970-01-01
    • 2015-03-14
    • 1970-01-01
    • 1970-01-01
    • 2014-09-07
    • 1970-01-01
    • 1970-01-01
    • 2023-04-05
    相关资源
    最近更新 更多