Can you explain with R Code:
The probability that a car salesman successfully completes as sale to a customer is 0.13.
The salesman has decided to attempt car sales 1 until he has successfully completed six sales. His success/failure at completing a sale to different customers is independent.
(a) What is the probability that he will need to attempt ten sales?
(c) What is the expected value and variance of the number of sales that he needs to attempt?
(b) What is the expected value and variance of the number of sales that he needs to attempt?
(a)
Let X be the number of car sales attempts to successfully completed six sales.
X ~ NegativeBinomial(r = 6, p = 0.13)
The probability mass function of X is,
= 0.0003484237
In R, the negative binomial distribution, represents the number of failures which occur in a sequence of Bernoulli trials before a target number of successes is reached.
The number of failures = 4
Number of successes = 6
Using R code, we get the same answer
> dnbinom(4, size = 6, prob = 0.13)
[1] 0.0003484237
(b)
Expected value of the number of sales that he needs to attempt = r / p = 6 / 0.13 = 46.15385
(c)
Variance of the number of sales that he needs to attempt = r (1-p) /
= 6 * (1 - 0.13) /
= 308.8757
Get Answers For Free
Most questions answered within 1 hours.