# A-level Mathematics/AQA/MS2B

## Discrete Random Variables

### Expected Value

The expected value, shown by E(X) or sometimes referred to as the mean, can be calculated from a given probability distribution. It can be defined as ${\displaystyle \sum x_{i}p_{i}}$ where ${\displaystyle p_{i}}$ is the probability for value ${\displaystyle x_{i}}$. For example :

A spinner has the probability distribution

${\displaystyle x}$ 1 2 3 4
${\displaystyle P(X=x)}$ 0.2 0.2 0.5 0.1

E(X) can be calculated by summing all the values times their respective probabilities : ${\displaystyle (1*0.2)+(2*0.2)+(3*0.5)+(4*0.1)=2.5}$

### E(X2) and E(X)2

At times, you will be required to calculate E(X2) and E(X)2 (For use in calculating the variance of a discrete random variable, for example) The value of E(X)2 is simply your value of E(X), squared. Using the same spinner from the previous example, our value of E(X)2 would be ${\displaystyle 2.5^{2}=6.25}$

E(X2) is a little more challenging, however. Suppose we are using the same spinner as before when we calculated E(X) and E(X)2. Calculating the expected value of ${\displaystyle x^{2}}$ means we must square all out values of ${\displaystyle x}$ (which is the values the spinner can land on). This gives us the probability distribution

${\displaystyle x^{2}}$ 1 4 9 16
${\displaystyle P(X^{2}=x^{2})}$ 0.2 0.2 0.5 0.1

From here, we can calculate our value for E(X2) the same as if we were calculating E(X) :

${\displaystyle (1*0.2)+(4*0.2)+(9*0.5)+(16*0.1)=7.1}$

Note that our values for E(X2) and E(X)2 are not equal!

### Expected value for E(kX) and E(X + k), where k is a number

To calculate the value of E(kX), we need to move the value of k outside of the brackets. This leaves us with kE(X). E(X) can now be calculated normally, and then multiply by the value of K. For our spinner example, the value of E(2X) is 2E(X), where E(X) = 2.5. Our value for E(2X) must then be 5.

To calculate the value of E(X + k), we need to move the value of k outside of the brackets again. We are left with E(X) + k and can calculate the value normally. For our spinner example, the value of E(X + 3) is E(X) + 3, which is 5.5.

### Variance

The variance of a discrete random variable is defined as the expectation of square minus the square of expectation or in other words : ${\displaystyle Var(X)=E(X^{2})-E(X)^{2}}$. In turn, the standard deviation(σ - Lower case greek letter sigma) of a discrete random variable is defined as the square root of the variance or : ${\displaystyle {\sqrt {Var(X)}}}$

For our spinner example, the value of E(X2) that we calculated was 7.1 and our value for E(X)2 was 6.25. Therefore, our value for the variance of this spinner would be : ${\displaystyle Var(X)=7.1-6.25=0.85}$

Our value for the standard deviation of the spinner would be : ${\displaystyle {\sqrt {0.85}}=0.9219544457=0.9220(4.sf)}$