Question 1

(a)

\[P(n_{11}, n_{12}, ..., n_{IJ}) = \frac{n!}{n_{11}!n_{12}!...n_{IJ}!} \prod_{i=1}^{I} \prod_{j=1}^{J} p_{ij}^{n_{ij}}\]

Multinomial distribution.

\(p_{ij} = \frac{\mu_{ij}}{\sum_{i=1}^{I}\sum_{j=1}^{J}\mu_{ij}}\)

(b)

If X and Y are independent,we have \(\mu_{ij} = \mu_{i}\mu_{j}\), then \[\frac{\mu_{11}}{\mu_{12}} \div \frac{\mu_{21}}{\mu_{22}} = \frac{\mu_{1}\mu_{1}}{\mu_{1}\mu_{2}} \div \frac{\mu_{2}\mu_{1}}{\mu_{2}\mu_{2}} = \frac{\mu_{1}}{\mu_{2}} \div \frac{\mu_{1}}{\mu_{2}} = 1\]

In conclusion, odds ratio = 1

Question 2

(a)

\[ ln(μ) = β_0 + β_1 \cdot Cnt + β_2 \cdot Smo + β_3 \cdot Can + β_4 \cdot (Cnt:Smo) + β_5 \cdot (Cnt:Can) + β_6 \cdot (Smo:Can) \]

\(β_0, β_1, β_2, β_3, β_4, β_5\), and \(β_6\) are the coefficients

(b)

\(θ_{XY}(k)\) with Z = k are the same for all k.

(c)

The interaction effect Smo:Can is significant, since the p-value 0.0184215 is smaller than the significance level 0.05.

(d)

The p-value 0.1217 is greater than the significance level 0.05. We can see that it is not significant, we cannot reject the goodness-of-fit of the model.

(e)

The conclusions in (c) and (d) are not contradictory. The significance of the interaction effect Smo:Can has not relationship with the goodness-of-fit of the model.

Question 3

(a)

\[ p(Y=y; \mu, \kappa)=\frac{\Gamma(\kappa + y)}{\Gamma(\kappa)y!} \exp(ln\kappa^\kappa)\exp(ln\mu^y-\kappa ln(\mu+\kappa)-yln(\mu+\kappa)) \\ =\frac{\Gamma(\kappa + y)}{\Gamma(\kappa)y!} \exp(ln\kappa^\kappa)\exp(y(ln\mu-ln(\mu+\kappa))-\kappa ln(\mu+\kappa)) \] then we have \[ \theta=ln(\frac{\mu}{\mu+\kappa})\\ b(·)=\kappa ln(\mu+k)\\ \phi=1 \] Hence \(\mu=\frac{\kappa e^\theta}{1-e^\theta}\), check it out: \[ b(\theta)=\kappa ln(\frac{\kappa}{1-e^\theta}) =\kappa ln(\kappa)-\kappa ln(1-e^\theta)\\ b'(\theta)=\frac{\kappa e^\theta}{1-e^\theta}=\mu \] We can see \(\mu\) is equal to the mean which indicates the conclusion.

(b)

\[ \sigma^2 = \mu + \frac{\mu^2}{\kappa} \]

The extra parameter k in the negative binomial distribution allows the variance to vary more, and is a better model choice when it is overdispersion.