The random variable is a variable whose value is unknown but they assign values to each of the experiment outcomes. Random variable is the set of all possible values from the random experiment.

Random variables are used in econometric or regression analysis to determine the statistical relationships among one another.

**Types**

The random variable can be either,

- Discrete Variable
- Continuous Variable

Mostly discrete variables are number of sales, number of calls, shares of stock, people in line and mistakes per page.

Continuous random variables are length, depth, volume, time and weight.

**Example:**

Let us consider the random experiment in which the coin is tossed three times. X is the probability of getting heads. Where H represents the head and T represents the tail.

Thus the possible values we can obtain is TTT, TTH, THT, THH, HTT, HTH, HHT, HHH.

Thus the all possible values of X is = 0, 1, 2, 3.

The probability of getting tails when a coin is tossed twice is given by below diagram,

Discrete random variables are often defined by the probability mass function and the continuous random variables are often defined by the probability density function.

**Characterizing the Distribution of Random Variable**

In the study about the random variable, this is what we must know to a greater extent.

The probability distribution of the discrete random variable is often defined by probability mass function and it can be described as f(x). But there exist two conditions that must be satisfied, they are

- The probability of each variable should be the non-negative value.
- The sum of the probabilities of each random variable must be equal to one.

Whereas the continuous random variable can take any value given between the stipulated interval. The probability distribution of the continuous random variable must be determined by the probability density function. It is denoted by f(x).

In this case integral, over all the values must be equal to one.

**Mathematical Parameters of the Random Variables**

**Expected Value**

If we explain out of simple words the expected value is what we expect to come as an outcome out of the simple action.

The expected value of the discrete random variable is denoted by,

E(x) = Σxf(x)

Whereas in case of the continuous random variable it is denoted by

E(x) = ∫xf(x)dx

**Standard Deviation **

Standard deviation in simple words can be described as the positive square root of the variance.

**Variance**

The variance of the random variable is often calculated by the below formulas,

Var(x) = σ2 = Σ(x − μ)2f(x) (4) for discrete variable.

Var(x) = σ2 = ∫(x − μ)2f(x)dx (5) for continuous variable.

**Reference**

https://www.khanacademy.org/math/statistics-probability/random-variables-stats-library

https://www.statisticshowto.com/probability-and-statistics/expected-value/