Exercise 1: Task 1 & Task 2
Exercise 1: Task 1 & Task 2
Task 3
Problems 3.136-3.140
The sample size in this cardiovascular disease study is https : //v2.overleaf.com/project/5b8d4be42273
446. Below is Table 3.22 where the association between the blood-pressure index
(AAI) and the S-T segment depression of the electrocardiogram (ECG) is shown:
S-T segment depression
+ -
AAI < 1.0 20 95
AAI ≥ 1.0 13 318
Since AAI < 1.0 signifies a test-positive for heart disease while the golden stan-
dard for the same disease is the positive (+) S-T segment depression, we have that:
T P = 20, F N = 13, F P = 95, T N = 318. So, the positives and negatives are:
P = T P + F N = 33, N = T N + F P = 413. Thus we can calculate:
TP 20
Sensitivity = = = 0.6
P 33
TN 318
Specif icity = = = 0.77
N 413
Since the subjects in the study are a random sample from Japan’s population, we can
calculate the disease prevalence as:
P 33
x = P (P ositives) = = = 0.074
N 446
1
So, the predictive value positive and predictive value negative can be calculated
as:
Sensitivity · x
PV + = =
Sensitivity · x + (1 − Specif icity) · (1 − x)
0.6 · 0.074
= = 0.17
0.6 · 0.074 + (1 − 0.77)(1 − 0.074)
Specif icity · (1 − x)
PV − = =
Specif icity · (1 − x) + (1 − Sensitivity) · x
0.77 · (1 − 0.074)
= = 0.96
0.77 · (1 − 0.074) + (1 − 0.6) · 0.074
These results show that the AAI test is not a good indicator of heart disease since
the P V + is very small, meaning that we are only 17% sure that a person has heart
disease given that his test resulted in: AAI ≤ 1.0. Even with better technology for
testing the AAI index and given that the sensitivity thus increased to let’s say 0.8,
we would still have a low positive predictive value: P V + (Sensitivity = 0.8) = 22%.
Problems 3.12-3.15
We are considering a family with two parents and two children. Let the events of
interest be: A1 ={mother has the influenza}, A2 ={father has the influenza}, A3 ={the
first child has the influenza} and A4 ={the second child has the influenza}. It is given
that: P (A1 ) = P (A2 ) = 0.1, P (A1 ∩ A2 ) = 0.02 and that: P (A3 ) = P (A4 ) =
0.2, P (A3 ∩ A4 ) = 0.1.
• Are the events A1 , A2 independent? No, since:
P (A1 ) · P (A2 ) = 0.01 6= P (A1 ∩ A2 ) = 0.02
• What is the probability that at least one child will get the influenza?
P (A3 ∪ A4 ) = P (A3 ) + P (A4 ) − P (A3 ∩ A4 ) = 0.2 + 0.2 − 0.1 = 0.3 = 30%
• What is the conditional probability that the father has the influenza given that the
mother has influenza?
P (A1 ∩ A2 ) 0.02
P (A2 |A1 ) = = = 20%
P (A1 ) 0.1
• What is the conditional probability that the father has the influenza given that the
mother does not have influenza?
P (A1 ∩ A2 ) P (A2 ) − P (A1 ∩ A2 ) 0.1 − 0.02
P (A2 |A1 ) = = = = 8.8%
P (A1 ) 1 − P (A1 ) 1 − 0.1
Note: The above results make perfect sense since they show that it is more
probable for the father to have influenza given that his wife also has.
2
Task 4
Problems 3.76-3.78
In this hypertension study, the measurement is the change in blood pressure be-
fore and after a stimulating experience. There is strong cardiovascular reactivity if:
∆DBP ≥ 10 mm Hg. In the next Table 3.11, we can see the classification of the
cardiovascular reactivity using an automated as well as a manual sphygmomanometer:
∆DBP , manual
∆DBP , automated < 10 ≥ 10
< 10 51 7
≥ 10 15 6
It’s easy to see that the sample size is N = 51 + 7 + 15 + 6 = 79. Now, since
the automated measurements signify the test-positives for cardiovascular reactivity
whereas the manual measurements are considered the ”true” measurements, we have
that: T P = 6, F N = 7, F P = 15, T N = 51. So, the positives and negatives are:
P = T P + F N = 13, N = T N + F P = 66. Thus we can calculate:
TP 6
Sensitivity = = = 0.46
P 13
TN 51
Specif icity = = = 0.77
N 66
Since the population tested is representative of the general population, we can calcu-
late the disease prevalence as:
P 13
x = P (P ositives) = = = 0.164
N 79
So, the predictive value positive and predictive value negative can be calculated
as:
Sensitivity · x
PV + = =
Sensitivity · x + (1 − Specif icity) · (1 − x)
0.46 · 0.164
= = 0.28
0.46 · 0.164 + (1 − 0.77)(1 − 0.164)
Specif icity · (1 − x)
PV − = =
Specif icity · (1 − x) + (1 − Sensitivity) · x
0.77 · (1 − 0.164)
= = 0.88
0.77 · (1 − 0.164) + (1 − 0.46) · 0.164
3
Task 5
Problems 4.5-4.6
Selecting k = 5 out of n = 50 cases of angina, when order matters, is:
N = 50 · 49 · 48 · 47 · 46
Task 6
Problems 4.1-4.3
X is a random variable representing then number of hypertensive adults (HT) in
a family (mother and father). We consider someone as having HT, if their blood
pressure is: DBP ≥ 90. It is given that the events A={mother is HT} and B={father
is HT} are independent and the probabilities are: P (A) = 0.1, P (B) = 0.2. So,
we can calculate the probability of both of them being HT as: P (A ∩ B) = P (A) ·
P (B) = 0.1 · 0.2 = 0.02 and the probability of at least one of them being HT as:
P (A ∪ B) = P (A) + P (B) − P (A ∩ B) = 0.28.
We will now derive the probability mass function (pmf) of the random variable
X. The possible values are 0, 1 and 2 representing that none is HT in the family,
only one is or that both of the adults are. Using the next Venn diagram it’s easy to
calculate the probabilities needed:
A B
• P (X = 0) = 1 − P (A ∪ B) = 1 − 0.28 = 0.72
• P (X = 2) = P (A ∩ B) = 0.02
k 0 1 2
P (X = k) 0.72 0.26 0.02
4
Next, we can calculate the expected value and variance:
2
X
µ = E(X) = kP (X = k) = 0.3
k=0
2
σ 2 = V ar(X) = k 2 P (X = k) − µ2 = 0.25
X
k=0
Task 7
Problems 4.9-4.10
In this problem, we have k = 6 out of n = 15 students in a grade-school class that
developed influenza (40% of them were affected by the disease). The probability that
you will get influenza nationwide is p = 0.2 = 20%. Does this means that there is an
excessive number of infected students in that class?
Let X be a random variable representing the number of students that have influenza
(in that class). We will use the binomial distribution where each independent
trial asks a student if he/she has the influenza with probability p = 0.2. Our initial
hypothesis here is that this class is representative of the natiowide population and
as such, these excessive cases of influenzas are not worrying. We will calculate the
probability of having at least 6 students with influenza:
15
!
15
0.2k · (1 − 0.2)15−k
X
P (X ≥ 6) =
k=6 k
Task 8
Problems 4.89-4.91
Let X be a random variable that represents the number of admissions to the Emer-
gency Room (which follows the Poisson distribution). The rate of admissions is
on average λ1 = 2 admissions/day if it is a weekday and λ2 = 1 admission/day if it is
5
a weekend day (Saturday or Sunday). We will use the next two R functions for ease
of calculation:
λk · e−λ
dpois(k, λ) = P (X = k) =
k!
k
X λn · e−λ
ppois(k, λ) = P (X ≤ k) =
n=0 n!
P (X ≥ 1|Saturday) = 1 − P (X = 0|Saturday) =
• What is the probability of having 0, 1 and 2+ admissions for an entire week, if the
results for different days during the week are assumed to be independent?