## Summary

- Expected value of a random variable
- Expected value of
*f(X)*is defined by - Var(X) is defined by
- Standard deviation is the under root of variance

#### Expected value

When we describe probability, we think of taking chances e.g if I bought a lottery ticket, what are the chances that I am going to win the lottery.

#### Example #1

If there are 10000 lottery tickets in a shop, and the winning amount is considered to be $2000. The probability of winning is considered for each ticket. Hence, the expectation per ticket is considered to be which is thought of as an average win per ticket.

This can be considered as the expected value of a random variable.The expected value should be regarded as the average value. It is calculated by summing the product of the value of the random variable and its associated probability, taken over all of the values of the random variable.

#### Example #2

Roll a die. If the side that comes up is odd, you win the $ equivalent of that side. If it is even, you lose $4.

Let X = your earnings

Since a die has 6 faces, we are calculating the probability by keeping that in mind.

(probability of throwing a 1 is as 1 is present only once and there are total 6 sides of a die, the rest will be done similarly.)

** Ans**

#### Example #3

Random variable X has the following probability function, find the expected value.

X | 0 | 1 | 2 | 3 |

P(X = x) | 0.1 | 0.2 | 0.4 | 0.3 |

E(X) = 0 0.1 + 1 x 0.2 + 2 x 0.4 + 3 x 0.3

= 1.9 *Ans*

#### Expected Value of a Function of X

Let X be a random variable assuming the values of X with corresponding probabilities for any function f, the mean or expected value of f(X) is defined by:

#### Example #4

Q. Roll a fair die. Let X = number of dots on the side that comes up. Calculate .

There are also some rules of calculating expected value that you need to keep in mind.

- The expected value of a constant is just the constant, example
*E(x) = x* - Adding a constant value, c, to each term increases the mean, or expected value, by the constant:
*E(X + c) = E(X) + c* - Multiplying a random variable by a constant value, c, multiplies the expected value or mean by that constant:
*E(cX ) = cE(X)* - The expected value or mean of the sum of two random variables is the sum of the means. This is also known as the additive law of expectation.
*E(X + Y) = E(X) + E(Y)*

#### Variance

Variance reflects the spread or dispersion of a distribution, if X is a random variable with mean E(X), then the variance of X, denoted by Var(X), is defined by:

#### Example #5

Using the example above

Roll a fair die. Let X = number of dots on the side that comes up.

We will calculate the variance.

We already know that our

We will now calculate E(X) to get

Now plugging the value in the formula we get:

Inorder to find the standard deviation, all you have to do is take the under root of the variance.

Just like the expected value, variance also has some rules, like the following:

- The variance of a constant is zero.
- Adding a constant value, c, to a random variable does not change the variance, because the expectation (mean) increases by the same amount.
- Multiplying a random variable by a constant increases the variance by the square of the constant.