Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

50 students live in a dormitory. The parking lot has the capacity for 30 cars. E

ID: 2921205 • Letter: 5

Question

50 students live in a dormitory. The parking lot has the capacity for 30 cars. Each student has a car with probability 3/5 (independently from other students). (a) What is the probability that exactly 20 students have cars? (You may want to use a calculator) (b) There is a MATLAB command, called binopdf which can do this calculation for you. Open MATLAB, and type help binopdf; to read about this function and how it works. Then try binopdf(20, 50, 3/5) and compare the answer with what you got in part (a). (c) Use the MATLAB function to compute the probability that exactly 35 students have cars. (d) What is the probability that there won’t be enough parking spaces for all the cars? (e) Type help binocdf; in MATLAB and read how it works. Then choose proper parameters to compute the solution of part (d) using this command.

Explanation / Answer

Solution:

Here, we have to use binomial distribution for finding the required probabilities.

We are given

n = 50

p = 3/5 = 0.6

(a) What is the probability that exactly 20 students have cars?

We have to find P(X=20)

P(X=x) = nCx*p^x*q^(n – x)

Where, q = 1 – p = 1 – 0.6 = 0.4

P(X=20) = 50C20*0.6^20*0.4^(50 – 20)

P(X=20) = 50C20*0.6^20*0.4^30

P(X=20) = 0.001986621

Required probability = 0.001986621

(By using excel)

Part b

Here, we have to find this probability by using MATLAB command:

Syntax: Y = binompdf(X,N,P)

MATLAB OUTPUT

Y = binompdf(20,50,0.6)

ans =

0.001987

Required probability = 0.001987

Answers in part a and b are almost same. (There would be very small ignorable rounding error.)

Part c

Here, we have to find P(X=35)

Syntax: Y = binompdf(X,N,P)

MATLAB OUTPUT

Y = binompdf(35,50,0.6)

ans =

0.041547

Required probability = 0.041547

Part d

Here, we have to find P(X>30)

By using calculator or excel, we have

P(X>30) = 1 – P(X30)

P(X30) = binomdist(30,50,0.6,1) = 0.553523621

P(X>30) = 1 - 0.553523621

P(X>30) = 0.446476379

Required probability = 0.446476379

Part e

Now, we have to find above probability by using MATLAB command

Syntax: Y = binomcdf(x,n,p)

MATLAB OUTPUT

Y = binomcdf(30,50,0.6)

Z = 1 – Y          \ [P(X>30) = 1 – P(X30)]\

Z = 0.446476

Required probability = 0.446476

Probabilities in above two parts are same.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote