Randomness and Probability

Discrete Random Variables
A random variable X 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. X 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 21
- X can take on four possible values (0 heads, 1 head, 2 heads, or 3 heads), each with a specific probability
2. X 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 41
- X can take on 11 possible values (0 correct, 1 correct, 2 correct, ... , 10 correct), each with a specific probability
3. X 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, X 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.)

Probability Distribution Function

The probability distribution function (PDF) of a discrete random variable X 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:
Notes
- 0≤P(xi)≤1→ each probability is between 0 and 1
- ∑P(xi)=1→ the sum of all probabilities is equal to 1
Example
A bird laid 4 eggs. Let X be the number of baby birds that are born (hatched) healthy.
Here's the PDF of X:
x01234P(X=x)0.10.20.40.20.1
- X 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}
- The probabilities associated with each possible x is listed and 0≤P(xi)≤1
- The sum of all probabilities P(xi)'s is equal to 1

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.

Expected Value, Variance, and Standard Deviation of Discrete Random Variables
Let X be a discrete random variable.
The expected value or mean of X is denoted by E(X) or μ, and is calculated by
The variance of X is denoted by Var(X) or σ2, and is calculated by
The standard deviation of X is denoted by SD(X) or σ, and is calculated by
Example
Let X 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 X.
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=0 Heads; P(X=0)=41
- TH or HT: x=1 Heads; P(X=1)=41+41=42
- HH: x=2 Heads; P(X=2)=41
x012P[X=x]1/42/41/4xi⋅P(xi)02/42/4x202=012=122=4xi2⋅P(xi)0×1/4=01×2/4=2/44×1/4=4/4
Mean
E(X)=μ=∑[xi⋅P(xi)]
μ=0+42+42
μ=1
Variance
Var(X)=[∑xi 2⋅P(xi)]−μ2
Var(X)=[0+42+44]−(1)2
Var(X)=46−1
Var(X)=21
Standard Deviation
SD(X) or σ=Var(X)
=21

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 X.
All the possible outcomes: x={1,2,3,4,5,6}
Here is the PDF:

Expected Value or Mean
E(X)=∑(xi)P(X=xi)
E(X)=(1)(61)+(2)(61)+(3)(61)+(4)(61)+(5)(61)+(6)(61)
E(X)=3.5
Variance
Method 1:
σx2
=(∑(xi2)P(X=xi))−(μx)2
=[(1)2(61)+(2)2(61)+(3)2(61)+(4)2(61)+(5)2(61)+(6)2(61)]−(3.5)2
=2.9167
Method 2:
σx2
=∑(xi−μx)2P(X=xi)
=(1−3.5)2(61)+(2−3.5)2(61)+(3−3.5)2(61)+(4−3.5)2(61)+(5−3.5)2(61)+(6−3.5)2(61)
=2.9167
Standard Deviation
σx=2.9167=1.7078

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:

(a) What is the probability of getting exactly 20 cookies?
Find the probability of 20 using the complement rule:
(b) Find the probability that there are exactly 18 cookies given that there are at least 18 cookies in a jar.
Conditional probability:
(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:
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.

(a) What is the probability that she wins both contests?
(b) What is the probability that she wins neither of the contests?
(c) Let X be his total award winnings of the two contests. Complete the probability table:
- For X, do not include $ sign or commas (e.g. 10000, not $10,000).
- For P(X), provide answer with two decimal places (e.g. 0.25)
| Outcome (X) | Win Neither | Win Math Only | Win Spelling Only | Win Both |
| X | ||||
| P(X=x) |
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,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)

| X | 0 | 1 | 2 | 3 |
| P(X=x) |
Practice: Expected Value & Standard Deviation
Find the expected value and standard deviation.
