Skip to main content
Statistics LibreTexts

4.1: Probability

  • Page ID
    51793
  • \( \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}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    The basic definition of probability is a ratio of things you can count (a ratio of their frequencies) :

    \[\begin{equation*} P(E) = \frac{n(E)}{n(S)} \end{equation*}\]

    where

    \(P(E)\) is the probability that event \(E\) happens,
    \(n(E)\) is the number of ways \(E\) can happen and
    \(n(S)\) is the total number of outcomes (all possibilities).

    Example 4.1 : What is the probability of drawing a queen from a deck of cards :

    \[P(E) = \frac{4}{52} = 0.077 \mbox{\ \ \ (7.7\% if we were to express the result in percentages)}\]

    To use \(P(E)\) mathematically we set

    \[0 \leq P(E) \leq 1 \]

    Where, probability-wise:

    0 means \(E\) definitely will not occur, and
    1 means \(E\) definitely will occur.

    This is a method we can use instead of using percent. To compute probabilities, we first need to know how to count.

    Fundamental Counting Rule

    Say you have n events in order, and for event \(i\) there are \(k_{i}\) ways for it to happen. Then the number of ways for the \(n\) events to play out is :

    \[ k_1 \cdot k_2 \cdot k_3 \hdots k_n = \prod_{i=1}^{n} k_i \]

    (The giant pi symbolizes a multiplication convention in the same way that a giant sigma symbolizes a summation convention as described in Section 1.3.)

    Example 4.2 How many combinations are there on a lock with 3 numbers?

    Lay out the events as : \(k_{1}=10\), \(k_{2}=10\), and \(k_{3}=10\). Note that each number can be anything from 0 to 9 giving 10 possibilities (\(k_{i} = 10\)) for each event. So the number of possible lock combinations is

    \[ k_1 k_2 k_3 = 10 \cdot 10 \cdot 10 = 10^3 = 1000 \]

    Note that you could have guessed this because the combination range from 000 to 999 — counting in base 10.

    Example 4.3 Suppose that a hardware store can produce paints with the following qualities :

    Colour : red, blue, white, black, green, brown, yellow (7 colours)

    Type : latex, oil (2 types)

    Texture : flat, semigloss, high-gloss (3 textures)

    Use : indoor, outdoor (2 uses)

    How many ways are there to combine these qualities to produce a can of paint?

    Answer : From the above list \(k_{1}=7, k_{2}=2, k_{3}=3, k_{4}=2\) and the number of possible paint kinds is:

    \[ 7 \cdot 2 \cdot 3 \cdot 2 = 84 \]

    Applications of the Fundamental Counting Rule

    We are interested in applying the fundamental counting rule to two special, important cases :

    1. Permutations.
    2. Combinations.

    Let’s define each one.

    1. Permutations.

    The number of ways, or permutations, of selecting \(r\) objects from a collection or \(n\) objects, while keeping track of the order of selection is [1]

    \[ {}_{n}P_{r} = \frac{n!}{(n-r)!} \]

    This formula follows from the fundamental counting rule. With \(n\) objects there are \(k_{1} = n\) ways to select the first object. After selecting the first object there are \(n-1\) ways to choose the second object so \(k_{2} = n-1\), etc. up to \(k_{r} = n - r + 1\) :

    \[ {}_nP_r = (n)(n-1)(n-2) \hdots (n-r+1)\] \[ = \frac{(n)(n-1) \hdots (2)(1)}{(n-r)(n-r-1) \hdots (2)(1)} \]

    Example 4.4 : How many ways are there to choose 5 numbered balls from a bucket of 25 to make a lottery number?

    Answer : \(25 \cdot 24 \cdot 23 \cdot 22 \cdot 21 = 6,375,600\) possibilities.

    2. Combinations.

    The number of ways of selecting \(x\) objects from a collection of \(n\) objects without caring about the order is :

    \[ {}_nC_x = \frac{n!}{(n-x)!x!} = \frac
    ParseError: invalid DekiScript (click for details)
    Callstack:
        at (Bookshelves/Applied_Statistics/Introduction_to_Applied_Statistics_for_Psychology_Students_(Sarty)/04:_Probability_and_the_Binomial_Distributions/4.01:_Probability), /content/body/span, line 1, column 1
    
    {3,628,800} = \underline{17.3 \times 10^{12}} \]

    The symbol \(\left( \begin{array}{c} n \\ x \end{array}\right)\) is also known as the binomial coefficient because it shows up in algebra when you expand expressions of the form \((x+y)^{n}\). For example[2]

    \[ (x+y)^n = x^2 + 2xy + y^2 \] \[\begin{eqnarray*} (x+y)^3 &=& \left( \begin{array}{c} 3\\0 \end{array} \right)x^3 + \left( \begin{array}{c} 3\\1 \end{array} \right)x^2y + \left( \begin{array}{c} 3\\2 \end{array} \right) xy^2 + \left( \begin{array}{c} 3\\3 \end{array} \right) y^3 \\ &=& x^3 + 3x^2y + 3xy^2 + y^3 \end{eqnarray*}\]

    The binomial coefficients can be quickly computed using Pascal’s triangle :

    \[ \begin{array}{ccccccccccccccc} &&&&&&&&&&&&&& n = \\ &&&&&& 1 &&&&&&&& 0 \\ &&&&& 1 && 1 &&&&&&& 1 \\ &&&& 1 && 2 && 1 &&&&&& 2 \\ &&& 1 && 3 && 3 && 1 &&&&& 3 \\ && 1 && 4 && 6 && 4 && 1 &&&& 4 \\ & 1 && 5 && 10 && 10 && 5 && 1 &&& 5 \\ 1 && 6 && 15 && 20 && 15 && 6 && 1 && 6 \\ &&&&&& \mbox{etc.} \end{array} \]

    Referring to Pascal’s triangle we can quickly write

    \[ (x+y)^6 = x^6 + 6x^5y + 15x^4y^2 + 20x^3y^3 + 15x^2y^4 + 6xy^5 + y^6 \]

    for example.


    1. Recall that the definition of factorial follows \(5! = 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1\) etc.
    2. You don't need this algebra for this statistics course. It's just interesting.

    This page titled 4.1: Probability is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Gordon E. Sarty via source content that was edited to the style and standards of the LibreTexts platform.