Cho \(P\left( A \right) = \frac{2}{5};{\rm{ }}P\left( B \right) = \frac{1}{3};{\rm{ }}P\left( {A \cup B} \right) = \frac{1}{2}\). Tính \(P\left( {A|B} \right)\) và \(P\left( {B|A} \right)\).
Ta có \(P\left( {A \cup B} \right) = P\left( A \right) + P\left( B \right) - P\left( {AB} \right)\) do đó \(\frac{2}{5} + \frac{1}{3} - P\left( {AB} \right) = \frac{1}{2} \Leftrightarrow P\left( {AB} \right) = \frac{7}{{30}}\). Suy ra \(P\left( {A|B} \right) = \frac{{P\left( {AB} \right)}}{{P\left( B \right)}} = \frac{7}{{30}}:\frac{1}{3} = \frac{7}{{10}}\); \(P\left( {B|A} \right) = \frac{{P\left( {AB} \right)}}{{P\left( A \right)}} = \frac{7}{{30}}:\frac{2}{5} = \frac{7}{{12}}\).