Question: Currently struggling with a lecture problem, we are currently using R programming, would love if you explained thoroughly. Problem 1: This problem is about the

 Currently struggling with a lecture problem, we are currently using R

Currently struggling with a lecture problem, we are currently using R programming, would love if you explained thoroughly.

programming, would love if you explained thoroughly. Problem 1: This problem isabout the multinomial distribution. The multinomial distribution is a random vector in

Problem 1: This problem is about the multinomial distribution. The multinomial distribution is a random vector in Z (a ran- dom vector which gives you a d-tuple of integers). We say a d-dimensional random vector X has the multinomial distribution, X ~ Multinomial(N, p) where / is a positive integer, and p = (p1, p2, ...,pa) is a "proba- bility vector", the p; are positive numbers such that _ p; = 1. The multinomial distribution has the following PMF formula (prob- ability mass function), N! P X = (i1, 12, ..., id) ) = fx(in,iz .'d) = (i, )!(in)!.. (i.)!Pipz ..-Pa The support of X are all tuples (1, 12, ..., i) of non-negative inte- gers which sum to exactly N, ie. u tint... +i = N. What is the multinomial distribution used for? It is a general- ization of the binomial distribution. The binomial distribution counts the number of successes in a total of / trails. The bino- mial distribution is about successes vs failures, i.e. it is binary, one or the other. The multinomial distribution counts the number of outcomes when you have several disjoint categories (as opposed to just "success" vs "failure"). For example, suppose in Math 323 (Advanced Calculus) the following is the grade distribution: ABC F [1 2 3 4 i.e. 10% of students who take Math 323 receive an A grade, ect. We can let X represent an integer vector in Z4 of a grade distri- bution. For example, if X = (2, 5, 5, 12), then this means that out of a class of 24 = 2 + 5 + 5 + 12 students, the grade distributionwas that 2 students got an A grade, 5 students got a B grade, 5 students got a C grade, and 12 students failed. In this example, X ~ Multinomial ( 24, (.1, .2, .3, .4) ) We can then calculate, P X = (2,5, 5, 12) ) 24! 21515!12! (.1)?(.2)5(.3)5(.4) 12 You can calculate this number manually or you can simply use the following command in R, dmultinom(c (2,5,5,12) ,24, prob = c(.1, .2, .3, .4) ) ~.005 In R write the following command, X = rmultinom (1e3,24, prob = c(.1, .2, .3, .4) ) This will select 10 independent samples from the multinomial dis- tribution. Note, X is being displayed as a matrix, not as a vector. If you type X[ , i] you will get the i-th sample. For example, x[ , 1] is the first sample, which is a four dimensional integer vector. Suppose you were told that X is a matrix of four-dimensional vector samples coming from a multinomial distribution. And you wanted to estimate the parameters. It is clear that the sum of the num- bers is always 24, so clearly the NV parameter must be 24. But the probability vector (P1: p2, p3, pa) is unclear how to find. Use a Maximum Log-Likelihood Estimate to get the optimal parameter probability vector. If you do this correctly then your parameter values should be approximately (.1, .2, .3, .4)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!