如何使用 SciPy 运行统计累积分布函数和概率密度函数? [英] How to run statistics Cumulative Distribution Function and Probability Density Function using SciPy?

查看:124
本文介绍了如何使用 SciPy 运行统计累积分布函数和概率密度函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Python 新手,也是 SciPy 库的新手.在深入 SciPy 世界之前,我想从列表中的专家那里得到一些问题.

I am new to Python and new to SciPy libraries. I wanted to take some ques from the experts here on the list before dive into SciPy world.

我想知道是否有人可以提供有关如何运行两个统计函数的粗略指南:累积分布函数 (CDF) 和概率分布函数 (PDF).

I was wondering if some one could provide a rough guide about how to run two stats functions: Cumulative Distribution Function (CDF) and Probability Distribution Function (PDF).

我的用例如下:我有一个包含 1000 个浮点值的 sampleSpaceList [].当在我的程序中生成一个新的浮点值时,我想在 sampleList 上为它运行 CDF 和 PDF,并获得小于或等于 CDF 的值的概率和 PDF 的概率分布.

My use case is the following: I have a sampleSpaceList [] which have 1000 floating point values. When a new floating point value is generated in my program, I would like to run both CDF and PDF on the sampleList for it and get the probability of value less or equal for CDF and probability distribution for PDF.

基本上,在我的程序中,有些事件可以成功也可以失败.如果他们成功,那么我计算该事件的事件比率并添加到我的 sampleSpaceList 直到它达到 1000 的阈值.一旦达到阈值,那么对于任何下一个事件比率;我想知道该事件比率在我的系统中是否会成功的概率.

Basically, in my program there are events which can either succeed or fail. If they succeed, then I calculate a event-ratio for that event and add to my sampleSpaceList until it reaches a threshold of 1000. Once the threshold is achieved, then for any next event-ratio; I would like to get a probability that whether that event-ratio would succeed or not in my system.

我基本上想得到的是特定事件比率的成功概率.

What I basically would like to get is the probability of success for a particular event ratio.

我不太确定 CDF 或 PDF 是否与我的问题相关,所以这就是为什么我想学习如何使用两者但在任何给定时刻,我将只使用 CDF 或 PDF 来获得概率成功的事件比率.

I am not very sure whether CDF or PDF will be relative to my problem so that 's why I wanted to learn how to use both but at any given moment, I will be only using either CDF or PDF to get a probability of event-ratio being successful.

推荐答案

参见这篇文章:SciPy 中的概率分布.

这篇关于如何使用 SciPy 运行统计累积分布函数和概率密度函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