---
# System prepended metadata

title: Untitled

---

## TASK 3
1) $P(L=s | S=I)$
$P(L=s | S=I) = \frac{P(S=l | L=s) * P(L=s)}{P(S=l)}$

$P(S=l) = 0.725$

$P(G=g_1) = 0,362$
$P(G=g_2) = 0,2884$
$P(G=g_3) = 0,3496$

$P(L=s) = \sum_{g \in G} P(L=s, G=g)*P(G=g) = 0.497664$

$P(L=s | S=l) = \frac{P(L=s,S=l)}{P(S=l)} = \frac{P(L=s|G)*P(G|D,I)*P(S=l|I)*P(I)*P(D)}{P(S=l)} = \\ = \sum_{i,d,g}\frac{P(L=s|G=g)*P(G=g|D=d,I=i)*P(S=l|I=i)*P(I=i)*P(D=d)}{P(S=l)} = \\ = \frac{1}{P(S=l)} \sum_{i,d,g}P(L=s|G=g)*P(G=g,D=d,I=i)*P(S=l|I=i) =$
$= \frac{1}{P(S=l)} \sum_{i,d,g} \frac{P(L=s, G=g)}{P(G=g)} * P(G=g,D=d,I=i) * \frac{P(S=l, I=i)}{P(I=i)}$

1. $i = 0, d = 0, g = 1 => P = $
2. $i = 0, d = 0, g = 2 => P = $
3. $i = 0, d = 0, g = 3 => P = $
4. $i = 0, d = 1, g = 1 => P = $
5. $i = 0, d = 1, g = 2 => P = $
6. $i = 0, d = 1, g = 3 => P = $
7. $i = 1, d = 0, g = 1 => P = $
8. $i = 1, d = 0, g = 2 => P = $
9. $i = 1, d = 0, g = 3 => P = $
10. $i = 1, d = 1, g = 1 => P = $
11. $i = 1, d = 1, g = 2 => P = $
12. $i = 1, d = 1, g = 3 => P = $

$P(L=s | S=l) = \frac{}{P(S=l)} = \frac{}{0.725}$


$P(L=strong|G)*P(G|D,I)$



$P(L=strong|do(D=easy)) = P(L=strong) = \\ P(L=strong|G)*P(G|D=easy,I)*P(D=easy)*P(I) = \\
P(D=easy)*\sum_{i,g}P(L=strong|G=g)*P(G=g|D=easy,I=i)*P(I=i)$
