x=matrix(0,nrow=2, ncol=7)
x[1, ]=c('Success rate p',0,0.25,0.5,0.75,0.9,1)
x[2, ]=c('Pr(p) prior',0,0.1,0.75,0.1,0.04,0.01)
library(knitr)
kable(x)| Success rate p | 0 | 0.25 | 0.5 | 0.75 | 0.9 | 1 |
| Pr(p) prior | 0 | 0.1 | 0.75 | 0.1 | 0.04 | 0.01 |
This workshop consists of two parts:
Suppose \(X_1, X_2, \dots, X_n\) are independent observations from an exponential distribution with rate \(\lambda = 1\).
Questions:
Let \(X_1, X_2, \dots, X_n \sim \text{Uniform}(0,1)\).
Two estimators of the mean \(\mu = 0.5\) are:
\[ \hat{\mu}_1 = \bar{X} \]
and
\[ \hat{\mu}_2 = \frac{n+1}{n}\bar{X}. \]
Questions:
Suppose \(X_i \sim \text{Bernoulli}(p)\).
Questions:
Suppose
\[ X_i \sim N(\mu, \sigma^2), \]
where \(\sigma^2\) is known.
Questions:
Suppose the true distribution is Normal with
\[ \mu = 10, \quad \sigma = 2. \]
Questions:
Compute the proportion of intervals that contain the true mean.
Suppose a test is 95% accurate when a disease is present and 97% accurate when the disease is absent. Suppose that 1% of the population has the disease. Let \(H\) be the event that a disease is present, \(T^+\) be the event of positive test result, and \(T^-\) be the event of negative test result.
(Albert et al., 2009, Chapter 4, Exercise 4.4)
A woman tells you she can predict the sex of a baby by how high it ‘rides’ in the mothers uterus. ‘High’ means a boy and ‘low’ means a girl. You suspect she is only guessing, but you are not completely sure;
The table is as follows
x=matrix(0,nrow=2, ncol=7)
x[1, ]=c('Success rate p',0,0.25,0.5,0.75,0.9,1)
x[2, ]=c('Pr(p) prior',0,0.1,0.75,0.1,0.04,0.01)
library(knitr)
kable(x)| Success rate p | 0 | 0.25 | 0.5 | 0.75 | 0.9 | 1 |
| Pr(p) prior | 0 | 0.1 | 0.75 | 0.1 | 0.04 | 0.01 |
Suppose the number of customers arriving at a service desk in one hour follows a Poisson distribution with unknown rate \(\lambda\):
\[ X_i \sim \text{Poisson}(\lambda), \quad i = 1, \dots, n. \]
A prior distribution is placed on \(\lambda\):
\[ \lambda \sim \text{Gamma}(\alpha, \beta), \]
where \(\alpha > 0\) and \(\beta > 0\).
Assume the prior parameters are
\[ \alpha = 3, \qquad \beta = 1. \]
During five observed hours, the number of arriving customers is recorded as
\[ 8,\; 6,\; 7,\; 9,\; 10. \]
Questions:
Hint:
For the Gamma distribution parameterised as \(\text{Gamma}(\alpha, \beta)\) with shape \(\alpha\) and rate \(\beta\): \[ E[\lambda] = \frac{\alpha}{\beta}. \]
For the Gamma–Poisson conjugate model, the posterior parameters are
\[ \alpha_{\text{post}} = \alpha + \sum x_i, \]
\[ \beta_{\text{post}} = \beta + n. \]
\[ L(\theta) = L(\theta \mid x_1, x_2, \dots, x_n) = f(x_1, x_2, \dots, x_n \mid \theta) \]
is the likelihood function.
In the following questions you are asked to specify the likelihood functions for given scenarios.
\[ f_X(x) = \frac{x^2}{2\theta^3} e^{-x/\theta}, \qquad 0 < x < \infty, \quad \theta > 0 \]
Let \(x_1, x_2, \dots, x_n\) be a random sample of \(n\) claim sizes for such claims. Specify the likelihood function and the log-likelihood function.
While travelling through the Mushroom Kingdom, Mario and Luigi find some rather unusual coins. They agree on a prior of \(f(\theta) \sim \text{Beta}(5,5)\) for the probability of heads, though they disagree on what experiment to run to investigate \(\theta\) further.
Show that Mario and Luigi will arrive at the same posterior on \(\theta\), and calculate this posterior.