Which of the following code create n samples of size “size” with probability prob from the binomial ?
A. z <- rinom(n,size,prob)
B. z <- rbinom(n,size,prob)
C. z <- binom(n,size,prob)
D. All of the mentioned
Answer:B
Which of the following code create n samples of size “size” with probability prob from the binomial ?
A. z <- rinom(n,size,prob) B. z <- rbinom(n,size,prob) C. z <- binom(n,size,prob) D. All of the mentioned
Explanation:To use the rbinom() function, you need to define three parameters.[/expand] 2. Which of the following code create a n item vector of random normal deviates ?