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 ...
随机推荐
- 1009 数字1的数量 数位dp
1级算法题就这样了,前途渺茫啊... 更新一下博客,我刚刚想套用数位dp的模板,发现用那个模板也是可以做到,而且比第二种方法简单很多 第一种方法:我现在用dp[pos][now]来表示第pos位数字为 ...
- Unity2017五子棋大战_人机_双人_UNET联网
五子棋大战源码工程基于Unity2017.2进行开发,分为人机.双人.UNET网络三种对战方式,配有案例讲解视频, 其中人机五子棋AI有三种开发难度,欢迎有兴趣的同学加入学习! . 目录 000-展示 ...
- CTF题-http://120.24.86.145:8002/flagphp/:Bugku----flag.php
今天做了一道关于序列化的题目,收益颇多,愉快地开始. 首先,提示了“hint”,所以尝试加入hint参数.这儿没啥好说的,最后hint=1显示了重点内容.如下图所示 没错,是金灿灿的网页代码,开心,仔 ...
- MySQL主从同步详细步骤
前情提要: 本文档以Ubuntu作为主服务器,Win7作为从服务器进行测试.要保证主从服务器之间能够互相通信(即能相互ping通). 主服务器ip地址:192.168.13.81 从服务器ip地址:1 ...
- FortiGate设备管理
1.Web管理 1.FortiGate出厂配置 默认地址为192.168.1.99,可以通过https的方式进行web管理(默认用户名admin,密码为空).不同型号设备用于管理的接口略有不同,如: ...
- Java_5 数组
1.数组的概念与作用 数组:一组数据的集合,数组中的每个数据被称作元素.在数组中可以存放任意类型的元素,但同一个数组里存放的元素类型必须一致. 作用:可以存贮多个数据. 2.数组的使用方式 数据类型[ ...
- mysql 复制原理与实践
复制功能是将一个mysql数据库上的数据复到一个或多个mysql从数据库上. 复制的原理:在主服务器上执行的所有DDL和DML语句都会被记录到二进制日志中,这些日志由连接到它的从服务器获取,并复制到从 ...
- centos7下keepalived1.3.4安装与使用
keepalived是集群管理中保证集群高可用的一个服务软件,其功能类似于heartbeat,用来防止单点故障. 一.下载keepalived http://www.keepalived.org/ 如 ...
- Ubuntu 16.04 更换阿里源
vim /etc/apt/source.list deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by s ...
- JAVA虚拟机是?为什么称作是“平台无关的语言”?
Java虚拟机(Java Virtual Machine)简称JVM ,它是抽象化的计算机,有自己完善的硬体架构,如处理器.堆栈.寄存器等,还具有相应的指令系统.JVM屏蔽了与具体操作系统平台相关的信 ...