Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Discrete Random Variables

A random variable XX takes on values that depend on the outcomes of a random experiment.

  • Each value this variable takes on depends on a probability (outcomes cannot be determined with certainty).
  • The values of a random variable can vary with each repetition of the experiment.


A discrete random variable can only take on a finite number of values (it has a countable number of possible values).


Example

Which of the following is/are discrete random variables?


1. XX represents the number of heads that shows up in 3 consecutive tosses of a fair coin. → ________

  • Tossing a fair coin 3 times is a random experiment, each toss of a head has a probability of 12\frac{1}{2}
  • XX can take on four possible values (0 heads, 1 head, 2 heads, or 3 heads), each with a specific probability


2. XX represents the number of correct answers a student gets by randomly guessing the answers to 10 multiple choice questions, each with 1 correct option and 3 incorrect ones. → ________

  • Guessing the answer 10 times is a random experiment, each correct answer has a probability of 14\frac{1}{4}
  • XX can take on 11 possible values (0 correct, 1 correct, 2 correct, ... , 10 correct), each with a specific probability


3. XX represents the height of a customer who is randomly selected at a grocery store. → ________

  • Although randomly selecting a customer and measuring their height is a random experiment, XX does NOT take on a finite (countable) number of possible values since a customer can take on any height within a certain range (ex. they can be 151cm, 151.2cm, 151.22cm, 151.222cm, etc.)




Practice: Discrete Random Variables

Which of the following are discrete random variables? (Check all that applies.)

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Probability Distribution Function

Image illustrating Probability Distribution Function


The probability distribution function (PDF) of a discrete random variable XX lists all possible values this variable can take, along with their associate probabilities.


The PDF of a discrete random variable is usually expressed as a table:

xP(X=x)x1P(X=x1)x2P(X=x2)x3P(X=x3)⋮⋮all possible valuesthat X can take onthe probability that X takes on the value in the x column\begin{array}{|c|c|} \hline x & P(X=x)\\ \hline \\ x_1&P(X=x_1)\\ \\ x_2&P(X=x_2)\\ \\ x_3&P(X=x_3)\\ \\ \vdots&\vdots \\ \\ \begin{array}{cc}\text{all possible values}\\ \text{that X can take on}\end{array} & \begin{array}{cc}\text{the probability that}\\\text{ X takes on the value }\\ \text{in the }x\text{ column}\end{array}\\ \\ \hline \end{array}

Notes

  1. 0≤P(xi)≤1→0\leq P(x_i)\leq{1\rightarrow} each probability is between 0 and 1
  2. ∑P(xi)=1→\displaystyle \sum P(x_i)={1\rightarrow} the sum of all probabilities is equal to 1

Example

A bird laid 4 eggs. Let XX be the number of baby birds that are born (hatched) healthy.


Here's the PDF of XX:


xP(X=x)00.110.220.430.240.1\begin{array}{|c|c|} \hline x&P(X=x)\\ \hline 0&0.1\\ \hline 1&0.2\\ \hline 2&0.4\\ \hline 3&0.2\\ \hline 4&0.1\\ \hline \end{array}


  • XX can only take on a finite number of possible values (the bird can have any whole number of healthy babies between 0 and 4)
  • All the possible values are listed
  • x={0,1,2,3,4}x=\left\{0,1,2,3,4\right\}
  • The probabilities associated with each possible xx is listed and 0≤P(xi)≤10\le P(x_i)\le1
  • The sum of all probabilities P(xi)P(x_i)'s is equal to 1


Image illustrating Probability Distribution Function







Portions of information contained in this publication/book are printed with permission of Minitab, LLC. All such material remains the exclusive property and copyright of Minitab, LLC. All rights reserved.



Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Expected Value, Variance, and Standard Deviation of Discrete Random Variables

Let XX be a discrete random variable.


The expected value or mean of XX is denoted by E(X)E(X) or μ\mu , and is calculated by

E(X)=μ=∑[xi×P(xi)]\boxed{E(X)=\mu=\sum \left[x_i\times P(x_i) \right]}


The variance of XX is denoted by Var(X)Var(X) or σ2\sigma^2, and is calculated by

