条件概率分布

If you’re currently in the job market or looking to switch careers, you’ve probably noticed an increase in popularity of Data Science jobs. In 2019, LinkedIn ranked “data scientist” the №1 most promising job in the U.S. based on job openings, salary, and career advancement opportunities and reported a 56% rise in job openings for data scientists over the previous year. Despite its popularity, however, data science can me a difficult field to enter, let alone to learn. I know from my personal experience, the amount of statistics involved made it very challenging. Probability, in particular, can be quite complicated but is fundamental to many machine learning models such as decision tree learning. So the purpose of this article is to provide a rudimentary undertanding of conditional probability.

如果您目前正处于就业市场或正在寻求转行,您可能已经注意到Data Science职位的受欢迎程度有所提高。 根据职位空缺,薪水和职业晋升机会,LinkedIn在2019年将“数据科学家”排在美国最有前途的工作之一,并报告说数据科学家的职位空缺比上一年增长了56%。 尽管它非常流行,但是数据科学还是一个很难进入的领域,更不用说学习了。 从我的亲身经历,我知道所涉及的统计数据非常具有挑战性。 概率尤其可能非常复杂,但是对于许多机器学习模型(例如决策树学习)而言,这是基础。 因此,本文的目的是提供对条件概率的基本理解。

How To Calculate Probability

如何计算概率

Simply put, the probability of an event happening is equal to the number of times an event could happen divided by the total number of outcomes. For example, imagine you have a deck of cards and you want to calculate the probability that you’ll randomly pull a king from the deck. How would you calculate that? Well, since there are 4 kings in a deck of cards, there are 4 possible ways you can draw a king from the deck; and since there are 52 cards in the deck, there’s 52 possible outcomes. So 4 divided by 52 is .076 or 7.6% chance your card will be a king. Now say you want to figure out the probability of drawing another king — the answer will depend on how you handle replacement. Sampling with replacement means that you place the first card back into the deck making the two events independant (the probability of drawing each king doesn’t change). Sampling without replacement means you’re not placing the first card back, which affects the probability of drawing the second king (total number of outcomes is now 51). If event A is drawing the first king card and event B os drawing the second king card, then we’d say the probability of B given A is equal to the probability of event A multiplied by the probability of event B given that A occurs.

简而言之,事件发生的概率等于事件可能发生的次数除以结果总数。 例如,假设您有一副扑克牌,并且想要计算随机从该副牌中拉出国王的概率。 您将如何计算? 好吧,由于在一副纸牌中有4个国王,因此有四种方法可以从纸牌中抽出一张国王; 而且由于套牌中有52张牌,因此有52种可能的结果。 因此,将4除以52得出的结果是.076,即7.6%的机会是您的卡成为王牌。 现在,您要确定吸引另一位国王的可能性-答案将取决于您如何进行替换 进行替换采样意味着您将第一张卡放回卡组中,从而使两个事件无关(抽出每位国王的概率不变)。 无需更换就可以进行采样,这意味着您不会放回第一张纸牌,这会影响抽出第二张王牌的可能性(现在总结果为51)。 如果事件A吸引第一张王牌而事件B os吸引第二张王牌,那么我们说给定A的B概率等于事件A的概率乘以给定A发生的事件B的概率。

Mathematical NotationP(A and B) = P(A) x P(B|A) = 4/52 x 3/51 = .45%

Tree Diagram

树状图

Mathematics isn’t intuitive to everyone; it certainly wasn’t for me as I was just starting out in this field. Visualizations, however, can be a great tool when it comes to reenforcing complex topics. A tree diagram is one example that can help you break down a general problem into smaller components — perfect for probability problems that involves multiple events that lead to a variety of outcomes. For example, take a look at the diagram I’ve created that helps answer the following question: If you have a bag of 23 marbles (5 green, 8 blue, and 10 red), what’s the probability that you’ll randomly pull out a blue marble and a green marble? Let’s break it down.

