In conditional probability, we write this as P(B | A), or the conditional probability of B given that A has occured. It is given as
[tex]P(B|A)=\frac{P(B\text{ and }A)}{P(A)}[/tex]
The probability that a male student AND has they got B is
[tex]\begin{gathered} P(\text{Male and got B})=\frac{\text{Total number of male who got B}}{\text{Total number of students}} \\ P(\text{Male and got B})=\frac{2}{56} \end{gathered}[/tex]
The probability that a student got B is
[tex]P(\text{Student got B})=\frac{20}{56}[/tex]
Putting it together we have
[tex]\begin{gathered} P(\text{Male given they got B})=\frac{P(\text{Total number of male student who got B})}{P(\text{Student got B})} \\ P(\text{Male given they got B})=\frac{\frac{2}{56}}{\frac{20}{56}} \\ P(\text{Male given they got B})=\frac{2}{20} \\ P(\text{Male given they got B})=0.1 \end{gathered}[/tex]
Therefore, the probability that the student was male GIVEN they got a 'B' is 0.1