Full disclosure…

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.

Question 1

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?

Question 2

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?

Question 3

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?

Question 4

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


Answers

  1. Check your answer with: dbinom(1, size=5, prob=0.5).
  2. Check your answer with: dbinom(1, size=4, prob=0.5).
  3. dbinom(5, size=20, prob=0.5).
  4. dbinom(1, size=20, prob=0.25) + dbinom(1, size=20, prob=0.25) + ... + ... + ... + dbinom(14, size=20, prob=0.25).
    Easier way: pbinom(14, size = 20, prob=.25).