You can solve the questions below using R really easily with the
dbinom() function. We’ll ask you to use the
dbinom() function in Questions 3 and 4. You could use it to
answer Questions 1-2 too, but try to do them by hand first, and use
dbinom only to check your answers.
We’re doing an experiment where someone guesses which hand a coin is in. We do the experiment 5 times (n=5), the probability of success is 0.5 (p=0.5). What is the probability of getting only one correct?
We’re doing an experiment where someone guesses which hand a coin is in. We do the experiment 5 times (n=4), the probability of success is 0.5 (p=0.5). What is the probability of getting only one correct?
Use the dbinom() function for this problem. We’re doing
an experiment where someone guesses which hand a coin is in. We do the
experiment 20 times (n=20), the probability of success is 0.25 (p=0.5).
What is the probability of getting only 5 correct?
You can use the dbinom() function for this problem
(hint: you could also use something else to do it faster). We’re doing
an experiment where someone guesses which hand a coin is in. We do the
experiment 20 times (n=20), the probability of success is 0.25 (p=0.5).
What is the probability of getting 14 or less correct?
Scroll down for answers
dbinom(1, size=5, prob=0.5).dbinom(1, size=4, prob=0.5).dbinom(5, size=20, prob=0.5).dbinom(1, size=20, prob=0.25) + dbinom(1, size=20, prob=0.25) + ... +
... + ... + dbinom(14, size=20, prob=0.25). pbinom(14, size = 20, prob=.25).