math biostatistics boot camp 1
DESCRIPTION
Homework with answers (and solutions)Week 3TRANSCRIPT
![Page 1: Math Biostatistics Boot Camp 1](https://reader036.vdocument.in/reader036/viewer/2022082204/55cf9cb8550346d033aacca3/html5/thumbnails/1.jpg)
Mathematical Biostatistics Boot Camp 1Homework
Week 3
1. (1 point) A web site (www.medicine.ox.ac.uk/bandolier/band64/b64-7.html) for home pregnancy tests citesthe following: “When the subjects using the test were women who collected and tested their own samples,the overall sensitivity was 75%. Specificity was also low, in the range 52% to 75%.” Suppose a subject hasa negative test. Assume the lower bound for the specificity. What number is closest to the multiplier of thepre-test odds of pregnancy to obtain the post-test odds of pregnancy given a negative test result?
a. 1.5 b. 0.5 c. 2 d. 1
1. b.
Solution:
DLR− =1− sensitivityspecificity
=1− 0.75
0.52=
0.25
0.52= 0.4808 ≈ 0.5
2. (1 point) A web site (www.medicine.ox.ac.uk/bandolier/band64/b64-7.html) for home pregnancy tests citesthe following: “When the subjects using the test were women who collected and tested their own samples, theoverall sensitivity was 75%. Specificity was also low, in the range 52% to 75%.” Assume the lower value forspecificity. Suppose a subject has a negative test and that 30% of women taking pregnancy tests are actuallypregnant. What number is closest to the probability of pregnancy given a negative test?
a. 30% b. 60% c. 90% d. 20% e. 80% f. 50% g. 40% h. 70% i. 10%
2. d.
Solution:
P (preg|−) =P (−|preg)P (preg)
P (−|preg)P (preg) + P (−|pregc)P (pregc)
=(1− P (+|preg))P (preg)
(1− P (+|preg))P (preg) + P (−|pregc)(1− P (preg))
=(1− 0.75)(0.30)
(1− 0.75)(0.30) + (0.52)(0.7)=
0.075
0.439= 0.1708 ≈ 20%
3. (1 point) Suppose that hospital infection counts are models as Poisson with mean µ. Recall the Poisson mass
function with mean µ isµxe−µ
x!for x = 0, 1, . . . Three independent hospitals are observed for one year and their
infection counts were 5, 4, and 6, respectively. What is the ML estimate for µ?
a. 0 b. 1 c. 4 d. 4.5 e. 5 f. 5.5 g. 6
3. e.
Solution:3∏i=1
µxke−µ
xk!=µx1e−µµx2e−µµx3e−µ
x1!x2!x3!=µx1+x2+x3e−3µ
x1!x2!x3!=µ5+4+6e−3µ
x1!x2!x3!=
µ15e−3µ
x1!x2!x3!
We will take the derivative of this function and set it to zero. It will be easier first to take logarithm of thefunction and then find the maximum: f̊ = log f = 15 log(µ)− 3µ− log(x1!x2!x3!)
Now, we find the maximum:d
dµ(15 log(µ)− 3µ− log(x1!x2!x3!)) =
15
µ−3 = 0 and solve for µ to get µ = 5.
Page 1 of 3
![Page 2: Math Biostatistics Boot Camp 1](https://reader036.vdocument.in/reader036/viewer/2022082204/55cf9cb8550346d033aacca3/html5/thumbnails/2.jpg)
4. (1 point) Let X1, . . . , Xn be iid exponential(β). That is, having density1
βe−x/β for x > 0. What is the ML
estimate for β?
a.n∑i=1
xin
b.n∑i=1
xi c.
(n∑i=1
log(xi)
n
)−1
d.
(n∑i=1
xi
)−1
e.n∑i=1
log(xi)
nf.
(n∑i=1
xin
)−1
4. a.
Solution:n∏i=1
1
βe−xi/β =
1
βne−(x1+···+xn)/β =
1
βne−
1β
∑ni=1 xi
We will take the derivative of this function and set it to zero. It will be easier first to take logarithm of the
function and then find the maximum: f̊ = log f = − 1
β
n∑i=1
xi − n log β
Now, we find the maximum:d
dβ
(− 1
β
n∑i=1
xi − n log β
)=
1
β2
n∑i=1
xi −n
β= 0 and solve for β to get
β =
n∑i=1
xin
5. (1 point) Let X be a geometric random variable. That is X counts the number of coin flips until one obtainsthe first head. The mass function is P (X = x) = p(1− p)x−1 for x = 1, 2, . . . What is the maximum likelihoodestimate for p if one observes a geometric random variable?
a. 1/(x− 1) b. 1/x c. 1/2 d. 1/(x+ 1)
5. b.
Solution:
We want to find the derivative of this function and set it to zero. It will be easier to take the logarithm ofthe function first:
log f = log(p) + (x− 1) log(1− p)and now we take the derivative:
d
dp(log(p) + (x− 1) log(1− p)) =
1
p− x− 1
1− p= 0
and solve for p to get p =1
x.
Page 2 of 3
![Page 3: Math Biostatistics Boot Camp 1](https://reader036.vdocument.in/reader036/viewer/2022082204/55cf9cb8550346d033aacca3/html5/thumbnails/3.jpg)
6. (1 point) Let X be a Poisson count with mean µ. Recall the Poisson mass function with mean µ isµxe−µ
x!for
x = 0, 1, . . . What is the maximum likelihood estimate for µ?a. µ b. 1/x c. 1/2 d. x2 e. x
6. e.
Solution:
First, we take the logarithm of the function to get:
log f = x log(µ)− µ− log(x!)
now we take the derivative and set it to zero to get maximum:d
dµ(x log(µ)− µ− log(x!)) =
x
µ− 1 = 0
and solve for µ to get µ = x.
Question: 1 2 3 4 5 6 Total
Points: 1 1 1 1 1 1 6
Score:
Page 3 of 3