Stat 110 Strategic Practice 2 Solutions, Fall 2011

Prettypotato·2026년 9월 19일

Statistics 110

목록 보기
7/18

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
AiA_i를 i 계절에 생일이 없는 경우라고 하자. 이 때 우리가 구해야하는 확률은 1−P(A1∪A2∪A3∪A4)1 - P(A_1 \cup A_2 \cup A_3 \cup A_4)이다.

계절의 대칭성에 따라 우리가 구해야하는 식은 다음과 같다.

P(A1∪A2∪A3∪A4)=∑i=14P(Ai)−∑1≤i<j≤4P(Ai∩Aj)+∑1≤i<j<k≤4P(Ai∩Aj∩Ak)−P(A1∩A2∩A3∩A4)=4P(A1)−6P(A1∩A2)+4P(A1∩A2∩A3)P(A_1 \cup A_2 \cup A_3 \cup A_4) \\= \sum_{i=1}^{4} P(A_i) - \sum_{1 \le i < j \le 4} P(A_i \cap A_j) + \sum_{1 \le i < j < k \le 4} P(A_i \cap A_j \cap A_k) - P(A_1 \cap A_2 \cap A_3 \cap A_4) \\= 4P(A_1) - 6P(A_1 \cap A_2) + 4P(A_1 \cap A_2 \cap A_3)

P(A1∩A2∩A3∩A4)P(A_1 \cap A_2 \cap A_3 \cap A_4)은 모든 계절에 생일이 없는 경우이기에 0이다.

P(A1)P(A_1)은 7명 모두 특정 1개 계절에 생일이 없을 확률이므로, 347\frac{3}{4}^7이다.

P(A1∩A2)P(A_1 \cap A_2)는 7명 모두 특정 2개 계절에 생일이 없을 확률 이므로, 247=127\frac{2}{4}^7 = \frac{1}{2}^7이다.

P(A1∩A2∩A3)P(A_1 \cap A_2 \cap A_3)는 7명 모두 1개의 계절에만 생일이 몰려있어야 하므로 147\frac{1}{4}^7이다.

따라서 1−P(A1∪A2∪A3∪A4)=1−(4(34)7−6(12)7+4(14)7)≈0.5131- P(A_1 \cup A_2 \cup A_3 \cup A_4) = 1-(4\left(\frac{3}{4}\right)^7 - 6\left(\frac{1}{2}\right)^7 + 4\left(\frac{1}{4}\right)^7) \approx 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
BiB_i를 i번째 요일에 수업이 전혀 없는 사건이라고 정의하자.

이 때 우리가 구해야하는 확률은 1−P(B1∪B2∪B3∪B4∪B5)1 - P(B_1 \cup B_2 \cup B_3 \cup B_4 \cup B_5) 이다.

P(B1∪B2∪B3∪B4∪B5)=∑P(Bi)−∑P(Bi∩Bj)+∑P(Bi∩Bj∩Bk)−⋯=5P(B1)−10P(B1∩B2)+10P(B1∩B2∩B3)P(B_1 \cup B_2 \cup B_3 \cup B_4 \cup B_5) = \sum P(B_i) - \sum P(B_i \cap B_j) + \sum P(B_i \cap B_j \cap B_k) - \cdots = 5P(B_1) - 10P(B_1 \cap B_2) + 10P(B_1 \cap B_2 \cap B_3)이다.

이 때 4개 이상의 교집합의 확률이 0이다. 4개 이상의 요일에 수업이 하나도 없다면, 남은 요일에 수업을 7개를 들어야 하는데 하루에 총 6개 수업이 열리므로 확률이 0이다.

P(B1)P(B_1)은 1개 요일을 제외하고 나머지 4개 요일 중에서 7개를 골라야 하므로 (247)(307)\frac{\binom{24}{7}}{\binom{30}{7}}이다.

P(B1∩B2)P(B_1 \cap B_2)는 특정 2개 요일에 수업이 없을 확률이므로, (187)(307)\frac{\binom{18}{7}}{\binom{30}{7}}이다.

P(B1∩B2∩B3)P(B_1 \cap B_2 \cap B_3)는 특정 3개 요일에 수업이 없을 확률이므로, (127)(307)\frac{\binom{12}{7}}{\binom{30}{7}}이다.

따라서 P(B1∪⋯∪B5)=5((247)(307))−10((187)(307))+10((127)(307))=263377P(B_1 \cup \dots \cup B_5) = 5\left(\frac{\binom{24}{7}}{\binom{30}{7}}\right) - 10\left(\frac{\binom{18}{7}}{\binom{30}{7}}\right) + 10\left(\frac{\binom{12}{7}}{\binom{30}{7}}\right) = \frac{263}{377}이며, 최종적으로 1−263377=114377≈0.3021 - \frac{263}{377} = \frac{114}{377} \approx 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))2P(A \cap A) = P(A) \cdot P(A)= (P(A))^2을 성립해야한다.

