泊松分布–计算概率分布的公式

2023-05-16

Probability Distributions play an important role in our daily lives. We commonly use them when trying to summarise and gain insights from different forms of data.

概率分布在我们的日常生活中起着重要作用。 在尝试总结不同形式的数据并从中获取见解时,我们通常使用它们。

Because of this, they're quite an important topic in fields such as Mathematics, Computer Science, Statistics, and Data Science.

因此,它们是数学,计算机科学,统计和数据科学等领域的重要主题。

There are two main types of data: Numerical (for example integers and floats), and Categorical (for example strings of text).

数据有两种主要类型: 数值 (例如整数和浮点数)和分类 (例如文本字符串)。

Numerical data can also be in either of two forms:

数值数据也可以采用以下两种形式之一:

  • Discrete: this form of data can just take a limited number of values (like the number of clothes we have). We can infer probability mass functions from discrete data.

    离散的:这种形式的数据只能接受有限数量的值(例如我们拥有的衣服数量)。 我们可以从离散数据推断概率质量函数。

  • Continuous: on the other hand, continuous data is used to describe more abstract concepts such as weight/distance which can take any fractional or real value. From continuous data we can instead infer probability density functions.

    连续的:另一方面,连续的数据用于描述更抽象的概念,例如权重/距离,它可以取任何分数或实数值。 我们可以从连续数据中推断出概率密度函数。

Probability mass functions can give us the probability that a variable is equal to a certain value. On the other hand, the values of probability density functions do not represent probabilities on their own, but instead first need to be integrated (within the considered range).

概率质量函数可以为我们提供变量等于某个值的概率。 另一方面,概率密度函数的值本身并不表示概率,而是首先需要积分(在所考虑的范围内)。

什么是泊松分布? (What is a Poisson Distribution?)

Poisson Distributions are commonly used for two main purposes:

泊松分布通常用于两个主要目的:

  • Predicting how many times an event will take place within a chosen time period. This technique can be used for different risk analysis applications such as house insurance price estimation.

    预测事件在选定时间段内将发生多少次。 该技术可用于不同的风险分析应用,例如房屋保险价格估计。
  • Estimating a probability that an event might occur given how often it happened in the past (for example how likely it is that there will be a power-cut in the next two months).

    考虑到事件过去发生的频率,估计事件发生的可能性(例如,未来两个月停电的可能性有多大)。

Poisson Distributions let us be confident of the average time between the occurrence of different events. They can't, however, tell us the precise moment an event might take place (since processes usually have stochastic behaviour).

泊松分布使我们对不同事件发生之间的平均时间充满信心。 但是,他们无法告诉我们事件可能发生的确切时间(因为流程通常具有随机行为)。

线性与非线性系统 (Linear vs non-linear systems)

Natural systems can, in fact, be divided into two main categories: linear and non-linear (stochastic).

实际上,自然系统可以分为两大类: 线性非线性(随机)

In linear systems, causes always precede their effect which creates a strong time precedence effect.

在线性系统中,原因总是先于其结果,从而产生很强的时间优先效应。

But this doesn't instead hold true when talking about non-linear systems, as small changes in the system's initial conditions can lead to unpredictable outcomes.

但这在谈论非线性系统时并不能成立,因为系统初始条件的微小变化会导致不可预测的结果。

Considering how complex and chaotic our real world is, most processes are better described using non-linear systems, although linear approximations are sometimes possible.

考虑到我们现实世界的复杂性和混乱性,使用非线性系统可以更好地描述大多数过程,尽管有时可以进行线性近似。

Poisson Distributions can be modeled using the expression in the figure below, where λ is used to represent the expected number of events which can take place in the considered time-span.

可以使用下图中的表达式对泊松分布建模,其中λ用于 表示在考虑的时间跨度内可能发生的预期事件数。

The main characteristics which describe Poisson Processes are:

描述泊松过程的主要特征是:

  1. Two events can't take place simultaneously.

    两个事件不能同时发生。
  2. The average rate between event occurrence is overall constant.

    事件发生之间的平均速率总体恒定。
  3. Events are independent of each other (if one happens, this does not have any influence on the probability that another event might take place).

    事件彼此独立(如果一个事件发生,则不会对另一事件发生的可能性产生任何影响)。
  4. Events can take place any number of times (within the considered time-span).

    事件可以发生任意次(在所考虑的时间跨度内)。

泊松分布的一个例子 (An example of a Poisson Distribution)

