Probability question: Conditional Probability (Bayes' Theorem)

43 Views Asked by At

I have a few questions regarding Bayes' Theorem.

I have a sample of 18 fish (Salmon and Seabass). I measure their lightness and have a table below:

Lightness(L) 10  11  12  13  14  15 total
Salmon       2   3   1   2  1   1   10
Seabass      2   1   1   2  1   1    8

I have a couple of questions:

$$ \begin{aligned} P(L = 13) &= P(L = 13|Salmon)P(Salmon) + P(L=13|Seabass).P(Seabass) \\ &= (2/10).(10/18) + (2/8).(8/18) = 4/18 = 2/9 \end{aligned} $$


1.

$$P(L = 13 | Salmon) = (P(Salmon | L = 13). P(L = 13))/P(Salmon) \\ = {(2/4).(2/9)}/(10/18) = 1/5$$

If the above is correct, then would P(L = 13|Seabass) = 1 -1/5 = 4/5? However, I go through the same derivation as above and the result is different.

$$P(L = 13 | Seabass) = (P(Seabass | L = 13). P(L = 13))/P(Seabass) \\ = {(2/4).(2/9)}/(8/18) = 1/4$$


2.

Assume equal priors: $$P(Salmon|L = 13) = P(L=13|Salmon).P(Salmon)/P(L=13) \\ = (1/5).(1/2)/(2/9) = 9/20$$ Am I right? Thank you!

1

There are 1 best solutions below

1
On BEST ANSWER
  1. Your derivation is right, but $P(L = 13 | Salmon) + P(L = 13 | Salmon^c) \neq 1$. You just have,

$$ \begin{aligned} P(L = 13 | Salmon) + P(L = 13 | Salmon^c) &= \frac{P(L = 13, Salmon)}{P(Salmon)} + \frac{P(L = 13, Salmon^c)}{P(Salmon^c)} \\ &= \frac{P(L = 13, Salmon)}{P(Salmon)} + \frac{P(L = 13, Salmon^c)}{1 - P(Salmon)} \end{aligned} $$

  1. Exactly.