Stat2.2x Probability(概率)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授。

PDF笔记下载(Academia.edu)

Summary

Bayes Theorem $$P(A_i|B)=\frac{P(B|A_i)\cdot P(A_i)}{\sum_{j}P(B|A_j)\cdot P(A_j)}$$ where $$P(B)=\sum_{j}P(B|A_j)\cdot P(A_j)$$

GRADED EXERCISE SET 2

PROBLEM 1

Cards are dealt from a well shuffled standard deck. Find the chance that:

1A the first card is not a heart

1B the 10th card is the ace of spades

1C the 10th card is the ace of spades, given that the 50th card is the ace of diamonds

1D the 32nd card is red, given that the 51st and 52nd cards are red

1E the 51st card is red, given that the 32nd and 52nd cards are red

Solution

1A) $$P(\text{first card is not heart})=1-P(\text{first card is heart})=1-\frac{13}{52}=\frac{3}{4}$$

1B) Each card is randomly drawn thus the chance of a specific card is equivalent: $$P(\text{10th is ace of spades})=\frac{1}{52}$$

1C) There are 51 cards except the given card ace of diamonds, thus $$P(\text{10th is ace of spades}\ |\ \text{50th is ace of diamonds})=\frac{1}{51}$$

1D) $$P(\text{32nd is red}\ |\ \text{51st and 52nd are red})=\frac{26-2}{52-2}=\frac{12}{25}$$

1E) $$P(\text{51st is red}\ |\ \text{32nd and 52nd are red})=\frac{26-2}{52-2}=\frac{12}{25}$$

PROBLEM 2

A person is selected at random from a population that has the following characteristics: 65% of the people are men; the others are women 12% of the men are smokers 7% of the women are smokers

2A Find (correct to four decimal places) the chance that the selected person is a non-smoker, given that the person is a man.

2B Find (correct to four decimal places) the chance that the selected person is a woman who smokes.

2C Find (correct to four decimal places) the chance that the selected person is a smoker.

2D Given that the selected person is a smoker, what is the chance that the person is a woman? Please give your answer correct to four decimal places.

2E Find (correct to four decimal places) the chance that the selected person is a man or a non-smoker.

Solution

2A) $$P(\text{non-smoker}\ |\ \text{man})=1-0.12=0.88$$

2B) $$P(\text{woman & smoker})=(1-0.65)\times0.07=0.0245$$

2C) $$P(\text{smoker})=P(\text{smoker & man})+P(\text{smoker & woman})$$ $$=0.65\times0.12+(1-0.65)\times0.07=0.1025$$

2D) $$P(\text{woman}\ |\ \text{smoker})=\frac{P(\text{woman & smoker})}{P(\text{smoker})}=\frac{0.35\times0.07}{0.1025}=0.2390244$$

2E) $$P(\text{man or non-smoker})=P(\text{man})+P(\text{non-smoker})-P(\text{man & non-smoker})$$ $$=0.65+(1-0.1025)-0.65\times0.88=0.9755$$

PROBLEM 3

I am with a group of five of my friends. A box contains 8 pieces each of milk chocolate, white chocolate, and dark chocolate. The box is passed around the six of us, with each person taking 4 pieces. Assume that each person chooses at random without replacement from the available pieces. I am the last person to whom the box is passed. Find the chance that I pick 4 dark chocolates.

Solution

It it no difference between "I" am the first and "I" am the last. $$P=\frac{C_{8}^{4}}{C_{24}^{4}}=\frac{35}{5313}=0.006587615$$ $C_{n}^{m}=\frac{n!}{m!\cdot(n-m)!}$ and its R function is $\text{choose(n, m)}$.

PROBLEM 4

An urn contains 10 white balls and 5 blue balls. Draws are made repeatedly from the urn as follows. On each draw, a ball is drawn and its color noted; then it is replaced in the urn along with 3 more balls of its color. For example, if you draw a white ball the first time, then you will put it back in the urn along with 3 more white balls. So you will end up with 13 white balls and 5 blue balls.

4A Find the chance that the first ball drawn is blue.

4B Find the chance that the second ball drawn is blue, given that the first ball drawn is blue.

4C Find the chance that the second ball drawn is blue.

4D Find the chance that the first ball drawn is blue, given that the second ball drawn is blue.

Solution

4A) $$P(\text{first is blue})=\frac{5}{10+5}=\frac{1}{3}$$

4B) If the first is blue then it would be 10 white balls and 8 blue balls before the second draw. Hence $$P(\text{second is blue}\ |\ \text{first is blue})=\frac{8}{10+8}=\frac{4}{9}$$

4C) $$P(\text{second is blue})=P(\text{second is blue & first is white})+P(\text{second is blue & first is blue})$$ $$=P(\text{first is white})\cdot P(\text{second is blue}\ |\ \text{first is white})$$ $$+P(\text{first is blue})\cdot P(\text{second is blue}\ |\ \text{first is blue})$$ $$=\frac{10}{15}\times\frac{5}{13+5}+\frac{5}{15}\times\frac{8}{10+8}=\frac{1}{3}$$

