In: Math
Use R to answer the following question. Copy and paste the code and answer from R into your paper.
On the average,five cars arrive at a particular car wash every
hour. Let X count the number of cars that arrive from 10 AM to 11
AM. Then X ∼pois(lambda = 5). Also, μ = σ2 = 5.
What is the probability that no car arrives during this
period?
Suppose the car wash above is in operation from 8AM to 6PM, and
we let Y be the number of customers that appear in this period.
Since this period covers a total of 10 hours. What is the
probability that there are between 48 and 50 customers,
inclusive?
a) The probability that no car arrives during the period can be obtained using the following R code:
> ppois(0,lambda =
5) # function ppois gives the
area covered till given value or
proabability of getting till that value.
(First argument is the number of
desired output which is zero in this case)
[1] 0.006737947 # probability that no car arrives during the
period.
b) Now since car wash operates for 10 hours, the resulting distribution is summation of 10 poisson distribution, thus it is a poission distribution with lambda = 10*5 = 50.
Now probability that there are 48 and 50 customers can be found by subtracting probability of getting less than or equal to 48 customers from probability of getting less than or equal to 50 customers, following is the R code for the same:
> ppois(50,lambda =
50)-ppois(48, lambda = 50)
#ppois(50,lambda=50) calculates probability of getting less than or
equal to 50 customers,
ppois(48,lambda) calculates the
probability of getting less than or equal to 48 customers.
[1] 0.11265 #probability of getting between 48 and 50
customers.