Lecture notes‎ > ‎Lecture 07‎ > ‎

Practice quiz solutions

 1)`def QQPlot(cdf1, cdf2, ps):``    res = []``    for p in ps:``        res.append((cdf1.Value(p), cdf2.Value(p)))``    return res`2) H: patient has tuberculosisC: patient has a coldE: patient goes to a doctor and reports a persistent coughMy priors don't always have to be probabilities, as long as the ratio between them is right,P(H) ~ 1/15000P(C) ~ 3P(E|H) = 0.6P(E|C) = 0.01P(H|E) = (1/15000)(0.6)                -------------------------                 = 0.00133   or about one in 750                (1/15000)(0.6) + (3)(0.01)3)Suppose that in a survey 19 out of 60 male respondents saythey smoke, and 12 out of 40 female respondents say they smoke.1) What is the probability that a randomly-chosen respondent is male?60/1002) What is the probability that a randomly-chosen respondent is a smoker?31/1003) What is the probability that a randomly-chosen respondent is a  male smoker?19/1004) What is the probability that a randomly-chosen male is a smoker?19/605) What is the probability that a randomly-chosen smoker is a male?19/316) Does this mean that smoking is cool?Yes, smoking is cool.