4D) $$P(\text{first is blue}\ |\ \text{second is blue})=\frac{P(\text{first & second are blue})}{P(\text{second is blue})}=\frac{\frac{5}{15}\times\frac{8}{10+8}}{\frac{1}{3}}=\frac{4}{9}$$

加州大学伯克利分校Stat2.2x Probability 概率初步学习笔记: Section 1 The Two Fundamental Rules (1.5-1.6)的更多相关文章

  1. 加州大学伯克利分校Stat2.2x Probability 概率初步学习笔记: Section 5 The accuracy of simple random samples

    Stat2.2x Probability(概率)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授. PDF笔记下载(Acad ...

  2. 加州大学伯克利分校Stat2.2x Probability 概率初步学习笔记: Section 4 The Central Limit Theorem

    Stat2.2x Probability(概率)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授. PDF笔记下载(Acad ...

  3. 加州大学伯克利分校Stat2.2x Probability 概率初步学习笔记: Section 3 The law of averages, and expected values

    Stat2.2x Probability(概率)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授. PDF笔记下载(Acad ...

  4. 加州大学伯克利分校Stat2.2x Probability 概率初步学习笔记: Section 2 Random sampling with and without replacement

    Stat2.2x Probability(概率)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授. PDF笔记下载(Acad ...

  5. 加州大学伯克利分校Stat2.2x Probability 概率初步学习笔记: Final

    Stat2.2x Probability(概率)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授. PDF笔记下载(Acad ...

  6. 加州大学伯克利分校Stat2.2x Probability 概率初步学习笔记: Midterm

    Stat2.2x Probability(概率)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授. PDF笔记下载(Acad ...

  7. 加州大学伯克利分校Stat2.3x Inference 统计推断学习笔记: FINAL

    Stat2.3x Inference(统计推断)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授. PDF笔记下载(Acad ...

  8. 加州大学伯克利分校Stat2.3x Inference 统计推断学习笔记: Section 2 Testing Statistical Hypotheses

    Stat2.3x Inference(统计推断)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授. PDF笔记下载(Acad ...

  9. 加州大学伯克利分校Stat2.3x Inference 统计推断学习笔记: Section 1 Estimating unknown parameters

    Stat2.3x Inference(统计推断)课程由加州大学伯克利分校(University of California, Berkeley)于2014年在edX平台讲授. PDF笔记下载(Acad ...

随机推荐

  1. 开源磁力搜索爬虫dhtspider原理解析

    开源地址:https://github.com/callmelanmao/dhtspider. 开源的dht爬虫已经有很多了,有php版本的,python版本的和nodejs版本.经过一些测试,发现还 ...

  2. [PGM] I-map和D-separation

    之前在概率图模型对概率图模型做了简要的介绍.此处介绍有向图模型中几个常常提到的概念,之前参考的多为英文资料,本文参考的是<概率图模型-原理与技术的>中译版本.很新的书,纸质很好,翻译没有很 ...

  3. windows部署React-Native的开发环境实践(技术细节)

    前情摘要 众所周知,有人说.net可以用Xamrian,呵呵,不习惯收费的好么?搞.Net的人设置一次java的环境变量,可能都觉得实在太麻烦了,可能是因为这些年微软确实把我们给带坏了,所有东西一键安 ...

  4. 仿造slither.io第二步:加个地图,加点吃的

    前言 上一篇博文讲了如何造一条蛇,现在蛇有了,要让它自由的活动起来,就得有个地图啊,而且只能走也不行呀,还得有点吃的,所以还得加点食物,这一篇博文就来讲讲如何添加地图和食物. 预览效果 当前项目最新效 ...

  5. css+div 浮动分块

    前段时间学过几天html,只是怀着了解的态度,能够读懂别人的页面,能够扒现成就行,一直没有自己动手去实践过,其实也不是没有实践过,前段时间扒了一个网页,想按照自己的要求来改,可后果是越改越乱.今天心血 ...

  6. Matlab学习笔记 figure函数

    Matlab学习笔记 figure函数 matlab中的 figure 命令,能够创建一个用来显示图形输出的一个窗口对象.每一个这样的窗口都有一些属性,例如窗口的尺寸.位置,等等.下面一一介绍它们. ...

  7. ElasticSearch入门系列(七)搜索

    一.在之前,我们已经学会了如何使用elasticsearch作为一个简单的NoSql风格的分布式文件存储器--我们可以将一个JSON文档扔给Elasticsearch.也可以根据ID检索他们.但Ela ...

  8. webpack 插件: html-webpack-plugin

    插件地址:https://www.npmjs.com/package/html-webpack-plugin 这个插件用来简化创建服务于 webpack bundle 的 HTML 文件,尤其是对于在 ...

  9. eclipse的插件安装

    如何安装:http://my.oschina.net/linjunlong/blog/126961 插件安装方法:eclipse和myeclipse版本不一样,略有区别 在线安装: 第一种:知道在线安 ...

  10. isinstance

    class Foo: pass obj = Foo() isinstance(obj,Foo) class Foo: pass obj = Foo() isinstance(obj ,Foo) pri ...