Package Defects

We will start with a plot of the probability mass function, or PMF, where x is the number of packages and f(x) is the probability it is defective:

plot(x=0:10,dbinom(0:10,size=10,prob=.1),main="PMF of Package Defects (n=10 & p=.1)",xlab="x",ylab="f(x)")

Now, lets calculate the probability that fewer than 2 packages will be defective.

P(x<2)

pbinom(1,10,.1)
## [1] 0.7360989

Breakdowns on a robotic assembly

Breakdowns on a robotic assembly line follow a Poisson distribution with an average of 4.5 breakdowns per day.

Analyzing a robotic assembly, we will plot the poisson distribution, where lambda is the average number of breakdowns per day,x is the number of breakdowns and f(x) is the probability of a break down in a day.

plot(x=0:10,dpois(0:10,lambda=4.5),main="PMF of breakdowns per day,lambda=4.5",xlab="x",ylab="f(x)")

Now, we will calculate the probability that there will be 3 or fewer breakdowns in a day P(x<=3):

ppois(3,4.5)
## [1] 0.342296

Now, Let’s calculate the probability of the time between consecutive breakdowns being less than 2 hours in duration assuming an a hour work day, using exponential distribution, P(x<2). Taking lambda =1.5

pexp(1,1.5)
## [1] 0.7768698

Automatic Bagging Machines

Automatic bagging machines are designed to seal packages at 200 grams, with a standard deviation of 30 grams. Assume the weights are normally distributed.

Let’s plot the normal probability distribution function from 120 to 280 grams, taking x as the mass of the package and f(x) as the probability that a package is sealed with the respective mass

curve(dnorm(x,200,30),120,280,main="Normalized PDF for Automic Bagging Machine",xlab="x",ylab="f(x)")

Now let’s calculate the probability that a package is sealed with less that 150 grams using normal distribution

pnorm(150,200,30)
## [1] 0.04779035