A Bernoulli random variable is a single coin flip with bias p — it's 1 ("success") with probability p, and 0 otherwise. It's the building block every other discrete distribution in this section is made from.
Task: write bernoulli_stats(p, x) returning [pmf, mean, variance], each rounded to 4 decimal places.
p itself.p(1-p) — it's largest at p = 0.5, where the outcome is least predictable.