Say A is independent of itself, then
\[P(A)=P(A\cap A) = P(A)P(A)=P(A)^2\]
and this implies P(A)=0 or 1. So the answer is yes, if P(A)=0 or 1.
\[ \begin{aligned} &S=(A\cup B) \cup (A^c\cap B^c)\\ &1=P(S) = P[(A\cup B)\cup (A^c\cap B^c)]=\\ & P(A\cup B) + P(A^c\cap B^c) \\ &P(A^c\cap B^c) = 1-P(A\cup B)=\\ &1-[P(A)+P(B)-P(A\cap B)] = \\ &1-[P(A)+P(B)-P(A)P(B)] = \\ &[1-PA(A)][1-P(B)]=P(A^c)P(B^c)\\ \end{aligned} \]
There are 10 men and 12 women in a room. Three of them are selected at random to serve on a committee. Find the probabilities that none, one, two or all three of them are women.
Let \(F_i\) be the event ïth person selected is a women. Then
\[P(\text{all are women})=P(F_1)P(F_2|F_1)P(F_3|F_1F_2)=\\\frac{12}{22}\frac{11}{21}\frac{10}{20}=\frac{1320}{9240}=\frac{1}{7}\]
and
\[P(\text{none are women})=P(F_1^c)P(F_2^c|F_1^c)P(F_3^c|F_1^cF_2^c)=\\\frac{10}{22}\frac{9}{21}\frac{8}{20}=\frac{720}{9240}=\frac6{77}\]
Next we have
\[ \begin{aligned} &P(\text{one is a women}) = \\ &P(\text{only first is a women})+P(\text{only second is a women})+P(\text{only third is a women}) = \\ &P(F_1)P(F_2^c|F_1)P(F_3^c|F_1F_2^c) = \\ &\frac{12}{22}\frac{10}{21}\frac{8}{20}+\frac{10}{22}\frac{12}{21}\frac{8}{18}+\frac{10}{22}\frac{9}{21}\frac{12}{20}=3\frac{1080}{9240}=\frac{27}{77} \end{aligned} \]
and finally
\[ \begin{aligned} &P(\text{exactly two are women}) = \\ &P(\text{only first is a man})+P(\text{only second is a man})+P(\text{only third is a man}) = \\ &P(F_1)P(F_2^c|F_1)P(F_3^c|F_1F_2^c) = \\ &\frac{10}{22}\frac{12}{21}\frac{11}{20}+\frac{12}{22}\frac{10}{21}\frac{11}{18}+\frac{12}{22}\frac{11}{21}\frac{10}{20}=3\frac{1320}{9240}=\frac{3}{7} \end{aligned} \]
Note that these are all the possibilities, so they have to add up to 1:
\[6+11+27+33 =77\]
Maria flips a fair coin until the first time she gets heads. Let n be the number of flips she needs. If n is an even number Paul flips his coin once, if n is an odd number he flips his coin twice. If we are told that Paul got no heads, what is the probability that Maria got heads on the second try?
Let \(A_n\) be the event that Maria got heads on the nth try, and let \(B\) be the event that Paul got no heads. We want to find \(P(A_2|B)\). Now by Bayes’ formula
\[P(A_2|B)=\frac{P(B|A_2)P(A_2)}{\sum_{n=1}^{\infty}P(B|A_n)P(A_n)}\]
Also
\[P(A_n)=P(T)P(T)...P(T)P(H)=1/2^n\]
If n is even, so Paul flips a single coin, and so \(P(B|A_n)=1/2\). If n is odd Paul flips two coins, and we have \(P(B|A_n)=1/4\). Therefore
\[ \begin{aligned} &\sum_{n=1}^{\infty}P(B|A_n)P(A_n) = \\ &\sum_{n=0}^{\infty}P(B|A_{2n+1})P(A_{2n+1})+\sum_{n=1}^{\infty}P(B|A_{2n})P(A_{2n}) = \\ &\sum_{n=0}^{\infty}\frac14\frac1{2^{2n+1}}+\sum_{n=1}^{\infty}\frac12\frac1{2^{2n}} = \\ &\frac12\left[\sum_{n=0}^{\infty}\frac1{2^{2n+2}}+\sum_{n=1}^{\infty}\frac1{2^{2n}}\right] = \\ &\frac12\left[\sum_{n=0}^{\infty}\frac1{4^{n+1}}+\sum_{n=1}^{\infty}\frac1{4^{n}}\right] = \\ &\sum_{n=1}^{\infty}\frac1{4^{n}}=\frac{1/4}{1-1/4}=\frac1{3} \end{aligned} \] and so
\[P(A_2|B)=\frac{P(B|A_2)P(A_2)}{\sum_{n=1}^{\infty}P(B|A_n)P(A_n)}=\frac{1/4*1/2}{1/3}=\frac{3}{8}\]
In this problem a word is any combination of letters, meaningful or not. In all the problems below you want to use all the letters.
\[4!=24\]
\[5!/2=24=60\]
\[8!/2!/3!/21=1680\]
We can use the inclusion-exclusion formula for this. To start there are \(\frac{8!}{3!3!}=1120\) total words possible.
Next we take out those words that have two a’s together, and there are \(\frac{7!}{3!}=420\) of those. Same for two b’s.
Then we add back in the cases of three a’s, three b’s or two a’s and two b’s, subtract the cases with three a’s, two b’s or two a’s, three b’s and finally add the (24) cases of all a’s together and all b’s together. So we find a total of
\[\frac{8!}{3!3!}-2\frac{7!}{3!}+2\frac{6!}{3!2!}+6!-2*5!+4! = 184\]
Let’s see whether we can verify this via simulation:
numword=function(l) {
n=1e4
m=length(l)
A=matrix(l, 1, m)
for(i in 1:n) {
z=sample(l) # any word
if(any(z[-1]==z[-m])) next
# two neighboring letters the same, not a good word
newword=TRUE
for(j in 1:nrow(A)) {
if(all(z==A[j, ])) { # already have word in list
newword=FALSE
break
}
}
if(newword) A=rbind(A, z) # add word to list
}
nrow(A) # number of words
}
numword(c("a", "b", "a", "b", "a", "b", "c", "d"))
## [1] 184