如何使用SciPy运行统计累积分布函数和概率密度函数?

时间:2022-04-06 01:05:46

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.

我是Python的新手,也是SciPy库的新手。在深入了解SciPy世界之前,我想从名单上的专家那里得到一些问题。

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).

我想知道是否有人可以提供关于如何运行两个统计函数的粗略指导:累积分布函数(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个浮点值。当我的程序中生成一个新的浮点值时,我想在sampleList上运行CDF和PDF,并获得CDF的值概率小于或等于PDF的概率分布。

some more information

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.

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

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

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

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.

我不太确定CDF或PDF是否与我的问题有关,所以我想学习如何使用两者,但在任何特定时刻,我只会使用CDF或PDF来获取事件的概率 - 比例成功。

1 个解决方案

#1


See this article: Probability distributions in SciPy.

请参阅此文章:SciPy中的概率分布。

#1


See this article: Probability distributions in SciPy.

请参阅此文章:SciPy中的概率分布。