RICE UNIVERSITY
STAT 425
Bayesian Statistics
Fall 2023: Prof. Daniel R. Kowal
Assignment #1
This assignment is due on Canvas at the beginning of class (2:30pm CT) on Tuesday, September 5,
2023. Late homework is not accepted.
1.
COVID tests and conditional probability.
Consider a COVID test for an individual. Let
test+
be the event that the test is positive
and
covid+
be the event that the individual has COVID. Similarly define
test-
and
covid-
for a negative test and not having COVID, respectively. Suppose this particular test has 80%
sensitivity
,
p
(
test+
|
covid+
) = 0
.
80
,
and 97%
specificity
,
p
(
test-
|
covid-
) = 0
.
97
.
Finally, suppose that 5% of the population currently has COVID, so
p
(
covid+
) = 0
.
05.
These values for sensitivity and specificity are the minimum recommendations for antigen
(rapid) tests according to the World Health Organization.
(a) What is
p
(
test+
)? Express in terms of the sensitivity, specificity, and proportion of the
population with COVID.
(b) What is the probability that an individual is COVID positive, given that they have
tested positive?
(c) What is the probability that an individual is COVID negative, given that they have
tested negative?
(d) How does these probabilities in (b) and (c) change if we vary the following terms:
Note: only change one at a time.
i. If the sensitivity is much lower, at 50%?
ii. If the specificity is much higher, at 100%?
iii. If instead we consider a rare disease that occurs in only 0.01% of the population?
2.
Importance of the prior parameters
For this question, we will expand upon the survey data from class.
Let
y
i
= 1 for every
student who answered "yes" and
y
i
= 0 otherwise, and let
y
=
∑
n
i
=1
y
i
.
We will use the
binomial model
y
|
θ
∼
Binomial(
n, θ
)
.
For each sample size
n
∈ {
10
,
100
,
1000
}
, build a "fake" dataset
y
=
n
ˆ
y
, each using the same
proportion ˆ
y
that we recorded in class.
Note: You may round
y
to the nearest integer.
©
Daniel R. Kowal 2023
1