Var(X)=σ2=∑[(xi−μ)2×P(xi)]orVar(X)=σ2=E(X2)−μ2orVar(X)=σ2=[∑xi 2×P(xi)]−μ2\boxed{ \begin{array}{c} Var(X)=\sigma^2=\sum\left[(x_i-\mu)^2\times P(x_i)\right]\\ \\ \text{or}\\ \\ Var(X)=\sigma^2=E(X^2)-\mu^2\\ \\ \text{or}\\ \\ Var(X)=\sigma^2=\left[\sum x_i^{\ 2}\times P(x_i)\right]-\mu^2 \end{array}}



The standard deviation of XX is denoted by SD(X)SD(X) or σ\sigma, and is calculated by

SD(X)=σ=Var(X)\boxed{SD(X)=\sigma=\sqrt{Var(X)}}


Example

Let XX be the random variable that represents the number of Heads that comes up in 2 consecutive tosses of a fair coin. Find the mean, variance, and standard deviation of XX.


Here's the PDF of X, along with some additional columns that will help with the calculation of mean, variance, and standard deviation.


  • TT: x=0x=0 Heads; P(X=0)=14P(X=0)=\frac{1}{4}
  • TH or HT: x=1x=1 Heads; P(X=1)=14+14=24P\left(X=1\right)=\frac{1}{4}+\frac{1}{4}=\frac{2}{4}
  • HH: x=2x=2 Heads; P(X=2)=14P\left(X=2\right)=\frac{1}{4}


xP[X=x]xi⋅P(xi)x2xi2⋅P(xi)01/4002=00×1/4=012/42/412=11×2/4=2/421/42/422=44×1/4=4/4\begin{array}{c|c|c|c|c} x&P[X=x]&\color{orange}x_i\cdot P(x_i)&\color{green}x^2 &\color{blue}x_i^2\cdot P(x_i)\\ \hline\\ 0&1/4&\color{orange}0&\color{green}0^2=0&\color{blue}0\times1/4=0\\ \\ 1&2/4&\color{orange}2/4&\color{green}1^2=1&\color{blue}1\times2/4=2/4\\ \\ 2&1/4&\color{orange}2/4&\color{green}2^2=4&\color{blue}4\times1/4=4/4 \end{array}

Mean

E(X)=μ=∑[xi⋅P(xi)]E(X)=\mu=\sum_{ }^{ }\left[x_i\cdot P(x_i)\right]


μ=0+24+24\displaystyle \mu=0+\frac{2}{4}+\frac{2}{4}


μ=1\mu=1




Variance

Var(X)=[∑xi 2⋅P(xi)]−μ2Var(X)=\left[\sum_{ }^{ }x_i^{\ 2}\cdot P(x_i)\right]-\mu^2


Var(X)=[0+24+44]−(1)2\displaystyle Var(X)=\left[0+\frac{2}{4}+\frac{4}{4}\right]-\left(1\right)^2


Var(X)=64−1\displaystyle Var(X)=\frac{6}{4}-1


Var(X)=12\displaystyle Var(X)=\frac{1}{2}



Standard Deviation

SD(X) or σ=Var(X)SD(X)\text{ or }\sigma=\sqrt{Var\left(X\right)}

=12=\sqrt{\frac{1}{2}}


Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Example: Expected Value & Standard Deviation

Suppose you roll a fair die once. Let X be the number you get.


Find the expected value, variance, and standard deviation of XX.


All the possible outcomes: x={1,2,3,4,5,6}x=\left\{1,2,3,4,5,6\right\}


Here is the PDF:

Image illustrating Example


Expected Value or Mean


E(X)=∑(xi)P(X=xi)\displaystyle E\left(X\right)=\sum_{ }^{ }\left(x_i\right)P\left(X=x_i\right)

E(X)=(1)(16)+(2)(16)+(3)(16)+(4)(16)+(5)(16)+(6)(16)\displaystyle E\left(X\right)=\left(1\right)\left(\frac{1}{6}\right)+\left(2\right)\left(\frac{1}{6}\right)+\left(3\right)\left(\frac{1}{6}\right)+\left(4\right)\left(\frac{1}{6}\right)+\left(5\right)\left(\frac{1}{6}\right)+\left(6\right)\left(\frac{1}{6}\right)


