Skip to main content
Statistics LibreTexts

6.5: Bernoulli Distribution

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    We will now explore specific random variables that are frequently used in practice. These random variables will be generalized by parameters. We will start with the simplest of all random variables, the Bernoulli Distribution, also known as the indicator variable. This random variable, \(X\),  is designed for a yes/no or success/failure question. If the answer is Yes/Success, then \(X = 1\). If the answer is No/Failure, then \(X = 0\). The probability of success is \(p\), and the probability of failure is \(q = 1‐p\).

    \(X\) \(P(X)\)
    0 \(q = 1‐p\)
    1 \(p\)

    Example: Free throw shooting


    Draymond Green66, an NBA basketball player for the Golden State Warriors, is a 70% free throw shooter. This means when he shoots a free throw, there is a 70% probability that he will make the shot. The random variable \(X\) = the number of successes when Draymond Green takes a free throw follows a Bernoulli Distribution with \(p =0.7\) (success) and \(q = 0.3\) (failure). Determine the pdf, mean and variance of the random variable.

    \(x\) \(P(x)\) \(x \cdot P(x)\) \(x-\mu\) \((x-\mu)^{2}\) \((x-\mu)^{2} \cdot P(x)\)
    0 0.30 0.00 ‐0.70 0.49 0.147
    1 0.70 0.70 0.30 0.09 0.063
    Total 1 \(0.7=\mu\)     \(0.21=\sigma^{2}\)


    The mean and variance can be calculated directly for the Bernoulli Random Variable.

    \(x\) \(P(x)\) \(x \cdot P(x)\) \(x-\mu\) \((x-\mu)^{2}\) \((x-\mu)^{2} \cdot P(x)\)
    0 \(1‐p\) 0 \(‐p\) \(p^{2}\) \((1-p) p^{2}\)
    1 \(p\) \(p\) \(1‐p\) \((1-p)^{2}\) \(P(1-p)^{2}\)
    Total 1 \(\mu = p\)     \(\sigma^{2}=p(1-p)=p q\)

    For the Draymond Green example,  \(\mu=p=0.7\) and \(\sigma^{2}=p q=(0.7)(0.3)=.21\), which matches the answer when calculated manually

    Bernoulli Probability Distribution (parameter = \(p\))

    One trial, two possible outcomes (Success/Failure) or (Yes/No)

    \(\mathbf{P} = P\)(yes/success)


    X = Number of Yes/Successes {0, 1}


    \(\sigma^{2}=p(1-p)=p q\)


    This page titled 6.5: Bernoulli Distribution is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Maurice A. Geraghty via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.