数学不是每个人都直观的。 因为我刚开始涉足这一领域,所以对我当然不是。 但是,在强化复杂主题时,可视化可能是一个很好的工具。 树形图是一个示例,可以帮助您将一般问题分解为较小的部分-非常适合涉及多个事件并导致各种结果的概率问题。 例如,看一下我创建的有助于回答以下问题的图表:如果您有一袋23颗大理石(5颗绿色,8颗蓝色和10颗红色),那么您随机抽出的概率是多少?蓝色大理石和绿色大理石? 让我们分解一下。

  1. The probability of grabbing a blue marble is 35%, because there are 8 way you can get a blue marble and 23 total potential outcomes.抓住蓝色大理石的可能性为35%,因为有8种方法可以获取蓝色大理石,并且有23种潜在结果。
  2. Now given that you pulled out a blue marble, the probability of grabbing a green marble from the bag is 23% — 5 green marbles divided by 22 potential outcomes (notice how the total number of outcomes changes the second time, hence the change in probability).

    现在,假设您拔出一块蓝色大理石,则从袋子中抓取绿色大理石的概率为23%-5个绿色大理石除以22个潜在结果(请注意结果总数如何第二次更改,因此概率发生变化)

  3. Finally, calculating the probability of both these events happening involves multiplying the probability of both events (.35 x .23 = 8%).

    最后,计算这两个事件发生的概率涉及将两个事件的概率相乘(.35 x .23 = 8%)。

Conclusion

结论

Hopefully this demsonstration has given you a clearer mental picture of statistical probability. Even though conditional probability may seem elementary compared to the more advanced concepts in machine learning, having a solid understanding of the foundation of which data science is built on is extremely important. So whenever you begin to learn something new, remember that no topic is too small and relearning is reenforcement.

希望这种演示能使您对统计概率有更清晰的认识。 尽管与机器学习中更高级的概念相比,条件概率似乎是基本的,但对数据科学所基于的基础有扎实的了解仍然非常重要。 因此,每当您开始学习新知识时,请记住,没有一个主题太小,重新学习就是强化。

翻译自: https://medium.com/swlh/conditional-probability-7f519a81655e

条件概率分布


http://www.taodudu.cc/news/show-995269.html

相关文章:

  • 成为一名真正的数据科学家有多困难
  • 数据驱动开发_开发数据驱动的股票市场投资方法
  • 算法偏见是什么_算法可能会使任何人(包括您)有偏见
  • 线性回归非线性回归_了解线性回归
  • 数据图表可视化_数据可视化如何选择正确的图表第1部分
  • 使用python和javascript进行数据可视化
  • github gists 101使代码共享漂亮
  • 大熊猫卸妆后_您不应错过的6大熊猫行动
  • jdk重启后步行_向后介绍步行以一种新颖的方式来预测未来
  • scrapy模拟模拟点击_模拟大流行
  • plsql中导入csvs_在命令行中使用sql分析csvs
  • 交替最小二乘矩阵分解_使用交替最小二乘矩阵分解与pyspark建立推荐系统
  • 火种 ctf_分析我的火种数据
  • 分析citibike数据eda
  • 带有postgres和jupyter笔记本的Titanic数据集
  • 机器学习模型 非线性模型_机器学习模型说明
  • 算命数据_未来的数据科学家或算命精神向导
  • 熊猫数据集_熊猫迈向数据科学的第三部分
  • 充分利用UC berkeleys数据科学专业
  • 铁拳nat映射_铁拳如何重塑我的数据可视化设计流程
  • 有效沟通的技能有哪些_如何有效地展示您的数据科学或软件工程技能
  • vue取数据第一个数据_我作为数据科学家的第一个月
  • rcp rapido_为什么气流非常适合Rapido
  • 算法组合 优化算法_算法交易简化了风险价值和投资组合优化
  • covid 19如何重塑美国科技公司的工作文化
  • 蒙特卡洛模拟预测股票_使用蒙特卡洛模拟来预测极端天气事件
  • 微生物 研究_微生物监测如何工作,为何如此重要
  • web数据交互_通过体育运动使用定制的交互式Web应用程序数据科学探索任何数据...
  • 熊猫数据集_用熊猫掌握数据聚合
  • 数据创造价值_展示数据并创造价值

