# Stat 120C Homework 6 Assignment 2015

Stat120CHomework 6 (due on Wednesday May 27, 2015)Instructor: Zhaoxia YuProblem 1: Let Y = (Y1, Y2, Y3) follows a multinomial distribution with n trials and probabilities p =(p1, p2, p3). Noet that the sum of pi’s is 1, i.e., p1 + p2 + p3 = 1. The probability mass function (pmf) isPr(Y = (y1, y2, y3)) = n!y1!y2!y3!py11 py22 py33Here y1, y2, y3 are nonnegative integers that satisfy y1 + y2 + y3 = n.(a) Show that Y1 follows Binomial(n, p1) by showing thatPr(Y1 = y1) =Xy2,y3P(Y1 = y1, Y2 = y2, Y3 = y3) = n!y1!(n ? y1)!py11 (1 ? p1)n?y1Hint: the Binomial theorem is useful:(a + b)n =Xnx=0n!x!(n ? x)!axbn?x(b) Prove that Cov(Y1, Y2) = ?np1p2,Cov(Y1, Y3) = ?np1p3,Cov(Y2, Y3) = ?np2p3.Hint: E[Y1Y2] =Py1,y2,y3 y1y2Pr(Y1 = y1, Y2 = y2, Y3 = y3). Show that it equals n(n ? 1)p1p2. Thetrinomial theorem is useful: (a + b + c)n =Px+y+z=nn!x!y!z!axbycz.Problem 2 (Modified from 13.8 of Rice with cell values changed) Adult-onset diabetes is known tobe highly genetically determined. A study was done comparing frequencies of a particular allele in a sampleof such diabetics and a sample of nondiabetics. The data are shown in the following table:Diabetic NormalBb or bb 3 1BB 5 6Are the relative frequencies of the allele significantly different in the two groups? State your hypotheses, teststatistic, significance level and whether you should reject your null based on Fisher’s exact test.Problem 3: Suppose that 300 persons are selected at random from a large population, and each person inthe sample is classified according to blood type: O, A, B, or AB, also according to Rh: positive or negative.The observed numbers are given below.12 Homework 6O A B ABRh+ 82 89 54 19Rh- 13 27 7 9(a) Conduct a Pearson’s chi-square test (at level = 0.05) to test the hypothesis that the two classificationsof blood types are independent.(b) Confirm your calculation in (a) using R.> rhp = c(82, 89, 54, 19)> rhn = c(13, 27, 7, 9)> chisq.test(rbind(rhp, rhn), correct=F)(c) Calculate the likelihood ratio statistic for testing independence. To do so, first calculate the maximizedlikelihood under the full model, i.e., the model with no constraint. Denote it by L1. Second, calculate themaximized likelihood under the reduced model, i.e., the model assumes independence. Denote it by L0.Third, calculate 2(log(L1) ? log(L0)).(d) Compare the test statistic in (c) to Pearson’s chi-square statistic. Under the null hypothesis of independence,the likelihood ratio statistic follows a chi-squared distribution with three degrees of freedom. Basedupon the likelihood ratio statistic, would you reject the null the hypothesis at level = 0.05?