MATLAB Answers

0

How to solve a Multinomial Distribution IN MATLAB

Asked by jawaher shah on 21 Apr 2019 at 9:52
Latest activity Answered by Image Analyst
on 21 Apr 2019 at 16:01
hello, i'm trying to solve this question using Matlab
According to USA Today (March 18, 1997), of 4 million workers in the general workforce, 0.8% tested positive for drugs. Of those testing positive, 22.5% were cocaine users and 54.4% marijuana users.
(a) What is the probability that of 10 workers testing positive, 2 are cocaine users, 0 marijuana users, and 3 users of other drugs?
I solved it by hand as the following
p(2 Cocaine, 5 Marjuana, 3 Others) = 10!/2!5!3! (0.225)^2(0.544)^5(0.231)^3
but i'm not sure how to use the formula. Can you please help me and thanks in advance.

  0 Comments

Sign in to comment.

1 Answer

Answer by Image Analyst
on 21 Apr 2019 at 16:01

I believe that formula in MATLAB would be
p = factorial(10) / (factorial(2) * factorial(5) * factorial(3)) * (0.225)^2 * (0.544)^5 * (0.231)^3

  0 Comments

Sign in to comment.