\[P(B|A) = \frac{P(A|B) \times P(B)}{P(A)}\]
\(P(H_A | H_1) = \frac{1}{16}\)
\[P(H_A | H_1) = \frac{P(H_A | H_1) \times P(H_1)}{P(H_A)} = \frac{\frac{1}{16} \times \frac{1}{2}}{\frac{1}{32}} = 1\]
If an aircraft is present in a certain area, a radar correctly registers its presence with probability \(0.99\). If it is not present, the radar falsely registers an aircraft presence with probability \(0.10\). We assume that an aircraft is present with probability \(0.05\). What is the probability that an airplane is present and the radar correctly detects it?
\(P(A|B)\)
\[ \begin{align} P(A|B) & = \frac{P(A) \times P(B|A)}{P(B)} \\ & = \frac{P(A) \times P(B|A)}{P(A) \times P(B|A) + P(A = 0) \times(B | A = 0)} \\ & = \frac{0.05 \times 0.99}{0.05 \times 0.99 + 0.95 \times 0.1} \\ & \approx 0.3426 \end{align} \]
\(P(B | A = 0) = 0.05\)
\[ \begin{align} P(A|B) & = \frac{P(A) \times P(B|A)}{P(B)} \\ & = \frac{P(A) \times P(B|A)}{P(A) \times P(B|A) + P(A = 0) \times(B | A = 0)} \\ & = \frac{0.001 \times 0.95}{0.001 \times 0.95 + 0.999 \times 0.05} \\ & = 0.0187 \end{align} \]
Data
\[P(\text{H is true}| \text{data}) = \frac{P(\text{data} | \text{H is true}) \times P(\text{H is true})}{P(\text{data})}\]
\[ \begin{align} P(A|B) & = \frac{P(A) \times P(B|A)}{P(B)} \\ & = \frac{P(A) \times P(B|A)}{P(A) \times P(B|A) + P(A = 0) \times(B | A = 0)} \\ & = \frac{0.001 \times 0.95}{0.001 \times 0.95 + 0.999 \times 0.05} \\ & = 0.0187 \end{align} \]
Prior probability
\[P(A) = 0.4, P(B) = 0.4, P(C) = 0.2\]
Likelihood
\[P(D|A) = 0.5, P(D|B) = 0.6, P(D|C) = 0.9\]
Posterior probability
\[P(A|D), P(B|D), P(C|D)\]
\[P(A|D) = \frac{P(D|A) \times P(A)}{P(D)}\] \[P(B|D) = \frac{P(D|B) \times P(B)}{P(D)}\] \[P(C|D) = \frac{P(D|C) \times P(C)}{P(D)}\]
\[ \begin{align} P(D) & = P(D|A) \times P(A) + P(D|B) \times P(B) + P(D|C) \times P(C) \\ & = 0.5 \times 0.4 + 0.6 \times 0.4 + 0.9 \times 0.2 \\ & = 0.62 \end{align} \]
\[P(A|D) = \frac{P(D|A) \times P(A)}{P(D)} = \frac{0.5 \times 0.4}{0.62} = \frac{0.2}{0.62}\]
\[P(B|D) = \frac{P(D|B) \times P(B)}{P(D)} = \frac{0.6 \times 0.4}{0.62} = \frac{0.24}{0.62}\]
\[P(C|D) = \frac{P(D|C) \times P(C)}{P(D)} = \frac{0.9 \times 0.2}{0.62} = \frac{0.18}{0.62}\]
| hypothesis | prior | likelihood | Bayes numerator | posterior |
|---|---|---|---|---|
| \(H\) | \(P(H)\) | \(P(D\mid H)\) | \(P(D \mid H) \times P(H)\) | \(P(H \mid D)\) |
| A | 0.4 | 0.5 | 0.2 | 0.3226 |
| B | 0.4 | 0.6 | 0.24 | 0.3871 |
| C | 0.2 | 0.9 | 0.18 | 0.2903 |
| total | 1 | 0.62 | 1 |
\[P(\text{hypothesis}| \text{data}) = \frac{P(\text{data} | \text{hypothesis}) \times P(\text{hypothesis})}{P(\text{data})}\]
\[P(H|D) = \frac{P(D | H) \times P(H)}{P(D)}\]
\[P(\text{hypothesis}| \text{data}) \propto P(\text{data} | \text{hypothesis}) \times P(\text{hypothesis})\]
\[\text{posterior} \propto \text{likelihood} \times \text{prior}\]
\(P(B| A = 0) =\) probability of a plane hitting if terrorists are not attacking Manhattan skyscrapers
\[ \begin{align} P(A|B) &= \frac{P(B|A) \times P(A)}{P(B)} \\ &= \frac{P(B|A) \times P(A)}{P(B|A) \times P(A) + P(B| A = 0) \times P(A=0)} \\ & = \frac{0.005 \times 1}{0.005 \times 1 + 0.008 \times 0.995} \\ & \approx 0.38 \end{align} \]
\[ \begin{align} P(A|B) &= \frac{P(B|A) \times P(A)}{P(B)} \\ &= \frac{P(B|A) \times P(A)}{P(B|A) \times P(A) + P(B| A = 0) \times P(A=0)} \\ & = \frac{1 \times 0.38}{01 \times 0.38 + 0.008 \times 0.62} \\ & \approx .9999 \end{align} \]
Effect on posterior
\[P(\text{hypothesis}| \text{data}) = \frac{P(\text{data} | \text{hypothesis}) \times P(\text{hypothesis})}{P(\text{data})}\]
\[\text{posterior} \propto \text{likelihood} \times \text{prior}\]
I think \(\theta\) is between 0.45 and 0.65 with 50% probability.
I think \(\theta\) follows a \(\text{Beta}(8, 6)\) distribution.
\[P(H|D) = \frac{P(D | H) \times P(H)}{P(D)}\]
Frequentists
\[L(H | D) = P(D|H)\]
You run a two-sample \(t\)-test for equal means, with \(\alpha = 0.05\) and obtain a p-value of 0.04. What are the odds that the two samples are drawn from distributions with the same mean?
With a p-value of less than 0.05, we reject the null hypothesis that the difference in means between the two samples is zero.
There is a 95% probability that the difference in means between the two samples falls between \([-.02, .03]\).