E(X)=3.5E(X)=3.5

Variance


Method 1:

σx2\displaystyle \sigma_x^2

=(∑(xi2)P(X=xi))−(μx)2  \displaystyle=\left(\sum_{ }^{ }\left(x_i^2\right)P\left(X=x_i\right)\right)-\left(\mu_x\right)^2\ \

=[(1)2(16)+(2)2(16)+(3)2(16)+(4)2(16)+(5)2(16)+(6)2(16)]−(3.5)2\displaystyle =\left[\left(1\right)^2\left(\frac{1}{6}\right)+\left(2\right)^2\left(\frac{1}{6}\right)+\left(3\right)^2\left(\frac{1}{6}\right)+\left(4\right)^2\left(\frac{1}{6}\right)+\left(5\right)^2\left(\frac{1}{6}\right)+\left(6\right)^2\left(\frac{1}{6}\right)\right]-\left(3.5\right)^2

=2.9167=2.9167


Method 2:

σx2\displaystyle \sigma_x^2

=∑(xi−μx)2P(X=xi)\displaystyle=\sum_{ }^{ }\left(x_i-\mu_x\right)^2P\left(X=x_i\right)

=(1−3.5)2(16)+(2−3.5)2(16)+(3−3.5)2(16)+(4−3.5)2(16)+(5−3.5)2(16)+(6−3.5)2(16)\displaystyle=\left(1-3.5\right)^2\left(\frac{1}{6}\right)+\left(2-3.5\right)^2\left(\frac{1}{6}\right)+\left(3-3.5\right)^2\left(\frac{1}{6}\right)+\left(4-3.5\right)^2\left(\frac{1}{6}\right)+\left(5-3.5\right)^2\left(\frac{1}{6}\right)+\left(6-3.5\right)^2\left(\frac{1}{6}\right)

=2.9167=2.9167


Standard Deviation


σx=2.9167=1.7078\sigma_x=\sqrt{2.9167}=1.7078

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Example: Probability Distribution Function


The exact number of cookies in a box varies from box to box according to the probability distribution function (PDF) given by:


Image illustrating Example



(a) What is the probability of getting exactly 20 cookies?


Find the probability of 20 using the complement rule:

P(x=20)=1−all other probabilities=1−0.30−0.22−0.10−0.18−0.08=0.12P\left(x=20\right)=1-all\ other\ probabilities=1-0.30-0.22-0.10-0.18-0.08=0.12


(b) Find the probability that there are exactly 18 cookies given that there are at least 18 cookies in a jar.


Conditional probability:

P(18 cookies∣ at least 18 cookies)=P(X=18)P(X⩾18)=0.180.18+0.08+0.12=0.474P\left(18\ cookies|\ at\ least\ 18\ cookies\right)=\frac{P\left(X=18\right)}{P\left(X\geqslant18\right)}=\frac{0.18}{0.18+0.08+0.12}=0.474



(c) If in fact there are at most 17 cookies in a jar, what is the probability that there will be at least 16 cookies in the jar?


Conditional probability:

P(at least 16 ∣ at most 17)=P(X⩾16)P(X⩽17)=0.22+0.100.30+0.22+0.10=0.516P(at\ least\ 16\ |\ at\ most\ 17)=\frac{P\left(X\geqslant16\right)}{P\left(X\leqslant17\right)}=\frac{0.22+0.10}{0.30+0.22+0.10}=0.516



Amori is good at math and spelling so she entered a math contest and a spelling bee. The probability of her winning each contest is listed below. Assume the two contests are independent.


Illustration for practice question: Discrete Random Variable

(a) What is the probability that she wins both contests?

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Anna and Louis are newlyweds and plan to have children.


Suppose they have three children. Let X be the number of boys, where X=0,1,2,3X=0,1,2,3.


*Assume the probability of getting a boy is 50% and the probability of getting a girl is 50%.


Complete the probability table:


For P(X), provide answers with three decimal places (e.g. 0.175)

Illustration for practice question: Randomness and Probability


X0123
P(X=x)

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Practice: Expected Value & Standard Deviation

Find the expected value and standard deviation.



Illustration for practice question: Practice: Expected Value & Standard Deviation



Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice