In this video we generate a Bernoulli random variables using R. We familiarize ourselves with boolean variables and logical conditions in R.

R commands and functions:

R commands and functions:

- a < b - returns TRUE if a is less than b and FALSE otherwise
- rbinom(n,1,p) - generates n draws from bernoulli distribution distribution with parameter p