Bayes’s formula for Conditional Probability
Conditional Probability
Example:
In a batch, there are 80% C programmers, and 40% are Java and C programmers. What is the probability that a C programmer is also Java programmer?
Let A --> Event that a student is Java programmer
B --> Event that a student is C programmer
P(A|B) = P(A ∩ B) / P(B)
= (0.4) / (0.8)
= 0.5
So there are 50% chances that student that knows C also
knows Java
Exercise:
1) What is the value of P(A|A)?
2) Let P(E) denote the probability of the event E. Given P(A) = 1, P(B) = 1/2, the values of P(A | B) and P(B | A) respectively are (GATE CS 2003)
(A) 1/4, 1/2
(B) 1/2, 1/14
(C) 1/2, 1
(D) 1, 1/2
Bayes’s formula for Conditional Probability
Example : Box P has 2 red balls and 3 blue balls and box Q has 3 red balls and 1 blue ball. A ball is selected as follows:
(i) Select a box
(ii) Choose a ball from the selected box such that each ball in
the box is equally likely to be chosen. The probabilities of
selecting boxes P and Q are (1/3) and (2/3), respectively.
Given that a ball selected in the above process is a red ball, the probability that it came from the box P is (GATE CS 2005)
(A) 4/19
(B) 5/19
(C) 2/9
(D) 19/30
Solution:
R --> Event that red ball is selected
B --> Event that blue ball is selected
P --> Event that box P is selected
Q --> Event that box Q is selected We need to calculate P(P|R)?
P(R|P) = A red ball selected from box P
= 2/5
P(P) = 1/3
P(R) = P(P)*P(R|P) + P(Q)*P(R|Q)
= (1/3)*(2/5) + (2/3)*(3/4)
= 2/15 + 1/2
= 19/30 Putting above values in the Bayes's Formula
P(P|R) = (2/5)*(1/3) / (19/30)
= 4/19
Exercise A company buys 70% of its computers from company X and 30% from company Y. Company X produces 1 faulty computer per 5 computers and company Y produces 1 faulty computer per 20 computers. A computer is found faulty what is the probability that it was bought from company X?
Bayes’s formula for Conditional Probability的更多相关文章
- 【概率论】2-1:条件概率(Conditional Probability)
title: [概率论]2-1:条件概率(Conditional Probability) categories: Mathematic Probability keywords: Condition ...
- 条件概率和链式法则 conditional probability & chain rule
顾名思义, 条件概率指的是某个事件在给定其他条件时发生的概率, 这个非常符合人的认知:我们通常就是在已知一定的信息(条件)情况下, 去估计某个事件可能发生的概率. 概率论中,用 | 表示条件, 条件概 ...
- [PGM] Bayes Network and Conditional Independence
2 - 1 - Semantics & Factorization 2 - 2 - Reasoning Patterns 2 - 3 - Flow of Probabilistic Influ ...
- Fuzzy Probability Theory---(2)Computing Fuzzy Probabilities
Let $X=\{x_1,x_2,...,x_n\}$ be a finite set and let $P$ be a probability function defined on all sub ...
- 数据挖掘十大经典算法(9) 朴素贝叶斯分类器 Naive Bayes
贝叶斯分类器 贝叶斯分类器的分类原理是通过某对象的先验概率,利用贝叶斯公式计算出其后验概率,即该对象属于某一类的概率,选择具有最大后验概率的类作为该对象所属的类.眼下研究较多的贝叶斯分类器主要有四种, ...
- [Machine Learning] Probabilistic Graphical Models:二、Bayes Network Fundamentals(1、Semantics & Factorization)
一.How to construct the dependency? 1.首字母即随机变量名称 2.I->G是更加复杂的模型,但Bayes里不考虑,因为Bayes只是无环图. 3.CPD = c ...
- 关于Bayes网络新解
经典贝叶斯网络 贝叶斯分类器的分类原理是通过某对象的先验概率,利用贝叶斯公式计算出其后验概率,即该对象属于某一类的概率,选择具有最大后验概率的类作为该对象所属的类.目前研究较多的贝叶斯分类器主要有四种 ...
- 十大经典数据挖掘算法(9) 朴素贝叶斯分类器 Naive Bayes
贝叶斯分类器 贝叶斯分类分类原则是一个对象的通过先验概率.贝叶斯后验概率公式后计算,也就是说,该对象属于一类的概率.选择具有最大后验概率的类作为对象的类属.现在更多的研究贝叶斯分类器,有四个,每间:N ...
- Study notes for Discrete Probability Distribution
The Basics of Probability Probability measures the amount of uncertainty of an event: a fact whose o ...
随机推荐
- [1.16更新B14特征处理]津南数字制造题目解读及部分思路~~有趣的特征
[1.16更新B14特征处理]津南数字制造题目解读及部分思路--有趣的特征 Article onion啦啦啦 2019-01-17 16:03:38 11 1790 11 首先声明,我并不能保证这些特 ...
- C的内存泄漏检测
一,Windows平台下的内存泄漏检测 检测是否存在内存泄漏问题 Windows平台下面Visual Studio 调试器和 C 运行时 (CRT) 库为我们提供了检测和识别内存泄漏的有效方法,原理大 ...
- H5入门
1.基本骨架 <!DOCTYPE html> <html> <head><title>标题</title><meta charset= ...
- GUI界面操作-实现简单的记事本
wxPython编写界面程序的基本流程: 1.import wx #导入wxPython的包 2.class App(wx.App) #子类化一个应用程序类 3.def onInit(self ...
- [剑指Offer]34-二叉树中和为某一值的路径
题目链接 https://www.nowcoder.com/practice/b736e784e3e34731af99065031301bca?tpId=13&tqId=11177&t ...
- #define宏重定义
#define A 1 在同一个工程的另外一个文件里又定义了#define A 2 并不会报错(2010vs) 亲测可用 但是最后该宏变量A的值 ,应该是预处理-----顺序处理------最后一个运 ...
- swift - 根试图控制器的手势返回冲突 - push 新的tabbar控制器手势冲突
1. 禁用手势 和开启手势 extension JYRTSShopListController: UIGestureRecognizerDelegate { /// 禁止使用手势返回 func for ...
- rviz2
VINS-Mono ####Panels: 面板: - Class: rviz/Displays 显示1 Help Height: Name: Displays Property Tree Widge ...
- 整站变灰CSS代码
* { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter: grayscale(100% ...
- MVC防止跨站攻击@Html.AntiForgeryToken()
ASP.NET MVC 中有个标签:@Html.AntiForgeryToken(),需要在页面中加入这个标签,然后在Actoin中加入特性[ValidateAntiForgeryToken]就可以了 ...