# 309553032_林育駿_hw03 ###### tags: `Biostatistics` ## 1. ### (a) $P(B|A) = \frac{P(A|B)\times P(B)}{P(A)}=\frac{\frac{P(A\cap B)}{P(B)}\times P(B)}{P(A)}=\frac{0.082}{0.138}=59.42\%$ ### (b) $P(A|B)=\frac{P(B|A)\times P(A)}{P(B)}=\frac{\frac{P(A\cap B)}{P(A)}\times P(A)}{P(B)}=\frac{P(A\cap B)}{P(B)}=\frac{0.082}{0.261}=31.42\%$ ### (c\) No. One definition of independence between two events A and B is that $$P(A|B)=P(A)=P(A|U),\ U:universe$$ In this case, $P(A)=0.138\neq 0.314=P(A|B)$, so events A and B are not independent. ## 2. ### (a) 因資料來源不同,不同 column 不可相加。 ### (b) $P(E|D)=\frac{273}{989}=27.60\%$ $P(E|D')=\frac{2641}{9901}=26.67\%$ the ratio is $\frac{27.60}{26.67}=1.03$ E與D呈現正相關,因為E在D中的比例比在D'中更高。 ## 3. ### (a) D: Complication E: Fragmin $RR = \frac{P(D|E)}{P(D|E^c)}=\frac{42/1518}{73/1473}=\frac{42\times 1473}{1518\times 73}=55.83\%$ ### (b) odds for exposed group: $\frac{P(D|E)}{P(D^c|E)}=\frac{42/1518}{1476/1518}=\frac{42}{1476}=0.02845$ odds for non-exposed group: $\frac{P(D|E^c)}{P(D^c|E^c)}=\frac{73}{1473}=0.04955$ odds ratio: $\frac{0.02845}{0.04955}=57.42\%$, which is far from 1, it means that influences the disease status. ## 4. ### (a) $1-(0.05+0.1+0.6+0.15)=0.1$ ### (b) $P(X\leq 8)=0.75$ The probability of $X\leq 8=0.75$ ### (c\) $P(X\lt 8)=0.15$ ### (d) $P(X\geq 7)=0.95$ ### (e) $P(X\gt 7)=0.85$ ## 5. goal is to solve $P(C|D)$. $P(C|D)=\frac{P(D|C)\times P(C)}{P(D)}$, we have $P(D|C), P(C)$, now we have to find $P(D)$ $\because U=A\cup B\cup C$ $\therefore P(D)=P(D\cap A)+P(D\cap B)+P(D\cap C)$ $=P(D|A)\times P(A)+P(D|B)\times P(B)+P(D|C)\times P(C)$ $=0.025\times 0.40+0.015\times 0.30 +0.012\times 0.30$ $=0.0181$ $P(C|D)=\frac{P(D|C)\times P(C)}{P(D)}=\frac{0.012\times 0.30}{0.0181}=19.89\%$