SOLVE ON MATLAB According to USA Today (March 18, 1997), of 4 million workers in
ID: 3891420 • Letter: S
Question
SOLVE ON MATLAB According to USA Today (March 18, 1997), of 4 million workers in the general workforce, 5.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, 5 are marijuana users, and 3 are users of other drugs? (USE MATLAB) (b) What is the probability that of 10 workers testing positive, all are marijuana users? (USE MATLAB) (c) What is the probability that of 10 workers testing positive, none is a cocaine user? ve it using binomial distribution and multinational distribution on MATLAB SolExplanation / Answer
part(a)
out of the positively tested workers:
The possibility of a worker being cocain user = 0.225
The possibility of a worker being marijuana user = 0.544
The possibility of a worker being other drug user = 0.231
The case is multinomial distribution with sample size of 10 and 3 outcomes with abovementioned probabilities. Hence, we use the mnpfd function of matlab to calcualte the requried probability as:
mnpdf([2 5 3] , [0.225,0.544,0.231])
Here mnpdf(X,P) represents the outcome of different trials in sample space and P is the corresponding probabilities. (As we want 2 people using cocaine, 5 with Marijuana and 3 others)
This gives the result as: 0.0749
part(b)
Similar to the above logic, we use:
mnpdf([0 10 0] , [0.225,0.544,0.231])
This gives the result as: 0.0023
part(c)
To tackle this, we need to sum the probabilities of the situation for all the combination of +ve tested people among marijuana or other drugs, while keeping the outcome for cocaine to be 0:
sum=0;
for i=0:10
sum=sum+mnpdf([i 0 10-i] , [0.225,0.544,0.231])
end
This gives the result as: 0.00038873
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.