Bernoulli random variables: mean, variance, and standard deviation
A yes-or-no result can become a numerical random variable when we code the two outcomes as zero and one. That is a Bernoulli random variable. We’ll use a peanut-butter survey to see what its mean and spread tell us.
Code one trial as zero or one
A Bernoulli variable describes one trial: for success and for failure. The word success labels the outcome we choose to count. If its probability is , then
The parameter satisfies . A Bernoulli variable is a binomial variable with one trial. A general binomial variable counts successes across several trials and can take values beyond just zero and one.
Example: Model a student’s survey answer
Suppose of the students in my class like peanut butter. Choose one student from that class at random. Code liking peanut butter as and disliking it as . Then , and the probability of is .
Find the mean as a probability-weighted average
For the class example, . Each individual outcome is still either or . The mean describes the long-run average of the numerical codes, which is the proportion of successes.
Find the variance
Weight each squared distance from the mean by the probability of that outcome.
Using gives
The same result comes from .