Discrete Random Variables: Expected Values and Binomial Probability Distributions
Expected Values of Discrete Random Variables
Motivation via Sample Mean:
The expected value of a random variable generalizes the concept of the sample mean (xˉ) computed from grouped frequency data.
Consider a frequency distribution where a discrete variable takes values x with observed frequencies:
Value x=1: Frequency 3
Value x=2: Frequency 2
Value x=3: Frequency 4
Value x=4: Frequency 6
Value x=5: Frequency 8
The total number of observations is n=3+2+4+6+8=23.
The sample mean is calculated by weighting each value by its relative frequency: xˉ=231(3)+2(2)+3(4)+4(6)+5(8)xˉ=1(233)+2(232)+3(234)+4(236)+5(238)xˉ=1p(1)+2p(2)+3p(3)+4p(4)+5p(5)=∑i=15xi⋅p(xi)
In this context, the relative frequency nFreq acts as an empirical probability mass function p(x).
Formal Definition of Expected Value:
Let X be a discrete random variable with set of possible values (support) D and probability mass function (pmf) p(x).
The expected value or mean value of X, denoted by E(X) or μX (or simply μ), is given by: E(X)=μX=∑x∈Dx⋅p(x)
Shortly after birth, infants are evaluated on the Apgar scale, producing an integer score from 0 to 10.
Let X be the Apgar score of a randomly selected child born at a hospital during the next year, with pmf values:
p(0)=0.002
p(1)=0.001
p(2)=0.002
p(3)=0.005
p(4)=0.02
p(5)=0.04
p(6)=0.18
p(7)=0.37
p(8)=0.25
p(9)=0.12
p(10)=0.01
The expected value E(X) is computed as: E(X)=μ=∑x=010x⋅p(x)E(X)=0(0.002)+1(0.001)+2(0.002)+3(0.005)+4(0.02)+5(0.04)+6(0.18)+7(0.37)+8(0.25)+9(0.12)+10(0.01)E(X)=0+0.001+0.004+0.015+0.08+0.20+1.08+2.59+2.00+1.08+0.10=7.15
Example: Non-Existent Expected Value (Example 3.20):
Let X represent the number of job interviews a student completes prior to obtaining an offer, with pmf: p(x)={x2k,0,x=1,2,3,…otherwise
The constant k is chosen such that the total probability sums to 1: ∑x=1∞x2k=1
Computing the expected value yields: E(X)=μ=∑x=1∞x⋅(x2k)=k∑x=1∞x1
The summation ∑x=1∞x1 is the harmonic series, which diverges to infinity.
Consequently, the expected value does not exist as a finite real number.
Expected Value of Functions and Linear Properties
Expected Value of a Transformed Variable:
Consider a random variable X with probability distribution:
p(4)=0.5
p(6)=0.3
p(8)=0.2
Let Y=2X+1. The possible values of Y are:
y1=2(4)+1=9
y2=2(6)+1=13
y3=2(8)+1=17
The corresponding probabilities are p(9)=0.5, p(13)=0.3, and p(17)=0.2.
The expected value of Y is calculated directly as: E(Y)=9(0.5)+13(0.3)+17(0.2)=4.5+3.9+3.4=11.8
General Proposition for Functions of a Random Variable:
If X is a discrete random variable with support D and pmf p(x), the expected value of any function h(X), denoted by E[h(X)], is: E[h(X)]=∑x∈Dh(x)⋅p(x)
Linearity of Expected Value:
For a linear transformation h(X)=aX+b, where a and b are constants: E(aX+b)=a⋅E(X)+bμaX+b=a⋅μX+b
Proof of Linearity: E(aX+b)=∑x∈D(ax+b)⋅p(x)E(aX+b)=a∑x∈Dx⋅p(x)+b∑x∈Dp(x)
Since ∑x∈Dx⋅p(x)=E(X) and ∑x∈Dp(x)=1: E(aX+b)=a⋅E(X)+b
Special Cases:
Constant multiplicative scaling: For any constant a, E(aX)=a⋅E(X)
Constant additive shift: For any constant b, E(X+b)=E(X)+b
Variance and Standard Deviation of Discrete Random Variables
Formal Definitions:
Let X have pmf p(x) and expected value μ.
The variance of X, denoted by V(X), σX2, or σ2, measures the dispersion around the mean: V(X)=σX2=∑x∈D(x−μ)2⋅p(x)=E[(X−μ)2]
The standard deviation of X is the positive square root of the variance: σX=σX2=V(X)
Example: Library Checkout Video Limits (Example 3.24):
A library restricts patrons to a maximum checkout limit of 6 videos.
Let X be the number of videos checked out to a randomly selected individual, with distribution:
p(1)=0.30
p(2)=0.25
p(3)=0.15
p(4)=0.05
p(5)=0.10
p(6)=0.15
The expected checkout count is given as μ=2.85.
The variance V(X) is computed as: V(X)=σ2=∑x=16(x−2.85)2⋅p(x)V(X)=(1−2.85)2(0.30)+(2−2.85)2(0.25)+(3−2.85)2(0.15)+(4−2.85)2(0.05)+(5−2.85)2(0.10)+(6−2.85)2(0.15)V(X)=(−1.85)2(0.30)+(−0.85)2(0.25)+(0.15)2(0.15)+(1.15)2(0.05)+(2.15)2(0.10)+(3.15)2(0.15)V(X)=(3.4225)(0.30)+(0.7225)(0.25)+(0.0225)(0.15)+(1.3225)(0.05)+(4.6225)(0.10)+(9.9225)(0.15)V(X)=1.02675+0.180625+0.003375+0.066125+0.46225+1.488375=3.2275
The standard deviation is: σ=3.2275≈1.800
Shortcut Formula for Variance:
The variance can be calculated using the alternative formulation: V(X)=σ2=[∑x∈Dx2⋅p(x)]−μ2=E(X2)−[E(X)]2
Proof of the Shortcut Formula:
Expand the squared term inside the expectation definition: σ2=∑x∈D(x−μ)2⋅p(x)=∑x∈D(x2−2μx+μ2)⋅p(x)σ2=∑x∈Dx2⋅p(x)−2μ∑x∈Dx⋅p(x)+μ2∑x∈Dp(x)
Substituting ∑x⋅p(x)=E(X)=μ and ∑p(x)=1: σ2=E(X2)−2μ(μ)+μ2(1)=E(X2)−2μ2+μ2=E(X2)−μ2
Variance Under Linear Transformations:
For any linear transformation Y=aX+b: V(aX+b)=a2⋅σX2σaX+b=∣a∣⋅σX
Specific properties:
Adding a constant shifts location but leaves spread unchanged: V(X+b)=V(X)σX+b=σX
Multiplying by a constant scales variance by the square and standard deviation by the absolute value: V(aX)=a2⋅V(X)σaX=∣a∣⋅σX
The Binomial Probability Distribution
Criteria for a Binomial Experiment:
An experiment is defined as a binomial experiment if and only if it satisfies four conditions:
The experiment consists of a sequence of n smaller experiments called trials, where n is fixed in advance.
Each trial results in one of two mutually exclusive outcomes, designated generically as success (S) or failure (F).
The individual trials are mutually independent.
The probability of success, denoted by p=P(S), remains constant from trial to trial.
Classification of Experimental Setups:
Scenario 1: Toss a fair coin once.
Binomial status: No (consists of only a single trial rather than a sequence of repeated trials where n is fixed in advance for a sequence).
Scenario 2: Toss a fair coin 10 times and record whether a head appears on each toss.
Binomial status: Yes (consists of n=10 identical, independent trials with two outcomes per trial and constant probability p=0.5).
Scenario 3: Roll a fair die 10 times and record whether a 1 appears on each roll.
Binomial status: Yes (consists of n=10 independent trials with binary classification where S=rolling a 1 and F=rolling any other number, with constant p=61).
Binomial Random Variable and Parameter Notation:
The binomial random variable X represents the total count of successes observed across the n trials: X=the number of successes among the n trials
The distribution is completely characterized by the parameters n and p, denoted by X∼Bin(n,p).
The probability mass function is denoted by b(x;n,p).
Binomial Probability Mass Function Theorem:
For X∼Bin(n,p), the pmf is given by: b(x;n,p)={(xn)px(1−p)n−x,0,x=0,1,2,…,notherwise
The combinatorial term (xn)=x!(n−x)!n! represents the number of distinct ways to arrange x successes and n−x failures in a sequence of length n.
The term px(1−p)n−x denotes the probability of any single sequence containing exactly x successes and n−x failures.
Introductory Calculation: Fair Die Rolls:
Consider rolling a fair die 10 times (n=10) with success defined as rolling a 1 (p=61).
The probability of obtaining exactly 3 ones is: P(X=3)=(310)(61)3(65)7(310)=3×2×110×9×8=120P(X=3)=120(2161)(0.2790816)≈0.155
Example: Cola Preference Blind Taste Test (Example 3.31):
Six consumers (n=6) are provided two unmarked cups containing cola S and cola F.
Assuming no innate brand preference, the probability of choosing cola S is p=0.5.
Let X be the number of people who select cola S (X∼Bin(6,0.5)).
The pmf of X is: p(x)={(x6)(0.5)x(1−0.5)6−x,0,x=0,1,2,…,6otherwise
Target probability calculations:
Probability that exactly 3 people prefer S: P(X=3)=b(3;6,0.5)=(36)(0.5)3(0.5)3=20(0.5)6=20(0.015625)≈0.313
Probability that at least 3 people prefer S: P(X≥3)=∑x=36(x6)(0.5)x(1−0.5)6−x≈0.656
Probability that at most 1 person prefers S: P(X≤1)=∑x=01(x6)(0.5)x(1−0.5)6−x≈0.109
Cumulative Distribution Function and Bernoulli Special Case:
The cumulative distribution function (cdf) of a binomial random variable is denoted by: B(x;n,p)=P(X≤x)=∑y=0xb(y;n,p),x=0,1,…,n
When n=1, the binomial distribution simplifies to the Bernoulli distribution with parameter p: b(x;1,p)=px(1−p)1−x,x∈{0,1}
Mean and Variance of the Binomial Distribution
Formulas for Expected Value, Variance, and Standard Deviation:
For a binomial random variable X∼Bin(n,p), where q=1−p:
Expected Value: E(X)=np
Variance: V(X)=np(1−p)=npq
Standard Deviation: σX=npq=np(1−p)
Example: Credit Card Store Purchases (Example 3.34):
Suppose 75% of all store purchases are completed using a credit card (p=0.75, q=1−0.75=0.25).
A random sample of 10 purchases is selected (n=10).
Let X denote the number of transactions among the 10 made with a credit card, where X∼Bin(10,0.75).