Having defined what a discrete random variable is, we move on to concepts that were first discussed in Statistics in S4 and S5 except defined with a probabilistic approach.

Expectation

The expectation (or expected value) of a discrete random variable is the weighted average of all its possible values, where each value is weighted according to its probability.

Definition (Expected Value of a Discrete Random Variable): The Expected Value (also called the expectation or mean) of a discrete random variable X is the long-run theoretical average outcome if the underlying experiment were repeated an infinite number of times. It is a weighted average where each possible value of X is multiplied by its corresponding probability from the PDF, denoted by \mathbb{E}[X] or \mu:

    \[\mathbb{E}[X] = \mu = \sum_{\text{all } x} x \cdot \mathbb{P}(X = x)\]

That is, we multiply each x_i (each value our variable can get) by its respective p_i (the probability of X being that value) and add the results. We know that if we toss a coin twice, we expect to see one Heads, let us show this:

Example: A fair coin is tossed twice. Let the discrete random variable X represent the total number of times the coin lands on Heads. Prove mathematically that the expected value of X is exactly 1 (\mathbb{E}[X] = 1).

Of course, the expectation of a discrete random variable can be found in any case, whether we know the context or not:

Example: A discrete random variable X has the probability distribution defined by the following Probability Density Function (PDF):

    \[\begin{tabular}{|c|c|c|c|c|c|}     \hline     $x$ & -2 & -1 & 0 & 2 & 4 \\ \hline     $\mathbb{P}(X = x)$ & 0.10 & 0.30 & 0.20 & 0.25 & 0.15 \\ \hline     \end{tabular}\]

Calculate the expected value \mathbb{E}[X] for this discrete random variable.

We can also use a given expectation to find missing probabilities:

Example: A discrete random variable X has the probability distribution shown in the table below, where two probabilities are missing and represented by the variables p and q.

    \[\begin{tabular}{|c|c|c|c|c|}     \hline     $x$ & -1 & 1 & 2 & 4 \\ \hline     $\mathbb{P}(X = x)$ & 0.20 & $p$ & $q$ & 0.15 \\ \hline     \end{tabular}\]

Given that the expected value of the random variable is \mathbb{E}[X] = 1.25, set up a system of linear equations to solve for the missing probabilities p and q.

Properties of the Expectation

Instead of just being given a discrete random variable X, we could discuss the expectation when a function is applied to X, i.e.: \mathbb{E}(g(X)).

Definition (Expected Value of a Function of a Random Variable): Let X be a discrete random variable that takes on a finite set of distinct real values x_1, x_2, \dots, x_n with corresponding probabilities p_1, p_2, \dots, p_n (where p_i = \mathbb{P}(X = x_i)). If g(X) is a real-valued function applied to X, the expected value of g(X), denoted by \mathbb{E}[g(X)], is the weighted average of the values that the function can take, given by the formula:

    \[\mathbb{E}[g(X)] = \sum_{i=1}^{n} g(x_i) \cdot p_i\]

This property is highly powerful because it states that to find the expectation of the transformed variable g(X), you do not need to first derive the actual Probability Density Function (PDF) of g(X). Instead, you can calculate it directly by applying the function g(x_i) directly to the original support values of X and multiplying down the original columns of your probability distribution.

Example: A discrete random variable X has the probability distribution defined by the following Probability Density Function (PDF):

    \[\begin{tabular}{|c|c|c|c|c|}     \hline     $x_i$ & -2 & -1 & 1 & 3 \\ \hline     $p_i$ & 0.20 & 0.40 & 0.30 & 0.10 \\ \hline     \end{tabular}\]

Let g(X) = 2X^2 - 3. Calculate the expected value \mathbb{E}[g(X)].

Finally, below are two simple but powerful properties that will allow you to calculate expectation more easily.

Claim (Properties of Expectation): Let X be a discrete random variable with a finite expected value \mathbb{E}[X], and let a, b, and c be any fixed real constants. The expectation operator satisfies the following two fundamental properties:

  1. Expectation of a Constant: The expected value of any fixed constant value c is exactly equal to the constant itself:

        \[\mathbb{E}[c] = c\]

  2. Linear Transformation of Expectation (Linearity): The expected value of a linear combination scales and shifts predictably according to the linear transformation parameters:

        \[\mathbb{E}[aX + b] = a\mathbb{E}[X] + b\]

The linearity of expectation is a particularly useful property for discussing fair games.

Definition (Fair Game): A game or investment scenario is called fair if its expected earning is equal to zero. If the discrete random variable X represents the net financial profit or loss resulting from playing the game, it is fair if and only if:

    \[\mathbb{E}[X] = \sum_{\text{all } x} x \cdot \mathbb{P}(X = x) = 0\]

