# Random Variables

### Random Variables

Let S be the sample space associated with a random experiment. A function X : S → R is called a random variable.

Note: If X is a random variable then $${{X}^{-1}}(\wp (R))=\wp (S)$$.

Here P Stands for the Probability function and $$\wp (S)$$ stands for the power set of S.

Example: Throw a die once. Random Variable X = “The score shown on the top face”.

X could be 1, 2, 3, 4, 5 or 6. So, the Sample Space is {1, 2, 3, 4, 5, 6}

Example 1: Let S be the sample space of the experiment of rolling a fair die. Then X : S → R.

Given by X (n) = 0, if n is even

X (n) = 1 if n is odd

Here S = {1, 2, 3, 4, 5, 6}

and X (1) = X (3) = X (5) = 1

X (2) = X (4) = X (6) = 0

Example 2: Three coins are tossed simultaneously. Then S = {HHH, HTH, HHT, HTT, THH, THT, TTH, TTT} is the sample space of this experiment. Define X : S → R as X (a) = the number of heads that shows for each a ϵ S. Then X is a random variable taking the following values:

X (HHH) = 3

X (HHT) = X (HTH) = X (THH) = 2

X (TTH) = X (THT) = X (HTT) = 1

X (TTT) = 0

Moreover, we observe here X⁻¹ (0) = {T T T}

X⁻¹ (1) = {HTT, THT, TTH}

X⁻¹ (2) = {HHT, HTH, THH}

X⁻¹ (3) = {HHH} are some events of the experiment.

Let S be the sample space of a random experiment and P be a probability function on $$\wp (S)$$. Then any random variable X on S gives rise to a probability function on $$\wp (R)$$.