Question: Run the following code in RStudio to find the probability distribution for X, a binomial random variable with 72 trials and success probability 0.12345. n=72
Run the following code in RStudio to find the probability distribution for X, a binomial random variable with 72 trials and success probability 0.12345.
n=72
p=.12345
xvals <- 0:n
xprobs <- dbinom(0:n, n, p)
What is P(X=8)? Round your answer to 4 decimal places after "undoing" scientific notation. Hints: the numbers in brackets on the left indicate which term in the sequence starts that row. For example, 7.095432e-02 is the 13th number inxprobs, which corresponds to P(X=12) (since the 1st number, 7.584413e-05, corresponds to zero successes). Also, a refresher on scientific notation: the 7.095432e-02 is scientific notation for the number 0.07095432 (by moving the decimal to the left 2 spaces... left because of the negative sign and 2 spaces because of the 2).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
