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ˉ\bar{x}) computed from grouped frequency data.

    • Consider a frequency distribution where a discrete variable takes values xx with observed frequencies:

    • Value x=1x = 1: Frequency 33

    • Value x=2x = 2: Frequency 22

    • Value x=3x = 3: Frequency 44

    • Value x=4x = 4: Frequency 66

    • Value x=5x = 5: Frequency 88

    • The total number of observations is n=3+2+4+6+8=23n = 3 + 2 + 4 + 6 + 8 = 23.

    • The sample mean is calculated by weighting each value by its relative frequency:     xˉ=1(3)+2(2)+3(4)+4(6)+5(8)23\bar{x} = \frac{1(3) + 2(2) + 3(4) + 4(6) + 5(8)}{23}     xˉ=1(323)+2(223)+3(423)+4(623)+5(823)\bar{x} = 1\left(\frac{3}{23}\right) + 2\left(\frac{2}{23}\right) + 3\left(\frac{4}{23}\right) + 4\left(\frac{6}{23}\right) + 5\left(\frac{8}{23}\right)     xˉ=1p(1)+2p(2)+3p(3)+4p(4)+5p(5)=∑i=15xi⋅p(xi)\bar{x} = 1p(1) + 2p(2) + 3p(3) + 4p(4) + 5p(5) = \sum_{i=1}^5 x_i \cdot p(x_i)

    • In this context, the relative frequency Freqn\frac{\text{Freq}}{n} acts as an empirical probability mass function p(x)p(x).

  • Formal Definition of Expected Value:

    • Let XX be a discrete random variable with set of possible values (support) DD and probability mass function (pmf) p(x)p(x).

    • The expected value or mean value of XX, denoted by E(X)E(X) or μX\mu_X (or simply μ\mu), is given by:     E(X)=μX=∑x∈Dx⋅p(x)E(X) = \mu_X = \sum_{x \in D} x \cdot p(x)

  • Example: Apgar Scale Score Assessment (Example 3.17):

    • Shortly after birth, infants are evaluated on the Apgar scale, producing an integer score from 00 to 1010.

    • Let XX be the Apgar score of a randomly selected child born at a hospital during the next year, with pmf values:

    • p(0)=0.002p(0) = 0.002

    • p(1)=0.001p(1) = 0.001

    • p(2)=0.002p(2) = 0.002

    • p(3)=0.005p(3) = 0.005

    • p(4)=0.02p(4) = 0.02

    • p(5)=0.04p(5) = 0.04

    • p(6)=0.18p(6) = 0.18

    • p(7)=0.37p(7) = 0.37

    • p(8)=0.25p(8) = 0.25

    • p(9)=0.12p(9) = 0.12

    • p(10)=0.01p(10) = 0.01

    • The expected value E(X)E(X) is computed as:     E(X)=μ=∑x=010x⋅p(x)E(X) = \mu = \sum_{x=0}^{10} x \cdot 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.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.15E(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 XX represent the number of job interviews a student completes prior to obtaining an offer, with pmf:     p(x)={kx2,x=1,2,3,…0,otherwisep(x) = \begin{cases} \frac{k}{x^2}, & x = 1, 2, 3, \dots \\ 0, & \text{otherwise} \end{cases}

    • The constant kk is chosen such that the total probability sums to 11:     ∑x=1∞kx2=1\sum_{x=1}^\infty \frac{k}{x^2} = 1

    • Computing the expected value yields:     E(X)=μ=∑x=1∞x⋅(kx2)=k∑x=1∞1xE(X) = \mu = \sum_{x=1}^\infty x \cdot \left(\frac{k}{x^2}\right) = k \sum_{x=1}^\infty \frac{1}{x}

    • The summation ∑x=1∞1x\sum_{x=1}^\infty \frac{1}{x} 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 XX with probability distribution:

    • p(4)=0.5p(4) = 0.5

    • p(6)=0.3p(6) = 0.3

    • p(8)=0.2p(8) = 0.2

    • Let Y=2X+1Y = 2X + 1. The possible values of YY are:

    • y1=2(4)+1=9y_1 = 2(4) + 1 = 9

    • y2=2(6)+1=13y_2 = 2(6) + 1 = 13

    • y3=2(8)+1=17y_3 = 2(8) + 1 = 17

    • The corresponding probabilities are p(9)=0.5p(9) = 0.5, p(13)=0.3p(13) = 0.3, and p(17)=0.2p(17) = 0.2.

    • The expected value of YY is calculated directly as:     E(Y)=9(0.5)+13(0.3)+17(0.2)=4.5+3.9+3.4=11.8E(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 XX is a discrete random variable with support DD and pmf p(x)p(x), the expected value of any function h(X)h(X), denoted by E[h(X)]E[h(X)], is:     E[h(X)]=∑x∈Dh(x)⋅p(x)E[h(X)] = \sum_{x \in D} h(x) \cdot p(x)

  • Linearity of Expected Value:

    • For a linear transformation h(X)=aX+bh(X) = aX + b, where aa and bb are constants:     E(aX+b)=a⋅E(X)+bE(aX + b) = a \cdot E(X) + b     μaX+b=a⋅μX+b\mu_{aX + b} = a \cdot \mu_X + b

    • Proof of Linearity:     E(aX+b)=∑x∈D(ax+b)⋅p(x)E(aX + b) = \sum_{x \in D} (ax + b) \cdot p(x)     E(aX+b)=a∑x∈Dx⋅p(x)+b∑x∈Dp(x)E(aX + b) = a \sum_{x \in D} x \cdot p(x) + b \sum_{x \in D} p(x)

    • Since ∑x∈Dx⋅p(x)=E(X)\sum_{x \in D} x \cdot p(x) = E(X) and ∑x∈Dp(x)=1\sum_{x \in D} p(x) = 1:       E(aX+b)=a⋅E(X)+bE(aX + b) = a \cdot E(X) + b

    • Special Cases:

    • Constant multiplicative scaling: For any constant aa,       E(aX)=a⋅E(X)E(aX) = a \cdot E(X)

    • Constant additive shift: For any constant bb,       E(X+b)=E(X)+bE(X + b) = E(X) + b

Variance and Standard Deviation of Discrete Random Variables

  • Formal Definitions:

    • Let XX have pmf p(x)p(x) and expected value μ\mu.

    • The variance of XX, denoted by V(X)V(X), σX2\sigma^2_X, or σ2\sigma^2, measures the dispersion around the mean:     V(X)=σX2=∑x∈D(x−μ)2⋅p(x)=E[(X−μ)2]V(X) = \sigma^2_X = \sum_{x \in D} (x - \mu)^2 \cdot p(x) = E[(X - \mu)^2]

    • The standard deviation of XX is the positive square root of the variance:     σX=σX2=V(X)\sigma_X = \sqrt{\sigma^2_X} = \sqrt{V(X)}

  • Example: Library Checkout Video Limits (Example 3.24):

    • A library restricts patrons to a maximum checkout limit of 66 videos.

    • Let XX be the number of videos checked out to a randomly selected individual, with distribution:

    • p(1)=0.30p(1) = 0.30

    • p(2)=0.25p(2) = 0.25

    • p(3)=0.15p(3) = 0.15

    • p(4)=0.05p(4) = 0.05

    • p(5)=0.10p(5) = 0.10

    • p(6)=0.15p(6) = 0.15

    • The expected checkout count is given as μ=2.85\mu = 2.85.

    • The variance V(X)V(X) is computed as:     V(X)=σ2=∑x=16(x−2.85)2⋅p(x)V(X) = \sigma^2 = \sum_{x=1}^6 (x - 2.85)^2 \cdot 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 - 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) = (-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) = (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.2275V(X) = 1.02675 + 0.180625 + 0.003375 + 0.066125 + 0.46225 + 1.488375 = 3.2275

    • The standard deviation is:     σ=3.2275≈1.800\sigma = \sqrt{3.2275} \approx 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)]2V(X) = \sigma^2 = \left[\sum_{x \in D} x^2 \cdot p(x)\right] - \mu^2 = E(X^2) - [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)\sigma^2 = \sum_{x \in D} (x - \mu)^2 \cdot p(x) = \sum_{x \in D} (x^2 - 2\mu x + \mu^2) \cdot p(x)       σ2=∑x∈Dx2⋅p(x)−2μ∑x∈Dx⋅p(x)+μ2∑x∈Dp(x)\sigma^2 = \sum_{x \in D} x^2 \cdot p(x) - 2\mu \sum_{x \in D} x \cdot p(x) + \mu^2 \sum_{x \in D} p(x)

    • Substituting ∑x⋅p(x)=E(X)=μ\sum x \cdot p(x) = E(X) = \mu and ∑p(x)=1\sum p(x) = 1:       σ2=E(X2)−2μ(μ)+μ2(1)=E(X2)−2μ2+μ2=E(X2)−μ2\sigma^2 = E(X^2) - 2\mu(\mu) + \mu^2(1) = E(X^2) - 2\mu^2 + \mu^2 = E(X^2) - \mu^2

  • Variance Under Linear Transformations:

    • For any linear transformation Y=aX+bY = aX + b:     V(aX+b)=a2⋅σX2V(aX + b) = a^2 \cdot \sigma^2_X     σaX+b=∣a∣⋅σX\sigma_{aX + b} = |a| \cdot \sigma_X

    • Specific properties:

    • Adding a constant shifts location but leaves spread unchanged:       V(X+b)=V(X)V(X + b) = V(X)       σX+b=σX\sigma_{X + b} = \sigma_X

    • Multiplying by a constant scales variance by the square and standard deviation by the absolute value:       V(aX)=a2⋅V(X)V(aX) = a^2 \cdot V(X)       σaX=∣a∣⋅σX\sigma_{aX} = |a| \cdot \sigma_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:

    1. The experiment consists of a sequence of nn smaller experiments called trials, where nn is fixed in advance.

    2. Each trial results in one of two mutually exclusive outcomes, designated generically as success (SS) or failure (FF).

    3. The individual trials are mutually independent.

    4. The probability of success, denoted by p=P(S)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 nn 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=10n = 10 identical, independent trials with two outcomes per trial and constant probability p=0.5p = 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=10n = 10 independent trials with binary classification where S=rolling a 1S = \text{rolling a } 1 and F=rolling any other numberF = \text{rolling any other number}, with constant p=16p = \frac{1}{6}).

  • Binomial Random Variable and Parameter Notation:

    • The binomial random variable XX represents the total count of successes observed across the nn trials:     X=the number of successes among the n trialsX = \text{the number of successes among the } n \text{ trials}

    • The distribution is completely characterized by the parameters nn and pp, denoted by X∼Bin(n,p)X \sim \text{Bin}(n, p).

    • The probability mass function is denoted by b(x;n,p)b(x; n, p).

  • Binomial Probability Mass Function Theorem:

    • For X∼Bin(n,p)X \sim \text{Bin}(n, p), the pmf is given by:     b(x;n,p)={(nx)px(1−p)n−x,x=0,1,2,…,n0,otherwiseb(x; n, p) = \begin{cases} \binom{n}{x} p^x (1 - p)^{n - x}, & x = 0, 1, 2, \dots, n \\ 0, & \text{otherwise} \end{cases}

    • The combinatorial term (nx)=n!x!(n−x)!\binom{n}{x} = \frac{n!}{x!(n - x)!} represents the number of distinct ways to arrange xx successes and n−xn - x failures in a sequence of length nn.

    • The term px(1−p)n−xp^x (1 - p)^{n - x} denotes the probability of any single sequence containing exactly xx successes and n−xn - x failures.

  • Introductory Calculation: Fair Die Rolls:

    • Consider rolling a fair die 1010 times (n=10n = 10) with success defined as rolling a 11 (p=16p = \frac{1}{6}).

    • The probability of obtaining exactly 33 ones is:     P(X=3)=(103)(16)3(56)7P(X = 3) = \binom{10}{3} \left(\frac{1}{6}\right)^3 \left(\frac{5}{6}\right)^7     (103)=10×9×83×2×1=120\binom{10}{3} = \frac{10 \times 9 \times 8}{3 \times 2 \times 1} = 120     P(X=3)=120(1216)(0.2790816)≈0.155P(X = 3) = 120 \left(\frac{1}{216}\right) (0.2790816) \approx 0.155

  • Example: Cola Preference Blind Taste Test (Example 3.31):

    • Six consumers (n=6n = 6) are provided two unmarked cups containing cola SS and cola FF.

    • Assuming no innate brand preference, the probability of choosing cola SS is p=0.5p = 0.5.

    • Let XX be the number of people who select cola SS (X∼Bin(6,0.5)X \sim \text{Bin}(6, 0.5)).

    • The pmf of XX is:     p(x)={(6x)(0.5)x(1−0.5)6−x,x=0,1,2,…,60,otherwisep(x) = \begin{cases} \binom{6}{x} (0.5)^x (1 - 0.5)^{6 - x}, & x = 0, 1, 2, \dots, 6 \\ 0, & \text{otherwise} \end{cases}

    • Target probability calculations:

    • Probability that exactly 33 people prefer SS:       P(X=3)=b(3;6,0.5)=(63)(0.5)3(0.5)3=20(0.5)6=20(0.015625)≈0.313P(X = 3) = b(3; 6, 0.5) = \binom{6}{3}(0.5)^3(0.5)^3 = 20(0.5)^6 = 20(0.015625) \approx 0.313

    • Probability that at least 33 people prefer SS:       P(X≥3)=∑x=36(6x)(0.5)x(1−0.5)6−x≈0.656P(X \ge 3) = \sum_{x=3}^6 \binom{6}{x} (0.5)^x (1 - 0.5)^{6 - x} \approx 0.656

    • Probability that at most 11 person prefers SS:       P(X≤1)=∑x=01(6x)(0.5)x(1−0.5)6−x≈0.109P(X \le 1) = \sum_{x=0}^1 \binom{6}{x} (0.5)^x (1 - 0.5)^{6 - x} \approx 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,…,nB(x; n, p) = P(X \le x) = \sum_{y=0}^x b(y; n, p), \quad x = 0, 1, \dots, n

    • When n=1n = 1, the binomial distribution simplifies to the Bernoulli distribution with parameter pp:     b(x;1,p)=px(1−p)1−x,x∈{0,1}b(x; 1, p) = p^x (1 - p)^{1 - x}, \quad x \in \{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)X \sim \text{Bin}(n, p), where q=1−pq = 1 - p:

    • Expected Value:       E(X)=npE(X) = np

    • Variance:       V(X)=np(1−p)=npqV(X) = np(1 - p) = npq

    • Standard Deviation:       σX=npq=np(1−p)\sigma_X = \sqrt{npq} = \sqrt{np(1 - p)}

  • Example: Credit Card Store Purchases (Example 3.34):

    • Suppose 75%75\% of all store purchases are completed using a credit card (p=0.75p = 0.75, q=1−0.75=0.25q = 1 - 0.75 = 0.25).

    • A random sample of 1010 purchases is selected (n=10n = 10).

    • Let XX denote the number of transactions among the 1010 made with a credit card, where X∼Bin(10,0.75)X \sim \text{Bin}(10, 0.75).

    • Mean calculation:     E(X)=np=10(0.75)=7.5E(X) = np = 10(0.75) = 7.5

    • Variance calculation:     V(X)=npq=10(0.75)(0.25)=1.875V(X) = npq = 10(0.75)(0.25) = 1.875

    • Standard deviation calculation:     σ=1.875≈1.37\sigma = \sqrt{1.875} \approx 1.37