위 식을 정리하면 (P(A))2−P(A)=0,P(A)(1−P(A))=0(P(A))^2 - P(A) = 0, P(A)(1 - P(A)) = 0이므로 P(A)P(A)가 0 또는 1이여야 한다.

P(A)=0P(A)=0인 경우: 사건 AA는 일어날 확률이 0인 사건이다. 따라서 AA가 일어났다고 해도 이후 확률에는 변화가 없다.

P(A)=1P(A)=1인 경우: 사건 AA는 일어날 확률이 1인 사건이다. 따라서 AA가 일어났다는 사실을 알아도 이후 예측에는 변화가 없다.

Problem
Is it always true that if AA and BB are independent events, then AcA^c and BcB^c are independent events? Show that it is, or give a counterexample.

Sol
독립은 P(A∩B)=P(A)P(B)P(A \cap B) = P(A)P(B)이다. 따라서 우리가 증명해야하는 것은 P(Ac∩Bc)=P(Ac)P(Bc)P(A^c \cap B^c) = P(A^c)P(B^c)이다.

드모르간 법칙에 의해 Ac∩Bc=(A∪B)cA^c \cap B^c = (A \cup B)^c이 성립한다. P(Ac∩Bc)=P((A∪B)c)=1−P(A∪B)P(A^c \cap B^c) = P((A \cup B)^c)= 1 - P(A \cup 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)P(A^c \cap B^c) = 1 - [P(A) + P(B) - P(A \cap B)] = 1 - P(A) - P(B) + P(A \cap B) = (1 - P(A)) - P(B)(1 - P(A)) = (1 - P(A))(1 - P(B))=P(A^c)P(B^c)이다.

결론적으로 AA와 BB가 독립이라면, AcA^c와 BcB^c는 독립이다.

Problem
Give an example of 3 events AA, BB, CC which are pairwise independent but not independent.

Sol
공정한 동전 2개를 던질 때, 첫 번째 동전이 앞면인 사건을 AA, 두 번째 동전이 앞면인 사건을 BB, 두 동전의 결과가 같은 사건을 CC라 하자. 이때 각각의 확률은 P(A)=12,P(B)=12,P(C)=12P(A) = \frac{1}{2}, \quad P(B) = \frac{1}{2}, \quad P(C) = \frac{1}{2}이다.

두 사건씩 짝지어 보면, P(A∩B)=14=P(A)P(B)P(A \cap B) = \frac{1}{4} = P(A)P(B)이고, AA와 CC가 모두 일어난다는 것은 첫 번째도 앞면, 두 번째도 앞면인 경우이므로 P(A∩C)=14=P(A)P(C)P(A \cap C) = \frac{1}{4} = P(A)P(C)이다. 마찬가지로 P(B∩C)=14=P(B)P(C)P(B \cap C) = \frac{1}{4} = P(B)P(C)이므로, A,B,CA, B, C는 쌍방 독립(pairwise independent)이다.

하지만 세 사건의 동시 교집합을 구해보면, AA와 BB가 일어나면 CC는 필연적으로 일어나므로 P(A∩B∩C)=P(A∩B)=14P(A \cap B \cap C) = P(A \cap B) = \frac{1}{4}이다. 이는 각각의 확률을 모두 곱한 값인 P(A)P(B)P(C)=12×12×12=18P(A)P(B)P(C) = \frac{1}{2} \times \frac{1}{2} \times \frac{1}{2} = \frac{1}{8}과 같지 않다 (14≠18\frac{1}{4} \neq \frac{1}{8}).

결론적으로 P(A∩B∩C)≠P(A)P(B)P(C)P(A \cap B \cap C) \neq P(A)P(B)P(C)이므로, 이 세 사건은 쌍방 독립이지만 상호 독립(mutually independent)은 아니다.

Problem
Give an example of 3 events AA, BB, CC which are not independent, yet satisfy P(A∩B∩C)=P(A)P(B)P(C)P(A \cap B \cap C) = P(A)P(B)P(C).

Sol
P(A)=0P(A) = 0이라면 어떠한 경우라도 P(A)P(B)P(C)=0P(A)P(B)P(C) = 0가 성립한다. A∩B∩CA \cap B \cap C는 공집합 이므로 P(A∩B∩C)=0P(A \cap B \cap C) = 0이다.

