Question 1

Consider influenza epidemics for two parent heterosexual families. Suppose that the probability is 17% that at least one of the parents has contracted the disease. The probability that the father has contracted influenza is 12% while the probability that both the mother and father have contracted the disease is 6%. What is the probability that the mother has contracted influenza?

(Hints look at lecture 2 around 5:30 and chapter 4 problem 4).

  • 11%
  • 17%
  • 6%
  • 5%

Answer

The events can simultaneously occur and so are not mutually exclusive.

Consider:

  • \(P(A)\): Only father probability to be infected;
  • \(P(B)\): Only mother probability to be infected;
  • \(P(A \cap B)\): (intersection) father and mother probability infected, and;
  • \(P(A \cup B)\): (union) All cases of infection.

According to the formula:

\[\underbrace{P(A \cup B)}_{17\%} = \underbrace{P(A)}_{12\%} + P(B) - \underbrace{P(A \cap B)}_{6\%}\] Thus:

\[P(B) = 17\% - 12\% + 6\% = 11\%\]

Question 2

A random variable, \(X\) is uniform, a box from 0 to 1 of height 1. (So that its density is \(f(x) = 1\) for \(0 \leq x \leq 1\).) What is its 75th percentile? (Hints, look at lecture 2 around 21:30 and Chapter 5 Problem 5. Also, look up the help function for the qunif command in R.)

(Hints, look at lecture 2 around 21:30 and Chapter 5 Problem 5. Also, look up the help function for the qunif command in R.)

  • 0.25
  • 0.50
  • 0.10
  • 0.75

Answer

The 75th percentile represents the blue area.

# Calculating using R.
stats::qunif(p = 0.75, min = 0, max = 1)
## [1] 0.75

Question 3

You are playing a game with a friend where you flip a coin and if it comes up heads you give her \(X\) dollars and if it comes up tails she gives you \(Y\) dollars. The probability that the coin is heads is p (some number between \(0\) and \(1\)). What has to be true about \(X\) and \(Y\) to make so that both of your expected total earnings is \(0\). The game would then be called โ€œfairโ€.

(Hints, look at Lecture 4 from 0 to 6:50 and Chapter 5 Problem 6. Also, for further reading on fair games and gambling, start with the Dutch Book problem).

  • \(p = \frac{X}{Y}\)
  • \(\frac{p}{1-p} = \frac{Y}{X}\)
  • \(\frac{p}{1-p} = \frac{X}{Y}\)
  • \(X = Y\)

Answer

\[ Earnings = \underbrace{Profit}_{Y} \cdot \underbrace{P(Tail)}_{1-p} - \underbrace{Loss}_{X} \cdot \underbrace{P(Head)}_{p}\]

\[ \underbrace{Profit}_{Y} \cdot \underbrace{P(Tail)}_{1-p} - \underbrace{Loss}_{X} \cdot \underbrace{P(Head)}_{p} = 0\]

\[ Y \cdot 1-p = X \cdot p\] \[ \frac{p}{1-p} = \frac{Y}{X}\]

Question 4

A density that looks like a normal density (but may or may not be exactly normal) is exactly symmetric about zero. (Symmetric means if you flip it around zero it looks the same.) What is its median?

(Hints, look at quantiles from Lecture 2 around 21:30 and Chapter 2 Problem 7.

  • The median must be different from the mean.
  • The median must be 0.
  • We canโ€™t conclude anything about the median.
  • The median must be 1.

Answer

# Symmetric mean 50% in both sides.
qnorm(p = 0.50, mean = 0)
## [1] 0

Question 5

Consider the following PMF shown below in R

x <- 1:4
p <- x/sum(x)
temp <- rbind(x, p)
rownames(temp) <- c("X", "Prob")
temp
##      [,1] [,2] [,3] [,4]
## X     1.0  2.0  3.0  4.0
## Prob  0.1  0.2  0.3  0.4

What is the mean?

(Hint, watch Lecture 4 on expectations of PMFs.)

  • 4
  • 1
  • 3
  • 2

Answer

sum(temp["X",] * temp["Prob",])/sum(temp["Prob",])
## [1] 3

Question 6

A web site (www.medicine.ox.ac.uk/bandolier/band64/b64-7.html) for home pregnancy tests cites the 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%.โ€ Assume the lower value for the specificity. Suppose a subject has a positive test and that 30% of women taking pregnancy tests are actually pregnant. What number is closest to the probability of pregnancy given the positive test?

(Hints, watch Lecture 3 at around 7 minutes for a similar example. Also, thereโ€™s a lot of Bayesโ€™ rule problems and descriptions out there, for example hereโ€™s one for HIV testing. Note, discussions of Bayesโ€™ rule can get pretty heady. So if itโ€™s new to you, stick to basic treatments of the problem. Also see Chapter 3 Question 5.)

  • 40%
  • 30%
  • 20%
  • 10%

Answer

  • sensitivity (\(P(+|D)\)): 75%
  • specificity (\(P(-|D^C)\)): 52%
  • prevalence (\(P(D)\)): 30%

\[ P(D|+) = \frac{\overbrace{P(+|D)}^{sensitivity} \cdot \overbrace{P(D)}^{prevalence}}{P(+|D) \cdot P(D)+[1-\underbrace{P(-|D^C)}_{specificity}] \cdot [1-P(D)]}\] \[ P(D|+) = \frac{\overbrace{0.75}^{sensitivity} \cdot \overbrace{0.30}^{prevalence}}{0.75 \cdot 0.30+[1-\underbrace{0.52}_{specificity}] \cdot [1-0.30]} = 0.4011\]

#Calculating using R.
(0.75*0.30)/(0.75*0.30+0.48*0.70)
## [1] 0.4010695