**Random Variables**

The random variables are generally defined as the variable whose value is generally unknown or it can be defined as the function which takes the value of the experiment outcomes.

**Types of the Random Variables**

- Discrete Random Variable
- Random Random Variable

**Expectation**

The expectation is nothing but it is a long time average value of the experiment. It can also be called as the mean or expected value and it can be represented as E(X) or µ(X).

If X is the continues random variable with the probability density function f_{x}(x). The expectation formula is given by,

In case of the discrete random variable, the expected value can be calculated by the below formula,

**Properties of Expectation**

For any random variable X that is discrete or continuous,

E (aX+b) = aE (x)+b

For any two random variables X and Y, that is discrete, continuous, dependent or non-independent,

E(X+Y) = E(X) + E(Y)

For the expectation, the general multiplication rule is only possible if only the two variables are independent.

E (XY) = E(X)E(Y)

**Variance**

The variance of the random variables is generally used to find out how far the values are generally away from the mean.

The variance of the X is given by,

Var (X) = E(X^{2}) – ( E(X) )^{2}

If the random variable X has high variance then the values are spread a long way from the mean and vice versa.

Example,

Let X be one of the continuous random variable with probability density function,

F_{X}(x) = { 2x^{-2 } for 1<x<2 , 0 for otherwise }

Calculate the mean and the variance.**Mean**

Using the formula from the above the mean value can be calculated as,

Similarly, the variance can be calculated using the below formula,

Var ( X ) = E( X^{2}) – (E(X))^{2}

= 2 – {2 log(2)}^{2}

= 0.0782

**Reference**

https://www.stat.auckland.ac.nz/~fewster/325/notes/ch3.pdf

http://theanalysisofdata.com/probability/2_3.html

https://revisionmaths.com/advanced-level-maths-revision/statistics/expectation-and-variance