Exam 1 Midterm

Statistics 1

{#Poisson distribution with an average of 4.5 breakdowns per day} plot(x=0:10,dpois(x=0:10,lambda=4.5),main="PMF of Poisson Robotic Breakdowns (lambda=4.5)", xlab="X",ylab="f(x)")

#P(X<=3), Lambda=4.5
ppois(3,4.5)
## [1] 0.342296
#Use the poisson distribution function or in this case we'll use the ppois to compute probability we get 3 or fewer breakdowns. It'll be written as (x<=3). Ppois is used any time we have some kind of continuity when < or > is in place. 
#Assuming there is a 8 hr workday and there are 4.5 breakdowns/8 hr work day, the equivalent would 1.125 breakdowns/2 hours. You'll set 4.5/8=?/2hrs. The ?=1.125 which is the number of breakdowns/2hrs and this will be the new lambda to use in Poisson Distribution. 
#X~N(200,30)
#graph PDF of Normal (5,4)
curve(dnorm(x,200,30),120,280,main="pdf of Normal (200,30)",xlab="X",ylab="f(x)")

#This is a probability density graph in normal distribution. We are seeing the mean as 200, from range of 120 to 280. The amount from each stop is the standard deviation 30. 
#X~N(200,30)
pnorm(150,200,30)
## [1] 0.04779035
# To find the P(X<150), we'll have to standardize the normal by using the z transformation. The formula will be as such z=(x-mean)/sd. Once we get our calculation, we'll refer to the normal table to find the probabilty that coincides with the z value we found.