Introduction

A random variable and its probability distribution gives us a model for the entire population. For example, if we toss 2 coins we saw that the probability distribution for the number of tails lists all the possible outcomes and how often we would expect to see them. It tells us what we would see if we tossed 2 coins infinitely often. This is in contrast to our earlier units where we considered sample data. In this context, sample data may be the outcome of tossing 2 coins 50 times and it wouldn’t necessarily match the probability distribution.

This is an important distinction. The previous lessons were about describing sample data and we used statistics like the sample mean \(\bar x\) and the sample standard deviation \(s\). Going forward we are going to be considering models of populations and these will be described by parameters that are typically denoted by Greek letters.

The Mean

The mean of a discrete random variable \(X\) is denoted by \(\mu\) (“mu”) and is defined as \[\mu = \sum x \cdot p(x)\]

Alternatively, the mean is called the expected value and is denoted by \(E(X)\). Notice that this is essentially a weighted average of the values that \(X\) can take on with the weights equal to \(p(x)\).

Example 1: Suppose the random variable \(X\) has the following probability distribution.

x 0 1 2
p(x) 0.81 0.17 0.02

Find the mean of X

A common mistake is to think that the mean of \(X\) is equal to \(\frac{1+2+3}{3}=2\). The probability distribution puts much more weight on the \(1\) than on the \(2\) or the \(3\) and so our calculation of the mean must reflect that. In essence, we need to calculate a weighted average.

\[\mu = E(X) = \sum x \cdot p(x) = 0 \cdot 0.81 + 1 \cdot 0.17 + 2 \cdot 0.02 = 0.21\]

The Variance

The concept of expectation can be extended to any function of the random variable. Let \(X\) be a discrete random variable with pdf \(p(x)\) and let \(g(X)\) be some function of \(X\). Then the expected value of that function is defined as follows \[E[g(X)]=\sum g(x) \cdot p(x)\]

The variance of a discrete random variable X is denoted by \(\sigma^2\) (“sigma squared”) and is defined as \[\sigma^2 = E(X-\mu)^2 = \sum (x-\mu)^2 \cdot p(x)\]

The variance is a weighted average of the square of the distance that each value has from its mean with the weights equal to \(p(x)\). This is similar to the idea of the sample variance, \(s^2\), that we considered in Lesson 1.5.

Example 2: Suppose the random variable \(X\) has the following probability distribution.

x 0 1 2
p(x) 0.81 0.17 0.02

Find the variance of X

\[\sigma^2 = E(X-\mu)^2 = \sum (x-\mu)^2 \cdot p(x) = (0-0.21)^2 \cdot 0.81 + (1-0.21)^2 \cdot 0.17 + (2-0.21)^2 \cdot 0.02 = 0.2059\]

The Standard Deviation

The standard deviation of a discrete random variable X is denoted by \(\sigma\) (“sigma”) and is defined as the positive square root of the variance \[\sigma = \sqrt{E(X-\mu)^2} = \sqrt{\sum (x-\mu)^2 \cdot p(x)}\]

Example 3: Suppose the random variable \(X\) has the following probability distribution.

x 0 1 2
p(x) 0.81 0.17 0.02

Find the standard deviation of X

\[\sigma = \sqrt{E(X-\mu)^2} = \sqrt{0.2059}\]