A shipment contains 40 electronic components. Each component has a 0.1 probability of being defective.
A quality control inspector tests 15 components.
a. What is the probability that exactly 2 components are defective?
# sample size is 15, exactly 2 comp are defective and .1 probability being defective.
dbinom(2,15,.1)
## [1] 0.2668959
b. What is the probability that at most 3 components are defective?
## [1] 0.9444444
c. Plot the PMF for the number of defectives from 0 to 15
plot(0:15, dbinom(0:15,15,.1),type="h",main="Binomial PMF,n=15,p=0.1",
xlab="Number of Defectives",ylab="Probability")
A help desk receives an average of 6 calls per hour.
a. What is the probability that exactly 8 calls are received in an hour?
## [1] 0.1032577
b. What is the probability that fewer than 5 calls are received?
## [1] 0.2850565
c. Plot the PMF for call counts between 0 and 15.
The weights of boxes shipped from a warehouse are normally distributed with a mean of 22 kg and standard deviation 3 kg.
a. What is the probability a randomly selected box weighs less than 20.5 kg?
## [1] 0.3085375
b. What is the probability a box weighs between 19 kg and 24 kg?
## [1] 0.5888522
c. Plot the PDF and CDF from 15 kg to 30 kg.
# PDF
curve(dnorm(x,22,3),from=15,to=30,main="Normal PDF:mean=22,sd=3",
xlab="Weight",ylab="Chance")
A customer service center takes on average 12 minutes to resolve a ticket. Let X ~ Exp(rate = 1/12).
a. What is the probability that a resolution takes less than 8 minutes?
## [1] 0.4865829
b. What is the probability that it takes between 10 and 18 minutes?
## [1] 0.211468
c. Plot the PDF and CDF from 0 to 40 minutes.
The life of a machine component is modeled as a Gamma distribution with shape = 3.5 and scale = 4.2 hours.
a. What is the probability the component lasts more than 18 hours?
## [1] 0.2849066
b. What is the probability it lasts between 10 and 16 hours?
## [1] 0.3216122
c. Plot the PDF and CDF from 0 to 40 hours.