Simulating Coin Flips
In these exercises, you’ll practice using the rbinom() function, which generates random “flips” that are either 1
(“heads”) or 0 (“tails”). Instructions
Simulate 10 coin flips, each with a 30% chance of coming up 1 (“heads”). Solution
# Generate 10 separate random flips with probability .3
rbinom(10,1,.3)
In the last…