# How to Simulate a Coin Toss in R

# The power of a simple function

I wonder if one day in our lifetimes, someone will ask us what a “quarter” is. It’s not totally out of the question.

Right now, the concept of loose change is still widely known, so let’s use the coin toss example to illustrate how you can calculate the probability of a certain number of heads (and tails) easily and efficiently.