a b will calculate the product ofa and b choose(nx) will calculate ncr ie.. hons
ID: 3180211 • Letter: A
Question
Explanation / Answer
Since R code is requested, I am providing the answer in R code with comments:
#Rcode start:
#Clear environment
rm(list=ls())
#The problem follows a binomial distribution, there are only two outcomes, piston rejected with a probability of 10% or p = 0.1 and accepted with a probability of 1- p = 0.9
#Sample size; n = 20
n<-20
#Qn(a) no more than 5 rejects:
#We can get the answer by applying the function dbinom()as below
sum(dbinom(0:5,20,0.1))#Taking probablity of all possible number of rejects till 5 rejects
#Output and Answer:0.9887469, the probability of no more than 5 rejects is 98.8747%
#Qn(b) at least 5 rejects
##We can get the answer by applying the function dbinom()as below
sum(dbinom(5:20,20,0.1))
#Answer: 0.0431745, Hence probability of at least 5 rejects is 4.3175 %
#Qn(C): between 5 to 12 rejects
#Function dbinom
sum(dbinom(5:12,20,0.1))
#Answer: 0.04317449, Probability of 5-12 rejects is 4.3174%
#Qn(d): How many rejects do you expect from the above selected batch
#The question asks about the expection
#the expectation for a binomial distribution is given by, Expectation = np ( 20 *0.1)
20*0.1
#Answer is 2, the expected rejects in 20 pistons is 2
#Rcode end
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.