In the figure below, you can see how varying the expected number of events (λ) which can take place in a period can change a Poisson Distribution. The image below has been simulated, making use of this Python code:

在下图中,您可以看到改变一个时期内可能发生的事件数(λ)如何改变泊松分布。 下面的图像已使用此Python代码进行了模拟:

import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as stats

# n = number of events, lambd = expected number of events 
# which can take place in a period
for lambd in range(2, 12, 2):
    n = np.arange(0, 9)
    poisson = stats.poisson.pmf(n, lambd)
    plt.plot(n, poisson, '-o', label="λ = {:f}".format(lambd))
    plt.xlabel('Number of Events', fontsize=12)
    plt.ylabel('Probability', fontsize=12)
    plt.title("Poisson Distribution varying λ")
    plt.legend()
    plt.savefig('name.png')

Taking a closer look to this simulation, we can discover the following patterns:

仔细研究此模拟,我们可以发现以下模式:

  • In each of the different cases, the number assigned to λ corresponds to the peak of the distribution, which then trails off moving further away from the peak.

    在每种不同情况下,分配给λ的数字对应于分布的峰值,然后逐渐远离峰值。
  • The more events that are expected to take place during the simulation, the greater the expected area under the distribution curve will be.

    在模拟过程中预期发生的事件越多,分布曲线下的预期面积将越大。

This type of simulation could, for example, be used to try to reduce the queuing time when going shopping to a supermarket.

例如,可以使用这种类型的模拟来尝试减少去超市购物时的排队时间。

The owner could create a record of how many customers visit the store at different times and on different days of the week in order to then fit this data to a Poisson Distribution.

所有者可以创建一个记录,记录有多少顾客在一周的不同时间和一周中的不同日期访问该商店,然后将该数据拟合到泊松分布中。

In this way, it would be much easier to determine how many cashiers should be working at different times of the day/week in order to enhance the customer experience.

这样,确定一天/一周的不同时间应有多少个收银员工作以提高客户体验会容易得多。

结语 (Wrapping up)

In case you are interested in learning more about the applications of distributions in stochastic settings, more information is available here.

如果您有兴趣了解更多有关随机环境中分布的应用的信息,请在此处获取更多信息。

I hope you enjoyed this article, thank you for reading!

希望您喜欢这篇文章,感谢您的阅读!

联络我 (Contact me)

If you want to keep updated with my latest articles and projects follow me on Medium and subscribe to my mailing list. These are some of my contacts details:

如果您想随时了解我的最新文章和项目,请在Medium上关注我,并订阅我的邮件列表 。 这些是我的一些联系方式:

  • Linkedin

    领英

  • Personal Blog

    个人博客

  • Personal Website

    个人网站

  • Patreon

    Patreon

  • Medium Profile

    中档

  • GitHub

    的GitHub

  • Kaggle

    卡格勒

翻译自: https://www.freecodecamp.org/news/poisson-distribution-a-formula-to-calculate-probability-distribution/

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

泊松分布–计算概率分布的公式 的相关文章

