- These are some practice problems for Statistical Inference Quiz 1
- They were created using slidify interactive which you will learn in Creating Data Products
- Please help improve this with pull requests here (https://github.com/bcaffo/courses)
Brian Caffo
Johns Hopkins Bloomberg School of Public Health
Consider influenza epidemics for two parent heterosexual families. Suppose that the probability is 15% that at least one of the parents has contracted the disease. The probability that the father has contracted influenza is 10% while that the mother contracted the disease is 9%. What is the probability that both contracted influenza expressed as a whole number percentage? Watch a video solution
\(A = Father\), \(P(A) = .10\), \(B = Mother\), \(P(B) = .09\) \(P(A\cup B) = .15\),
\(P(A\cup B) = P(A) + P(B) - P(AB)\) thus \[.15 = .10 + .09 - P(AB)\]
.10 + .09 - .15
[1] 0.04
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 median expressed to two decimal places? Watch a video solution.
The median is the point so that 50% of the density lies below it.
This density looks like a box. So, notice that \(P(X \leq x) = width\times height = x\). We want \(.5 = P(X\leq x) = x\).
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 odds that the coin is heads is \(d\). What is your expected earnings? Watch a video solution.
The odds that you lose on a given round is given by \(p / (1 - p) = d\) which implies that \(p = d / (1 + d)\).
You lose \(X\) with probability \(p = d/(1 +d)\) and you win \(Y\) with probability \(1-p = 1/(1 + d)\). So your answer is \[ -X \frac{d}{1 + d} + Y \frac{1}{1+d} \]
A random variable takes the value -4 with probability .2 and 1 with probability .8. What is the variance of this random variable? Watch a video solution.
This random variable has mean 0. The variance would be given by \(E[X^2]\) then.
\[E[X] = 0\] \[ Var(X) = E[X^2] = (-4)^2 * .2 + (1)^2 * .8 \]
-4 * .2 + 1 * .8
[1] 0
(-4)^2 * .2 + (1)^2 * .8
[1] 4
If \(\bar X\) and \(\bar Y\) are comprised of \(n\) iid random variables arising from distributions having means \(\mu_x\) and \(\mu_y\), respectively and common variance \(\sigma^2\) what is the variance \(\bar X - \bar Y\)? Watch a video solution of this problem.
Remember that \(Var(\bar X) = Var(\bar Y) = \sigma^2 / n\).
\[ Var(\bar X - \bar Y) = Var(\bar X) + Var(\bar Y) = \sigma^2 / n + \sigma^2 / n \]
Let \(X\) be a random variable having standard deviation \(\sigma\). What can be said about \(X /\sigma\)? Watch a video solution of this problem.
\(Var(aX) = a^2 Var(X)\)
\[Var(X / \sigma) = Var(X) / \sigma^2 = 1\]
If a continuous density that never touches the horizontal axis is symmetric about zero, can we say that its associated median is zero? Watch a video solution.
This is a surprisingly hard problem. The easy explanation is that 50% of the probability is below 0 and 50% is above so yes. However, it is predicated on the density not being a flat line at 0 around 0. That's why the caveat that it never touches the horizontal axis is important.
Consider the following pmf given in R
p <- c(.1, .2, .3, .4)
x <- 2 : 5
What is the variance expressed to 1 decimal place? Watch a solution to this problem.
The variance is \(E[X^2] - E[X]^2\)
sum(x ^ 2 * p) - sum(x * p) ^ 2
[1] 1