Exam 1: R Markdown File

Question 6/14: Binomial and Exponential probability

plot(x=0:10,dpois(0:10,4.5),main="Poisson Distribution of Breakdown Probability",xlab="Breakdowns per Day",ylab="Probability of Breakdown Number")

Here we can see a Probability Mass Function(PMF) that illustrates the mean breakdown number per day, and the likelihood of breakdowns either exceeding or falling short of that number, in this case 4.5 per day.

What is the probability that there will be less than 3 breakdowns in a day?

dat1<-ppois(3,4.5)
dat1
## [1] 0.342296

By using the cumulative density function of poisson(ppois()), we can find the likelihood of there being 3 or less breakdowns per day of the robot arm. This function includes all probabilities up to the cutoff number x, which is 3 in this case.

Likelihood that a breakdown is less than 2 hours

dat2<-ppois(1,1.7778)
dat2
## [1] 0.4694748

By simply dividing the total work hours in a day by the average amount of breakdowns, we can also alter the poisson formula to give us an approximate likelihood of the time between breakdowns being less than 2 hours.

Question 11: Z-Score Probability

curve(dnorm(x,200,30),120,280,main="PDF of Normal(x,200,30)",xlab="Package mass",ylab="Probability")

Here is a plot representing the Probability Density Function for the likelihood of the Packages’ mass. The mean is 200, and the Standard Deviation is 30. As you can see on either side of the distribution, the further away from the mean you get in terms of mass, the lower the probability.

The probability that a package’s mass does not exceed 150 grams

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

By using the cumulative version of the normal distribution function, the probability of a package being less than 150 grams in mass is easily found. It simply compounds all probability of the weights up to and less than 150 grams, which is quite small considering how far below 150 is from the mean in the first place.