A fair game represents a situation of equilibrium. It implies that in the long run, over a vast number of repetitions, a player will theoretically neither win nor lose any money. If \mathbb{E}[X] > 0, the game carries a positive expected value favouring the player; if \mathbb{E}[X] < 0, it carries a negative expected value favouring the house.

Example: At a carnival game, a player pays a non-refundable ticket price of 4 to play. The game consists of rolling a single fair six-sided die. The payout structure based on the roll result is defined by the discrete random variableW(winnings):   <ul style="margin-top: 5px; margin-bottom: 15px; padding-left: 20px; line-height: 1.6; font-size: 16px;">     <li>Roll a 6: The house pays the player12.

  • Roll a 4 or 5: The house pays the player 3.</li>     <li>Roll a 1, 2, or 3: The player receives nothing (0).
  • Tasks:
    1. Let X represent the player’s net profit. Construct the PDF table for X and calculate \mathbb{E}[X] to determine if the game is mathematically fair.
    2. Use the linearity of expectation to find what the entry ticket cost should be changed to so that the carnival game becomes perfectly fair.

    Variance and its Properties

    The variance of a discrete random variable measures how spread out its possible values are around the expected value (mean). A small variance means the values are clustered close to the mean. A large variance means the values are more spread out.

    Definition (Variance of a Discrete Random Variable): The Variance of a discrete random variable X measures the dispersion or spread of the probability distribution around its mean \mu. It is defined as the expected value of the squared deviations from the mean. It is denoted by \text{Var}(X) or \sigma^2 and calculated using the formula:

        \[\text{Var}(X) = \sigma^2 = \sum_{\text{all } x} (x - \mu)^2 \cdot \mathbb{P}(X = x)\]

    There is an alternative way to calculate the variance of a discrete random variable, as the claim below will show:

    Claim (Alternative Variance Formula): For any discrete random variable X with a finite mean \mathbb{E}[X] = \mu, the variance can be computed using the following identity, often referred to as the computational or shortcut formula:

        \[\text{Var}(X) = \mathbb{E}[X^2] - (\mathbb{E}[X])^2\]

    The following example will show how each of the formulas above can be used to find Var(X):

    Example: A discrete random variable X has the probability distribution defined by the following Probability Density Function (PDF):

        \[\begin{tabular}{|c|c|c|c|c|}     \hline     $x$ & -1 & 0 & 1 & 2 \\ \hline     $\mathbb{P}(X = x)$ & 0.20 & 0.30 & 0.40 & 0.10 \\ \hline     \end{tabular}\]

    Calculate the variance \text{Var}(X) using two different methods to prove they are equivalent:
    1. The Definitional Formula: \text{Var}(X) = \sum (x - \mu)^2 \cdot \mathbb{P}(X = x)
    2. The Computational Formula: \text{Var}(X) = \mathbb{E}[X^2] - (\mathbb{E}[X])^2

    In general, you are allowed to use whichever formula you prefer.

    We finish with a simple property of the variance:

    Claim (Properties of Variance): Let X be a discrete random variable with a finite variance \text{Var}(X), and let a, b, and c be any fixed real constants. The variance operator satisfies the following two fundamental properties:

    1. Variance of a Constant: The variance of any fixed constant value c is exactly zero:

          \[\text{Var}(c) = 0\]

    2. Linear Transformation of Variance (Linearity): The variance of the linear combination aX + b scales by the square of the multiplicative constant:

          \[\text{Var}(aX + b) = a^2 \text{Var}(X)\]

    Below is an example of how we use this property.

    Example: A discrete random variable X representing daily sales at a retail store has a known variance of \text{Var}(X) = 4.5. The net daily profit, Y, is modeled as a linear transformation of sales given by the equation:

        \[Y = 3X - 7\]

    Calculate the variance of the net daily profit, \text{Var}(Y), by applying the properties of the linearity of variance.

    Standard Deviation

    Our final concept is that of standard deviation, you have seen this in statistics in S5 but here we are redefining it using probability language.

    Definition (Standard Deviation of a Discrete Random Variable): The Standard Deviation of a discrete random variable X is a metric that quantifies the absolute amount of dispersion, variation, or spread in a probability distribution. It is denoted by \sigma or \text{SD}(X), and is expressed by the formula:

        \[\sigma = \text{SD}(X) = \sqrt{\text{Var}(X)} = \sqrt{\sum_{\text{all } x} (x - \mu)^2 \cdot \mathbb{P}(X = x)}\]

    The standard deviation acts as a baseline measure for how far away a typical outcome falls from the mean (\mu).

    Example: A discrete random variable X has a probability distribution defined by the following Probability Density Function (PDF):

        \[\begin{tabular}{|c|c|c|c|c|}     \hline     $x$ & 1 & 2 & 3 & 4 \\ \hline     $\mathbb{P}(X = x)$ & 0.40 & 0.30 & 0.20 & 0.10 \\ \hline     \end{tabular}\]

    Find the standard deviation \sigma for this random variable. Round your final answer to four decimal places.

    Exercises

    A discrete random variable X has the probability distribution listed in the table below:

        \[\begin{tabular}{|c|c|c|c|c|}         \hline         $x$ & 0 & 1 & 2 & 3 \\ \hline         $\mathbb{P}(X = x)$ & 0.35 & 0.40 & 0.15 & 0.10 \\ \hline         \end{tabular}\]

    Evaluate this probability distribution by calculating the following key summary metrics:

    1. The expected value \mathbb{E}[X].
    2. The variance \text{Var}(X) using either the definitional or computational formula.
    3. The standard deviation \sigma.

    The Probability Density Function (PDF) of a discrete random variable X is given by the tracking matrix below:

        \[\begin{tabular}{|c|c|c|c|c|c|}         \hline         $x$ & -2 & -1 & 0 & 1 & 2 \\ \hline         $\mathbb{P}(X = x)$ & 0.10 & 0.25 & 0.30 & 0.25 & 0.10 \\ \hline         \end{tabular}\]

    Determine the fundamental statistical dispersion properties of the distribution:

    1. The theoretical long-run average mean \mu.
    2. The measurement of variance \text{Var}(X).
    3. The standard deviation \sigma(X),.

    A discrete random variable X distributes its probability according to the following fraction baseline:

        \[\begin{tabular}{|c|c|c|c|c|}         \hline         $x$ & -1 & 1 & 3 & 5 \\ \hline         $\mathbb{P}(X = x)$ & $\frac{2}{10}$ & $\frac{5}{10}$ & $\frac{2}{10}$ & $\frac{1}{10}$ \\ \hline         \end{tabular}\]

    Evaluate this rational distribution using fraction calculations until the final decimal conversions:

    1. The expected value \mathbb{E}[X].
    2. The variance \text{Var}(X).
    3. The standard deviation \sigma.

    The complete Probability Density Function (PDF) of a discrete random variable X is provided in the tracking matrix below. Two fractional probability spaces are unknown and defined as parameters p and q:

        \[\begin{tabular}{|c|c|c|c|c|}         \hline         $x$ & -3 & -1 & 2 & 4 \\ \hline         $\mathbb{P}(X = x)$ & $\frac{2}{10}$ & $p$ & $q$ & $\frac{1}{10}$ \\ \hline         \end{tabular}\]

    Given that the expected value is exactly \mathbb{E}[X] = 0.5, formulate and solve a system of linear equations to determine the value of the missing fractions p and q.

    A discrete random variable X has the probability distribution layout detailed below. Two probability metrics are missing and labeled as variables p and q:

        \[\begin{tabular}{|c|c|c|c|c|}         \hline         $x$ & -2 & 0 & 3 & 5 \\ \hline         $\mathbb{P}(X = x)$ & 0.15 & $p$ & $q$ & 0.25 \\ \hline         \end{tabular}\]

    Given that the expected value of this distribution is \mathbb{E}[X] = 1.85, construct a system of linear equations using the total normalization property and the mean parameter to calculate the exact values of p and q.

    A charity fundraising event features a game using a fair spinner divided into 8 equal sectors. It costs exactly $5 to play one round. The gross cash rewards based on where the spinner stops are structured as follows:

    • Landing on Sector 1: The house pays the player $24.
    • Landing on Sectors 2 or 3: The house pays the player $8.
    • Landing on any other sector: The player receives nothing ($0).

    Question: Should you play this game if your primary goal is to turn a net financial profit over a large number of attempts? Justify your decision explicitly by calculating the expected net profit \mathbb{E}[X] of a round.

    A game of chance involves drawing a single card at random from a standard deck of 52 playing cards. A participant currently pays an entry fee of $3 per round. The payout structure based on the suit drawn is defined below:

    • Drawing an Ace of Spades: The player wins a cash prize of $50.
    • Drawing any other Spade: The player wins a cash prize of $6.
    • Drawing any other suit: The player receives nothing ($0).
    1. Construct the Probability Density Function (PDF) table for the player’s net profit X and calculate \mathbb{E}[X] to determine if the game is currently fair.
    2. Apply the linearity property of expectation to find what the entry cost should be changed to so that the card game becomes perfectly fair (\mathbb{E}[X_{\text{new}}] = 0).

    Let X be a discrete random variable with a finite standard deviation \sigma(X), and let a,b\in\mathbb{R} be fixed constants.

    Show that:

        \[\sigma(aX + b) = |a|\cdot\sigma(X)\]

    Hint: Use the linearity of the variance.

    error: Content is protected!