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 tuberculosis
C: patient has a cold
E: patient goes to a doctor and reports a persistent cough

My priors don't always have to be probabilities, as long as the ratio between them is right,

P(H) ~ 1/15000
P(C) ~ 3

P(E|H) = 0.6
P(E|C) = 0.01

P(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 say
they smoke, and 12 out of 40 female respondents say they smoke.

1) What is the probability that a randomly-chosen respondent is male?

60/100

2) What is the probability that a randomly-chosen respondent is a smoker?

31/100

3) What is the probability that a randomly-chosen respondent is a
  male smoker?

19/100

4) What is the probability that a randomly-chosen male is a smoker?

19/60

5) What is the probability that a randomly-chosen smoker is a male?

19/31

6) Does this mean that smoking is cool?

Yes, smoking is cool.


Comments