basics of probability theory in machine learning code example Example: basic probability theory P(A) = n(A)/n(S)