이 경우에서 B=CB=C라고 가정하면 P(A∩B∩C)=P(A)P(B)P(C)P(A \cap B \cap 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
AA : 처음 주머니에 있던 marble이 초록색, BB : 주머니에서 꺼낸 marble이 초록색, CC : 주머니에 남은 marble이 초록색

우리가 구해야하는 확률은 꺼낸 marble이 초록색일 때, 남은 marble이 초록색일 확률이기에 P(C∣B)P(C\vert{}B)를 구해야한다.

AA와 AcA^c는 서로 배반하며, 합집합은 전체 표본공간이므로 C∩B=(C∩B∩A)∪(C∩B∩Ac)C \cap B = (C \cap B \cap A) \cup (C \cap B \cap A^c)이다.

확률의 덧셈 법칙에 의해 P(C∩B)=P(C∩B∩A)+P(C∩B∩Ac)P(C \cap B) = P(C \cap B \cap A) + P(C \cap B \cap A^c), P(C∣B)=P(C∩B∩A)+P(C∩B∩Ac)P(B)P(C\vert{}B) = \frac{P(C \cap B \cap A) + P(C \cap B \cap A^c)}{P(B)}이 성립한다.

결과론적으로 P(C∣B)=P(C∣B,A)P(A∣B)+P(C∣B,Ac)P(Ac∣B)P(C\vert{}B) = P(C\vert{}B, A)P(A\vert{}B) + P(C\vert{}B, A^c)P(A^c\vert{}B)이 성립한다.

처음부터 주머니에 있는 marble이 초록색(AA)이라면, 남은 marble은 무조건 초록색이 된다. 따라서 P(C∣B,A)=1P(C\vert{}B, A) = 1이다.

반대로 처음부터 주머니에 있는 marble이 초록색이 아닌데.(AcA^c), 꺼낸 marble이 초록색이라면 남은 marble은 무조건 파란색이다. 따라서 P(C∣B,Ac)=0P(C\vert{}B, A^c) = 0이다.

따라서 P(C∣B)=1⋅P(A∣B)+0⋅P(Ac∣B)=P(A∣B)P(C\vert{}B) = 1 \cdot P(A\vert{}B) + 0 \cdot P(A^c\vert{}B) = P(A\vert{}B)이다.

베이즈 정리를 사용하여 P(A∣B)=P(B∣A)P(A)P(B)=P(B∣A)P(A)P(B∣A)P(A)+P(B∣Ac)P(Ac)P(A\vert{}B) = \frac{P(B\vert{}A)P(A)}{P(B)} = \frac{P(B\vert{}A)P(A)}{P(B\vert{}A)P(A) + P(B\vert{}A^c)P(A^c)}로 정리할 수 있다.

따라서 P(A∣B)=0.50.5+0.25=23P(A\vert{}B) = \frac{0.5}{0.5+0.25} = \frac{2}{3}이다.

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
AA를 스팸 메일, BB를 free money가 포함된 메일이라고 정의하자.

우리가 구해야하는 확률은 P(A∣B)P(A\vert{}B)이다.

베이즈 정의에 따라 P(A∣B)=P(B∣A)P(A)P(B)=P(B∣A)P(A)P(B∣A)P(A)+P(B∣Ac)P(Ac)=0.080.082≈0.9756P(A\vert{}B) = \frac{P(B\vert{}A)P(A)}{P(B)} = \frac{P(B\vert{}A)P(A)}{P(B\vert{}A)P(A)+P(B\vert{}A^c)P(A^c)} = \frac{0.08}{0.082} \approx 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 E1E_1 occurred, and a little later it is also learned that another event E2E_2 also occurred.

(a) Is it possible that individually, these pieces of evidence increase the chance of guilt (so P(G∣E1)>P(G)P(G|E_1) > P(G) and P(G∣E2)>P(G)P(G|E_2) > P(G)), but together they decrease the chance of guilt (so P(G∣E1,E2)<P(G)P(G|E_1, E_2) < 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)P(G|E_1, E_2) in one step), or we can first update based on E1E_1, so that our new probability function is Pnew(A)=P(A∣E1)P_{\text{new}}(A) = P(A|E_1), and then update based on E2E_2 by computing Pnew(G∣E2)P_{\text{new}}(G|E_2).

Sol
(a)
범죄가 오후 1시에서 3시 사이에 저질러졌다고 가정해보자. E1E_1을 용의자가 그날 오후 1시부터 2시까지 근처 카페에 있었다는 사건이라고 하고, E2E_2를 용의자가 그날 오후 2시부터 3시까지 있었다는 사건이라고 하자.

E1E_1, E2E_2 모두 용의자가 현장 근처에 있기에 범행 기회가 있었음을 보여주는데 도움이 된다고 가정하면, P(G∣E1)>P(G)P(G\vert{}E_1) > P(G), P(G∣E2)>P(G)P(G\vert{}E_2) > P(G)가 성립한다.

그러나 오후 1시부터 3시까지 계속 카페에 있었다는 것은 용의자게에 범행 시간 전체에 대한 알리바이를 제공하므로 P(G∣E1∩E2)<P(G)P(G\vert{}E_1 \cap E_2) < P(G)가 된다.

