In: Statistics and Probability
Can you explain with R Code:
The probability that an electronic component fails in the first day of operation is 0.005. 400 items are tested independently and whether they fail or not after a day will be recorded.
(a)What is the distribution of the number of items that fail?
(b) What is the probability that at least two items fail?
(c) Give the Poisson approximation for a, and compute the approximate answer to part b based on the Poisson approximation?
Comment on the accuracy of the approximation.
R CODE :
# Part (b)
1- pbinom ( 1, 400, 0.005)
#-- It gives 1-P (X <=1) ,where pbinom is the Cdf of Binomial evaluated at 1, and parameters are n=400, p=0.005.
# Part (c)
1- ppois (1,2)
#-- It gives 1- P (X <=1) ,where ppois is the Cdf of Poisson evaluated at 1, and parameter is =2