惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Martin Fowler
Martin Fowler
J
Java Code Geeks
The GitHub Blog
The GitHub Blog
C
Check Point Blog
H
Help Net Security
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
P
Proofpoint News Feed
V
Visual Studio Blog
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
S
SegmentFault 最新的问题
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
有赞技术团队
有赞技术团队
博客园_首页
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏

博客园 - 比尔盖房

USACO: Section 1.5 -- PROB Prime Palindromes USACO: Section 1.5 -- PROB Number Triangles USACO: Section 1.4 -- PROB Arithmetic Progressions USACO: Section 1.3 -- PROB Prime Cryptarithm USACO: Section 1.3 -- PROB Barn Repair USACO: Section 1.3 -- PROB Mixing Milk USACO: Section 1.2 -- PROB Dual Palindromes USACO: Section 1.2 -- PROB Palindromic Squares Programming Pearls: Chatper3 Problem6 [Form letter generator] Programming Pearls: Chatper3 Problem5 [Hyphenation Words] Programming Pearls: Chatper3 Problem4 [Dates Caculation] Programming Pearls: Chatper3 Problem3 [Print Banner] Studying "Concrete Mathematics" Studying "Introduction to Algorithms" Testing SEH tips How DebuggerRCThread is lauched? Public Symbols vs Private Symbols[zt] The magic of NativeWindow-- How does .Net Winform manage Win32 controls .Net Windows Service
Studying Probability Theory
比尔盖房 · 2007-07-18 · via 博客园 - 比尔盖房

Chapter 1.
How to prove that the r combination from n elements is n!/((n-r)!*r!) ?
Answer: we may first find out the permutation of r elements from n: we have n*(n-1)*(n-2)...*(n-r+1) = n!/(n-r)!. In these r elements permutation, if all elements are the same value of n, they belong to the same combination. And there are r! permutation of these r elements of the same values. So the combination is n!/(n-r)!/r!.

Chapter2.
Q1, when to use 全概率公式, when to use Bayes公式?
全概率公式 is used to calculate a single event probability. While Bayes公式 is used to calculate the conditional probability, that is we should first know one informational event and want to get another event probability. So we may define the known information event as B and getting event as A1.

14:
Since we know one information event that the target is destroyed, we may use Bayes theory. Let's define this event as B, and event A1, A2, A3 as the cannonball is shooted from 250m, 200m, 150m. We are seeking for P(A1|B).

P(A1|B)= P(A1)*P(B|A1)/(P(A1)*P(B|A1)+ P(A2)*P(B|A2)+ P(A3)*P(B|A3))
             = 0.1*0.05/(0.1*0.05+ 0.7*0.1+ 0.2*0.2)
             = 1/23

15:
Define the known event B to be receiving the ABCA and event A1, A2, A3 to be sending AAAA, BBBB, CCCC. So, we are seeking for P(A1|B).
Using Bayes theory, P(A1|B)= P(A1)*P(B|A1)/(P(A1)*P(B|A1)+ P(A2)*P(B|A2)+ P(A3)*P(B|A3)).
P(B|A1)= 0.6*0.2*0.2*0.6 = 0.0144
P(B|A2)= 0.2*0.6*0.2*0.2 = 0.0048
P(B|A3)= 0.2*0.2*0.6*0.2 = 0.0048

P(A1|B)= 0.5625

16:
P((AUB)C)=P((AC)U(BC))= P(AC) +P(BC) - P(ACBC)= P(A)P(C) + P(B)P(C) - P(A)P(B)P(C) =(P(A) + P(B) - P(A)P(B))P(C)
                  =P(AUB)P(C)
=> AUB is independent with C.

P(ABC)=P(A)P(B)P(C) =P(AB)P(C)   => AB is independent with C.

P((A-B)C)= P(A(~B)C)= P(AC(~B))= P(AC(omega - B))
                = P(AC) - P(ABC)
                = P(A)P(C) - P(A)P(B)P(C)
                = P(C)(P(A) - P(A)P(B))
                = P(C) P(A-B)
=> A-B is independent with C.

23:
The small probability event is A, so P(A)=p is very small.

In n-times Bernoulli trial, using binomial distribution, the b(0; n, p) = q^n. So the probability of A occurs is 1- b(0;n, p) = 1- q^n.

Since q<1, while n->infinite, q^n ->0 => 1- q^n -> 1. So follow the increase of n, the probability of A occurs will become 1, which means: small probability event will definitely occur for enough large n.

[Correction] This is not a Bernoulli trial.
[Correct Solution] The i-th times occurrence of the small probability event is A(i). If the small probability event did not occur in the first n times trial, the event is defined as B(n) = (~A(1))(~A(2))(~A(3))...(~A(n)). Since ~A(i) are independent, P(B(n))=P(~A(1))P(~A(2))P(~A(3))...P(~A(n))= (1-p)^n          

So ~B(n) means the small probability event will occur at least once in n times trial. P(~B(n))= 1 - (1-p)^n
When n->infinite, the P(~B(n)) will become 1. Thich means: small probability event will definitely occur for enough large n.

31:
Let's define event A: getting black ball from its package. p = P(A) = 1/N, q= 1-p =(N-1)/N
To switch back the black ball into the first package, event A must occur even times: 0, 2, 4, ..... We define this event as E. While the occurrence of odd times of A is defined as event O.
Using binomial distribuation:
P(E) = C(0, n)*p^0*q^n + C(2, n)*p^2*q^(n-2) + ...
P(O) = C(1, n)*p^1*q^(n-1) + C(3, n)*p^3*q^(n-3) + ...
=> P(E) + P(O) =1 and P(E) - P(O) = (q - p)^n = ((N-2)/N)^n
=> P(E) = 1/2+  ((N-2)/N)^n/2

1. N=1, while n=2k-1, P(E) = 0, n =2k P(E)=1
2. N=2  P(E)= 1/2
3. N>2  n -> infinite, P(E) ->1/2, note, P(E) >1/2