Suppose that the probability that an incoming email is a spam is p(S), that the probability that the word w occurs in the subject line of the spam is p(w), and that q(w) is the probability that the word w occurs in the subject line of an email that is not a spam. What is the probability that an incoming email containing the word w is spam?