(b)
Pnew(G∣E2)=Pnew(G,E2)Pnew(E2)=P(G,E2∣E1)P(E2∣E1)=P(G,E1,E2)/P(E1)P(E1,E2)/P(E1)=P(G∣E1,E2)P_{\text{new}}(G\vert{}E_2) = \frac{P_{\text{new}}(G, E_2)}{P_{\text{new}}(E_2)} = \frac{P(G, E_2\vert{}E_1)}{P(E_2\vert{}E_1)} = \frac{P(G, E_1, E_2)/P(E_1)}{P(E_1, E_2)/P(E_1)} = P(G\vert{}E_1, E_2)

E1E_1을 먼저 알고, 그 상태에서 E2E_2를 아는 것과 처음부터 E1E_1과 E2E_2를 모두 알고있는 것은 같다.

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)
AA를 A가 범인, B=AcB = A^c를 B가 범인, EE가 혈액형 일치인 사건이라고 가정해보자.

P(A∣E)=P(E∣A)P(A)P(E)=P(E∣A)P(A)P(E∣A)P(A)+P(E∣B)P(B)=1×12(1×12)+(110×12)=1212+120=1011P(A\vert{}E) = \frac{P(E\vert{}A)P(A)}{P(E)}=\frac{P(E\vert{}A)P(A)}{P(E\vert{}A)P(A) + P(E\vert{}B)P(B)} = \frac{1 \times \frac{1}{2}}{\left(1 \times \frac{1}{2}\right) + \left(\frac{1}{10} \times \frac{1}{2}\right)} = \frac{\frac{1}{2}}{\frac{1}{2} + \frac{1}{20}} = \frac{10}{11}

(b)
CC가 사건 현장의 혈액형이 B와 일치하는 사건이라고 가정하면, P(C∣E)=P(C∣E,A)P(A∣E)+P(C∣E,B)P(B∣E)P(C\vert{}E) = P(C\vert{}E, A)P(A\vert{}E) + P(C\vert{}E, B)P(B\vert{}E)이다.

따라서 P(C∣E,A)P(A∣E)+P(C∣E,B)P(B∣E)=(110×1011)+(1×111)=211P(C\vert{}E, A)P(A\vert{}E) + P(C\vert{}E, B)P(B\vert{}E) = \left(\frac{1}{10} \times \frac{10}{11}\right) + \left(1 \times \frac{1}{11}\right) = \frac{2}{11}이다.

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
ithi^{th} 경기에서 이기는 사건을 WiW_i라고 정의하자.
(a)
Law of totla probatility에 의해, 첫번째 경기에서 이길 확률은 P(Wi)=13×0.9+13×0.5+13×0.3=1730P(W_i) = \frac{1}{3} \times 0.9 + \frac{1}{3} \times 0.5 + \frac{1}{3} \times 0.3 = \frac{17}{30} 이다.

(a)는 기댓값 측면에서 접근해도 쉽게 풀린다.

(b)
P(W2∣W1)=P(W2,W1)P(W1)P(W_2\vert{}W_1) = \frac{P(W_2, W_1)}{P(W_1)}을 구해야 한다.

Law of totla probatility에 의해 P(W1,W2)=13P(W1,W2∣beginner)+13P(W1,W2∣intermediate)+13P(W1,W2∣master)P(W_1, W_2) = \frac{1}{3}P(W_1, W_2\vert{}\text{beginner}) + \frac{1}{3}P(W_1, W_2\vert{}\text{intermediate}) + \frac{1}{3}P(W_1, W_2\vert{}\text{master})이다.

실력이 주어졌을 때 W1W_1과 W2W_2는 조건부 독립이므로 P(W1,W2)=0.92+0.52+0.323=2360P(W_1, W_2) = \frac{0.9^2 + 0.5^2 + 0.3^2}{3} = \frac{23}{60}이다.

따라서 P(W2∣W1)=23/6017/30=2334P(W_2\vert{}W_1) = \frac{23/60}{17/30} = \frac{23}{34} 이다.

(c)
상대방의 실력을 알고 있다면 각 경기는 서로 독립이라고 가정할 수 있다. 상대방의 실력은 고정되어 있으므로 첫 번째 경기의 결과가 두 번째 경기의 결과에 영향을 주지 않기 때문이다.

반면 상대방의 실력을 모르는 경우에는 첫 번째 경기의 결과를 통해 상대방의 실력을 추측할 수 있다. 따라서 첫 번째 경기의 결과가 두 번째 경기의 승률에 영향을 줄 수 있다.

즉, 경기 자체가 서로 영향을 주는 것이 아니라, 첫 번째 경기 결과가 상대방의 실력에 대한 정보를 제공하기 때문에 두 번째 경기의 확률이 달라지는 것이다.

0개의 댓글