3.3

Tumor counts: A cancer laboratory is estimating the rate of tumorigenesis in two strains of mice, A and B. They have tumor count data for 10 mice in strain A and 13 mice in strain B. Type A mice have been well studied, and information from other laboratories suggests that type A mice have tumor counts that are approximately Poisson-distributed with a mean of 12. Tumor count rates for type B mice are unknown, but type B mice are related to type A mice. The observed tumor counts for the two populations are

$$ y_A=(12,9,12,14,13,13,15,8,15,6) \\ y_B=(11,11,10,9,9,8,7,10,6,8,8,9,7) $$

a) Find the posterior distributions, means, variances and 95% quantile-based confidence intervals for $θ_A$ and $θ_B$, assuming a Poisson sampling distribution for each group and the following prior distribution:

$θ_A ∼ gamma(120,10), \qquad θ_B ∼ gamma(12,1), \qquad p(θ_A, θ_B) = p(θ_A)×p(θ_B)$

type A

$P(y | \theta_A) \;\;\sim\;\; \prod_{i=1}^{10} Poisson(12), \;\;\;$$n_A = 10 \;\;,\;\; \sum_{i=1}^{10} y_{A_i} \;=\; 117$

$\begin{aligned} P(\theta_A|y_A) &= {1 \over p(y_A)} \times P(\theta_A) \times P(y_A|\theta_A) \\ &= {1 \over P(y_A)} \times {10^{120} \over \Gamma(120)} (\theta_A)^{119} e^{-10\theta_A} \times c(y_A)(12)^{117}e^{-120} \\ &= c(y_A) \times (\theta_A)^{119}e^{-10\theta_A} \;\;\;\because c(y_A)\;is\; function\; which\; consist\; of\; y_A\; and\; constant\;value \qquad\qquad\qquad \end{aligned}$ $\therefore P(\theta_A|y_A) \sim dgamma(\theta_A, 120, 10)$ : Posterior distribution

$E(\theta_A|y_A)=\frac{120}{10} = 12\;\;\;\;\;\;\;\;\;\because E(X) = \frac{a}{b} \;when\;X \sim \Gamma(a,b)$

$Var(\theta_A|y_A)=\frac{120}{10^2} = 1.2\;\;\;\;\;\;\;\;\;\because Var(X) = \frac{a}{b^2} \;when\;X \sim \Gamma(a,b)$

95% quantile based Confidence Interval

ci_a <- qgamma(c(0.025, 0.975), shape = 120, rate = 10)
ci_a
[1]  9.949193 14.240124

∴ 95% quantile based Confidence Interval = (9.949193 , 14.24012)

type B

$P(y | \theta_B) \;\;\sim\;\; \prod_{i=1}^{13} Poisson(\theta_B), \;\;\;$$n_B = 13 \;\;,\;\; \sum_{i=1}^{13} y_{B_i} \;=\; 113$

$\begin{aligned} P(\theta_B|y_B) &= {1 \over P(y_B)} \times P(\theta_B) \times P(y_B|\theta_B) \\ &= {1 \over P(y_B)} \times {1^{12} \over \Gamma(12)} (\theta_B)^{11} e^{-\theta_B} \times c(y_B)(\theta_B)^{113}e^{-13\theta_B} \\ &= c(y_B) \times (\theta_B)^{124}e^{-14\theta_B} \;\;\;\because c(y_B)\;is\; function\; which\; consist\; of\; y_B\; and\; constant\;value \qquad\qquad\qquad \end{aligned}$ $\therefore P(\theta_B|y_B)\sim dgamma(\theta_B, 125, 14)$ : Posterior distribution