In: Statistics and Probability
I. Simulate a binomial random variable. Consider a class with 60 students, and the probability that a student does not turn in a homework is 0.10 (a “success”). Assume all students are independent of all other students, and the probability does not change.(a) Use sample to simulate drawing 60 students who either do, or do not, turn in their homework, and then find the total (out of 60) who did not turn in their homework. You should return one number,X= total # of students out of 60 who did not turn in their homework.
Using R
Following are the steps,
R code with comments (all statements starting with # are comments
#get this output
X=4 in this first draw from Binomial distribution.