随机推荐

  • Veins(车载通信仿真框架)入门教程

    Veins是一款用于车载移动环境下无线通信仿真的开源框架 xff0c 其对于车载无线网的底层结构 xff0c 如物理层 MAC层等基于802 11p协议已基本开发完善 xff0c 因此在此基础上进行二次开发 xff0c 如改进MAC层协议或
  • OMNET++/Veins VANET仿真:SUMO场景生成

    场景对于车载自组织网络 xff08 VANET xff09 的仿真来说至关重要 xff0c 因为VANET是一种特殊的Ad Hoc网络 xff0c 其特殊性主要变现在应用场景上 传统的Ad Hoc网络 xff0c 比如sensor netw
  • VC++2017关于项目"const char *" 类型的实参与 "char *" 类型的形参不兼容错误的解决方法

    34 const char 34 类型的实参与 34 char 34 类型的形参不兼容 函数形参为char 的类型直接写入字符串报错 解决办法 xff1a 在项目属性 gt C C 43 43 gt 语言中的符合模式项 选择 否
  • 详解VS2017使用scanf报错的解决方法

    1 在程序最前面加 xff1a define CRT SECURE NO DEPRECATE 2 在程序最前面加 xff1a pragma warning disable 4996 3 把scanf改为scanf s xff1b 4 无需在
  • 在MATLAB中手动安装MinGW64详细教程

    在MATLAB中手动安装MinGW64详细教程 话题背景 针对MATLAB官方License限制附件安装的问题 xff0c 可以尝试线下手动自行安装 部分版本的Matlab由于License到期问题或者破解版限制 xff0c 已无法获得Ma
  • ubuntu18.04部署jenkins,图文并茂,记录一下。

    1 因为Jenkins运行需要jdk的环境 xff0c 所以首先得安装Java xff0c 先下载jdk安装包 xff08 听说用wget下载安装时会有问题 xff0c 说是什么Oracle的安装协议 xff0c 本人用wget亲测 xff
  • 通过hdparm将挂载的硬盘休眠再关机

    hdparm Y dev sda1 root 64 cubietruck plus span class token comment hdparm span hdparm get set hard disk parameters versi
  • 教程 | 简单实用的pandas技巧:如何将内存占用降低90%

    pandas 是一个 Python 软件库 xff0c 可用于数据操作和分析 数据科学博客 Dataquest io 发布了一篇关于如何优化 pandas 内存占用的教程 xff1a 仅需进行简单的数据类型转换 xff0c 就能够将一个棒球
  • 哈佛大学cs50课程笔记_哈佛CS50指南:如何为您选择正确的课程(带有免费证书)

    哈佛大学cs50课程笔记 In January I wrote an article on Class Central about CS50 Harvard s Introduction to Computer Science which
  • 使用Docker快速安装部署mysql

    使用Docker快速安装部署mysql的前提 xff1a 首先需要确保已经安装了Docker环境 如果没有安装Docker的话 xff0c 可以参考上一篇的内容 xff1a Linux上安装Docker 有了Docker环境后 xff0c
  • docker下gitlab安装配置使用(完整版)

    docker 安装gitlab以及使用 一 安装及配置 1 gitlab镜像拉取 gitlab ce为稳定版本 xff0c 后面不填写版本则默认pull最新latest版本 docker pull gitlab gitlab ce 拉取镜像
  • Linux 配置Gradle

    一 下载gradle 如果windows中有可以直接拷贝 xff0c 如果没有可以去官网下载 http www gradle org downloads 二 解压下载得到的gradle unzip gradle 2 2 1 all zip
  • gitlab配置通过smtp发送邮件(QQ exmail腾讯企业为例)

    首先祭出官网文档链接 xff1a https docs gitlab com omnibus settings smtp html 其实官网已经说的很清楚了 xff0c 并且给出了QQ邮箱的范例 xff08 BAT还是屌的 xff09 1
  • 文本编辑器Notepad++使用技巧

    除了语法高亮 xff0c 一般不用操作 还有两点经常使用的 xff1a 正则表达式查找替换和列模式编辑 这些可以在VS Eclipse Word等里也有 xff0c 但是有时打开一个文件就慢了 本来想总结记录一下技巧的 xff0c 却无意中
  • linux系统磁盘block、inode占满处理

    1 磁盘的block占满 xff0c 查看命令 df vh 然后查看占用百分比 2 磁盘inode占满 xff0c 查看命令df ih 同样也是查看占用百分比 block占满处理办法 需要用到的命令如下 LL 列出当前目录下的文件 df v
  • Code::Blocks平台下Fortran的编译

    问题背景 xff1a 因为之前学习数值方法 xff0c 有用到Fortran的地方 xff0c 所以上网查了一些资料 关于Fortran语言的编辑器安装 xff0c 目前本人接触到的支持Fortran的编辑器有VisualStdio和Cod
  • powershell远程连接

    在Linux中 xff0c 我们可以使用安全的SSH方便的进行远程管理 但在Windows下 xff0c 除了不安全的Telnet以外 xff0c 从Windows Server 2008开始提供了另外一种命令行原创管理方式 xff0c 那
  • 2022年学习总结暨2023年规划

    2022年总结 2022年是我在C站的创作元年 xff0c 在第一年也收获了不少成就 xff0c 比如 Java领域新星创作者 发布100篇博文 拿到了C站的书包 吃到了C站的月饼 成功上榜了330 43 截止目前收获粉丝8600 43 在
  • 《Prometheus+Grafana 实践派》专栏介绍

    专栏名称 Prometheus 43 Grafana 实践派 专栏介绍 本专栏根据本公司统一监控落地实践编写 在该专栏您将学到 企业级监控的选型Prometheus的基础知识Grafana的基础知识快速搭建Prometheus 43 Gra
  • 泊松分布–计算概率分布的公式

    Probability Distributions play an important role in our daily lives We commonly use them when trying to summarise and ga