1. Inclusion-Exclusion
Problem
For a group of 7 people, find the probability that all 4 seasons (winter, spring,summer, fall) occur at least once each among their birthdays, assuming that all seasons are equally likely.
Sol
Ai를 i 계절에 생일이 없는 경우라고 하자. 이 때 우리가 구해야하는 확률은 1−P(A1∪A2∪A3∪A4)이다.
계절의 대칭성에 따라 우리가 구해야하는 식은 다음과 같다.
P(A1∪A2∪A3∪A4)=i=1∑4P(Ai)−1≤i<j≤4∑P(Ai∩Aj)+1≤i<j<k≤4∑P(Ai∩Aj∩Ak)−P(A1∩A2∩A3∩A4)=4P(A1)−6P(A1∩A2)+4P(A1∩A2∩A3)
P(A1∩A2∩A3∩A4)은 모든 계절에 생일이 없는 경우이기에 0이다.
P(A1)은 7명 모두 특정 1개 계절에 생일이 없을 확률이므로, 437이다.
P(A1∩A2)는 7명 모두 특정 2개 계절에 생일이 없을 확률 이므로, 427=217이다.
P(A1∩A2∩A3)는 7명 모두 1개의 계절에만 생일이 몰려있어야 하므로 417이다.
따라서 1−P(A1∪A2∪A3∪A4)=1−(4(43)7−6(21)7+4(41)7)≈0.513 이다.
Problem
Alice attends a small college in which each class meets only once a week. She is deciding between 30 non-overlapping classes. There are 6 classes to choose from for each day of the week, Monday through Friday. Trusting in the benevolence of randomness, Alice decides to register for 7 randomly selected classes out of the 30, with all choices equally likely. What is the probability that she will have
classes every day, Monday through Friday? (This problem can be done either directly using the naive definition of probability, or using inclusion-exclusion.)
Sol
Bi를 i번째 요일에 수업이 전혀 없는 사건이라고 정의하자.
이 때 우리가 구해야하는 확률은 1−P(B1∪B2∪B3∪B4∪B5) 이다.
P(B1∪B2∪B3∪B4∪B5)=∑P(Bi)−∑P(Bi∩Bj)+∑P(Bi∩Bj∩Bk)−⋯=5P(B1)−10P(B1∩B2)+10P(B1∩B2∩B3)이다.
이 때 4개 이상의 교집합의 확률이 0이다. 4개 이상의 요일에 수업이 하나도 없다면, 남은 요일에 수업을 7개를 들어야 하는데 하루에 총 6개 수업이 열리므로 확률이 0이다.
P(B1)은 1개 요일을 제외하고 나머지 4개 요일 중에서 7개를 골라야 하므로 (730)(724)이다.
P(B1∩B2)는 특정 2개 요일에 수업이 없을 확률이므로, (730)(718)이다.
P(B1∩B2∩B3)는 특정 3개 요일에 수업이 없을 확률이므로, (730)(712)이다.
따라서 P(B1∪⋯∪B5)=5((730)(724))−10((730)(718))+10((730)(712))=377263이며, 최종적으로 1−377263=377114≈0.302이다.
문제 풀이 느낀점
포함배제의 원리를 적용할 수 있도록, 여사건을 이용하여 합집합의 형태로 바꿔야함.
2. Independence
Problem
Is it possible that an event is independent of itself? If so, when?
Sol
한 사건이 독립이려면, P(A∩A)=P(A)⋅P(A)=(P(A))2을 성립해야한다.
위 식을 정리하면 (P(A))2−P(A)=0,P(A)(1−P(A))=0이므로 P(A)가 0 또는 1이여야 한다.
P(A)=0인 경우: 사건 A는 일어날 확률이 0인 사건이다. 따라서 A가 일어났다고 해도 이후 확률에는 변화가 없다.
P(A)=1인 경우: 사건 A는 일어날 확률이 1인 사건이다. 따라서 A가 일어났다는 사실을 알아도 이후 예측에는 변화가 없다.
Problem
Is it always true that if A and B are independent events, then Ac and Bc are independent events? Show that it is, or give a counterexample.
Sol
독립은 P(A∩B)=P(A)P(B)이다. 따라서 우리가 증명해야하는 것은 P(Ac∩Bc)=P(Ac)P(Bc)이다.
드모르간 법칙에 의해 Ac∩Bc=(A∪B)c이 성립한다. P(Ac∩Bc)=P((A∪B)c)=1−P(A∪B)이다.
따라서 P(Ac∩Bc)=1−[P(A)+P(B)−P(A∩B)]=1−P(A)−P(B)+P(A∩B)=(1−P(A))−P(B)(1−P(A))=(1−P(A))(1−P(B))=P(Ac)P(Bc)이다.
결론적으로 A와 B가 독립이라면, Ac와 Bc는 독립이다.
Problem
Give an example of 3 events A, B, C which are pairwise independent but not independent.
Sol
공정한 동전 2개를 던질 때, 첫 번째 동전이 앞면인 사건을 A, 두 번째 동전이 앞면인 사건을 B, 두 동전의 결과가 같은 사건을 C라 하자. 이때 각각의 확률은 P(A)=21,P(B)=21,P(C)=21이다.
두 사건씩 짝지어 보면, P(A∩B)=41=P(A)P(B)이고, A와 C가 모두 일어난다는 것은 첫 번째도 앞면, 두 번째도 앞면인 경우이므로 P(A∩C)=41=P(A)P(C)이다. 마찬가지로 P(B∩C)=41=P(B)P(C)이므로, A,B,C는 쌍방 독립(pairwise independent)이다.
하지만 세 사건의 동시 교집합을 구해보면, A와 B가 일어나면 C는 필연적으로 일어나므로 P(A∩B∩C)=P(A∩B)=41이다. 이는 각각의 확률을 모두 곱한 값인 P(A)P(B)P(C)=21×21×21=81과 같지 않다 (41=81).
결론적으로 P(A∩B∩C)=P(A)P(B)P(C)이므로, 이 세 사건은 쌍방 독립이지만 상호 독립(mutually independent)은 아니다.
Problem
Give an example of 3 events A, B, C which are not independent, yet satisfy P(A∩B∩C)=P(A)P(B)P(C).
Sol
P(A)=0이라면 어떠한 경우라도 P(A)P(B)P(C)=0가 성립한다. A∩B∩C는 공집합 이므로 P(A∩B∩C)=0이다.
이 경우에서 B=C라고 가정하면 P(A∩B∩C)=P(A)P(B)P(C)은 성립하지만 독립은 아니다.
3. Thinking Conditionally
Problem
A bag contains one marble which is either green or blue, with equal probabilities. A green marble is put in the bag (so there are 2 marbles now), and then a random marble is taken out. The marble taken out is green. What is the probability that the remaining marble is also green?
Sol
A : 처음 주머니에 있던 marble이 초록색, B : 주머니에서 꺼낸 marble이 초록색, C : 주머니에 남은 marble이 초록색
우리가 구해야하는 확률은 꺼낸 marble이 초록색일 때, 남은 marble이 초록색일 확률이기에 P(C∣B)를 구해야한다.
A와 Ac는 서로 배반하며, 합집합은 전체 표본공간이므로 C∩B=(C∩B∩A)∪(C∩B∩Ac)이다.
확률의 덧셈 법칙에 의해 P(C∩B)=P(C∩B∩A)+P(C∩B∩Ac), P(C∣B)=P(B)P(C∩B∩A)+P(C∩B∩Ac)이 성립한다.
결과론적으로 P(C∣B)=P(C∣B,A)P(A∣B)+P(C∣B,Ac)P(Ac∣B)이 성립한다.
처음부터 주머니에 있는 marble이 초록색(A)이라면, 남은 marble은 무조건 초록색이 된다. 따라서 P(C∣B,A)=1이다.
반대로 처음부터 주머니에 있는 marble이 초록색이 아닌데.(Ac), 꺼낸 marble이 초록색이라면 남은 marble은 무조건 파란색이다. 따라서 P(C∣B,Ac)=0이다.
따라서 P(C∣B)=1⋅P(A∣B)+0⋅P(Ac∣B)=P(A∣B)이다.
베이즈 정리를 사용하여 P(A∣B)=P(B)P(B∣A)P(A)=P(B∣A)P(A)+P(B∣Ac)P(Ac)P(B∣A)P(A)로 정리할 수 있다.
따라서 P(A∣B)=0.5+0.250.5=32이다.
Problem
A spam filter is designed by looking at commonly occurring phrases in spam. Suppose that 80% of email is spam. In 10% of the spam emails, the phrase “free money” is used, whereas this phrase is only used in 1% of non-spam emails. A new email has just arrived, which does mention “free money”. What is the probability that it is spam?
Sol
A를 스팸 메일, B를 free money가 포함된 메일이라고 정의하자.
우리가 구해야하는 확률은 P(A∣B)이다.
베이즈 정의에 따라 P(A∣B)=P(B)P(B∣A)P(A)=P(B∣A)P(A)+P(B∣Ac)P(Ac)P(B∣A)P(A)=0.0820.08≈0.9756이다.
Problem
Let G be the event that a certain individual is guilty of a certain robbery. In gathering evidence, it is learned that an event E1 occurred, and a little later it is also learned that another event E2 also occurred.
(a) Is it possible that individually, these pieces of evidence increase the chance of guilt (so P(G∣E1)>P(G) and P(G∣E2)>P(G)), but together they decrease the chance of guilt (so P(G∣E1,E2)<P(G))?
(b) Show that the probability of guilt given the evidence is the same regardless of whether we update our probabilities all at once, or in two steps (after getting the first piece of evidence, and again after getting the second piece of evidence). That is, we can either update all at once (computing P(G∣E1,E2) in one step), or we can first update based on E1, so that our new probability function is Pnew(A)=P(A∣E1), and then update based on E2 by computing Pnew(G∣E2).
Sol
(a)
범죄가 오후 1시에서 3시 사이에 저질러졌다고 가정해보자. E1을 용의자가 그날 오후 1시부터 2시까지 근처 카페에 있었다는 사건이라고 하고, E2를 용의자가 그날 오후 2시부터 3시까지 있었다는 사건이라고 하자.
E1, E2 모두 용의자가 현장 근처에 있기에 범행 기회가 있었음을 보여주는데 도움이 된다고 가정하면, P(G∣E1)>P(G), P(G∣E2)>P(G)가 성립한다.
그러나 오후 1시부터 3시까지 계속 카페에 있었다는 것은 용의자게에 범행 시간 전체에 대한 알리바이를 제공하므로 P(G∣E1∩E2)<P(G)가 된다.
(b)
Pnew(G∣E2)=Pnew(E2)Pnew(G,E2)=P(E2∣E1)P(G,E2∣E1)=P(E1,E2)/P(E1)P(G,E1,E2)/P(E1)=P(G∣E1,E2)
E1을 먼저 알고, 그 상태에서 E2를 아는 것과 처음부터 E1과 E2를 모두 알고있는 것은 같다.
Problem
A crime is committed by one of two suspects, A and B. Initially, there is equal evidence against both of them. In further investigation at the crime scene, it is found that the guilty party had a blood type found in 10% of the population. Suspect A does match this blood type, whereas the blood type of Suspect B is unknown.
(a) Given this new information, what is the probability that A is the guilty party?
(b) Given this new information, what is the probability that B's blood type matches that found at the crime scene?
Sol
(a)
A를 A가 범인, B=Ac를 B가 범인, E가 혈액형 일치인 사건이라고 가정해보자.
P(A∣E)=P(E)P(E∣A)P(A)=P(E∣A)P(A)+P(E∣B)P(B)P(E∣A)P(A)=(1×21)+(101×21)1×21=21+20121=1110
(b)
C가 사건 현장의 혈액형이 B와 일치하는 사건이라고 가정하면, P(C∣E)=P(C∣E,A)P(A∣E)+P(C∣E,B)P(B∣E)이다.
따라서 P(C∣E,A)P(A∣E)+P(C∣E,B)P(B∣E)=(101×1110)+(1×111)=112이다.
Problem
You are going to play 2 games of chess with an opponent whom you have never played against before (for the sake of this problem). Your opponent is equally likely to be a beginner, intermediate, or a master. Depending on which, your chances of winning an individual game are 90%, 50%, or 30%, respectively.
(a) What is your probability of winning the first game?
(b) Congratulations: you won the first game! Given this information, what is the probability that you will also win the second game (assume that, given the skill level of your opponent, the outcomes of the games are independent)?
(c) Explain the distinction between assuming that the outcomes of the games are independent and assuming that they are conditionally independent given the opponent’s skill level. Which of these assumptions seems more reasonable, and why?
Sol
ith 경기에서 이기는 사건을 Wi라고 정의하자.
(a)
Law of totla probatility에 의해, 첫번째 경기에서 이길 확률은 P(Wi)=31×0.9+31×0.5+31×0.3=3017 이다.
(a)는 기댓값 측면에서 접근해도 쉽게 풀린다.
(b)
P(W2∣W1)=P(W1)P(W2,W1)을 구해야 한다.
Law of totla probatility에 의해 P(W1,W2)=31P(W1,W2∣beginner)+31P(W1,W2∣intermediate)+31P(W1,W2∣master)이다.
실력이 주어졌을 때 W1과 W2는 조건부 독립이므로 P(W1,W2)=30.92+0.52+0.32=6023이다.
따라서 P(W2∣W1)=17/3023/60=3423 이다.
(c)
상대방의 실력을 알고 있다면 각 경기는 서로 독립이라고 가정할 수 있다. 상대방의 실력은 고정되어 있으므로 첫 번째 경기의 결과가 두 번째 경기의 결과에 영향을 주지 않기 때문이다.
반면 상대방의 실력을 모르는 경우에는 첫 번째 경기의 결과를 통해 상대방의 실력을 추측할 수 있다. 따라서 첫 번째 경기의 결과가 두 번째 경기의 승률에 영향을 줄 수 있다.
즉, 경기 자체가 서로 영향을 주는 것이 아니라, 첫 번째 경기 결과가 상대방의 실력에 대한 정보를 제공하기 때문에 두 번째 경기의 확률이 달라지는 것이다.