条件概率分布_条件概率相关推荐

  1. python 条件概率_NLTK中的条件概率分布

    产生一个文本,一般要基于一个已有的训练集,或者说是种子,来告诉程序词汇的分布以及用词习惯,下面是一个最为基础的文本产生函数,基于nltk的条件频率分布函数构建: def generate_model( ...

  2. 全连接条件随机场_条件随机场CRF简介

    作者:Ravish Chawla 编译:ronghuaiyang 导读 一个简单明了的对条件随机场的说明,给大家一个非常直观的印象,CRF到底是个什么东西,能干什么用. 条件随机场是一种用于序列预测的 ...

  3. 条件概率分布与边缘概率分布

    1.条件概率分布 这是理解马尔科夫链的重要概念,单独成文 参考百科:http://baike.baidu.com/view/1969485.htm?fr=aladdin 大家都能理解概率分布,但加了条 ...

  4. 维护条件记录_销项税(MWST)

    维护条件记录_销项税(MWST) (2009-08-01 21:49:53) 标签: sap erp sd 条件 销项税 分类: SD/LO 博客迁至http://www.fenginfo.com 有 ...

  5. 广西大学计算机研究所宿舍,广西大学宿舍条件如何_几人间?_广西大学怎么样_是985吗?...

    广西大学宿舍条件如何_几人间?_广西大学怎么样_是985吗? 广西大学宿舍条件如何&广西大学宿舍几人间? 广西大学宿舍是六人间,有阳台,有独立的卫浴间,有空调,有储物柜,有电脑桌和椅子,有网线 ...

  6. 统计概率分布_概率统计中的重要分布

    统计概率分布 Random Variables follow different types of distribution in probability space which decides th ...

  7. mysql 条件分析_数据分析之mysql

    MYSQL select +列名(全部*) 计数函数:AVG(列名)返回某列的平均值 COUNT()返回某列的行数(count(*)表示对表中行的数目进行计数,不管对表列中包含的是空值还是非空值. M ...

  8. srpg 胜利条件设定_英雄联盟获胜条件

    srpg 胜利条件设定 介绍 (Introduction) The e-sports community has been growing rapidly in the past few years, ...

  9. python随机数据随概率分布_概率分布及其Python实现

    一.学习概率分布有什么用?很多现实中的分布都来自几种概率分布.对个人生活和工作选择非常有帮助. 知道某件事发生的概率对我们作出数据分析决策很有帮助.有时候计算概率很简单,有时候计算概率很复杂,概率分布 ...

最新文章

  1. Python+OpenCV 图像处理系列(7)—— 图像色彩空间及转换
  2. OSPF虚拟链路实验
  3. python 链表的基础概念和基础用法
  4. 图片一:单通道、三通道、灰度图、黑白图、三通道转灰度图(单通道)
  5. 了解电商优惠券的一生,看完这篇就足够了!
  6. Symfony常用指令(收藏版)
  7. Javascript定位表单控件的几种方式
  8. 使用C++模板判断两个类型是否一样
  9. 应用案例 | 2018款奥迪 A4 Avant 车发动机无法起动故障诊断
  10. 苹果手机屏幕镜像_微软应用上线屏幕镜像功能:可在PC端控制安卓手机
  11. uniapp 二维码生成器 uQRCode
  12. gmail邮件分组_如何使用Gmail和G Suite设置专业电子邮件地址
  13. FD-GAN: Pose-guided Feature Distilling GAN for Robust Person Re-identification
  14. 软件测试输入准则,单元测试准则
  15. gpio引脚介绍 树莓派3b_树莓派4的GPIO接口介绍
  16. 自动驾驶路径规划:A*(Astar)算法
  17. Go语言学习笔记—golang标准库xml包
  18. 人人开源renren-fast-vue
  19. 读《品人录》——雍正
  20. 系统分析设计期末大项目——闲得一币TimeForCoin小程序前端

热门文章

  1. 数据库设计的核心原则 外键的设计 提高插入数据速度
  2. 1002. 写出这个数 (20)
  3. gcc的警告提示信息
  4. Java开发环境!java写猜数字小游戏
  5. Go语言学习之3 流程控制、函数
  6. jquery如何阻止子元素继承父元素的事件(又称事件冒泡)
  7. 装饰器3--装饰器作用原理
  8. mysql常用操作(一)
  9. Javascript---Immediately-Invoked Function Expression (IIFE)立即执行的函数表达式
  10. ASP.NET MVC下的四种验证编程方式[续篇]