Mean And Variance Of Random Variables

The meaning of random is uncertain. So, a random variable is the one whose value is unpredictable. A variable, whose possible values are the outcomes of a random experiment is a random variable. In this article, students will learn Mean and Variance of random variables with examples.

A unique numerical value is associated with every outcome of an experiment. The value varies with every trial of the experiment. A random experiment is one whose outcome is unknown. The experiment is usually repeated under identical conditions. In an example of a coin being tossed, the outcome is a head or a tail. Every time the coin is tossed, the outcome is either of the two. The outcome is not known in prior and is unpredictable. A random variable with values being finite is a discrete random variable. A variable, which can take any value between the given limits is a continuous random variable.

How to Define Mean And Variance Of Random Variables?

The mean or expected value or the expectation is called an average in statistics and probability. The expected value can be calculated if the probability distribution for a random variable is found. Mean of a random variable defines the location of a random variable.

The expectation of a random variable is a weighted average of all the values of a random variable. Here, the weights correspond to their respective probabilities. The formula for finding the mean of a random variable is as follows:

E (X) = μ = Σi xi pi, where i = 1, 2, …, n

E (X) = x1p1 + x2p2 + … + xnpn, where p refers to the probabilities

The variability of a random variable is given by the variance. It gives the distance of a random variable from the mean. The smaller the variance, the random variable is closer to the mean.

The formula for finding the variance of a random variable is

σx2 = Var (X) = ∑i (xi − μ)2 p(xi) = E (X − μ)2 or, Var(X) = E(X2) − [E(X)]2.

E(X2) = ∑i xi2 p(xi), and [E(X)]2 = [∑i xi p(xi)]2 = μ2.

Properties Of Mean And Variance Of Random Variables

  • E (X + Y) = E (X) + E (Y).
  • E (X1 + X2 + … + Xn) = E (X1) + E (X2) + … + E (Xn) = Σi E (Xi).
  • E (XY) = E (X) E (Y). Here, X and Y must be independent.
  • E [aX] = a E [X] and E [X + a] = E [X] + a, where a is a constant
  • For any random variable, X > 0, E(X) > 0.
  • E(Y) ≥ E(X) if the random variables X and Y are such that Y ≥ X.
  • The variance of a constant is 0.
  • V [aX + b] = a2 Var (X), where a and b are constants.
  • V (a1X1 + a2 X2 + … + anXn) = a12 V(X1) + a22 V(X2) + … + an2 V(Xn).

Mean And Variance Of Random Variables Examples

Examples on expectation of random variables

1] Let X represent the outcome of a roll of a fair six-sided die. More specifically, X will be the number of pips showing on the top face of the die after the toss. The possible values for X are 1, 2, 3, 4, 5, and 6, all of which are equally likely with a probability of 1/6. The expectation of X is

E[X]=116+216+316+416+516+616=3.5.{\displaystyle {E} [X]=1\cdot {\frac {1}{6}}+2\cdot {\frac {1}{6}}+3\cdot {\frac {1}{6}}+4\cdot {\frac {1}{6}}+5\cdot {\frac {1}{6}}+6\cdot {\frac {1}{6}}=3.5.}

If one rolls the die n times and computes the average (arithmetic mean) of the results, then as n grows, the average will almost surely converge to the expected value, a fact known as the strong law of large numbers.

2] The roulette game consists of a small ball and a wheel with 38 numbered pockets around the edge. As the wheel is spun, the ball bounces around randomly until it settles down in one of the pockets. Suppose random variable X represents the (monetary) outcome of a $1 bet on a single number (“straight up” bet). If the bet wins (which happens with probability 1/38 in American roulette), the payoff is $35; otherwise the player loses the bet. The expected profit from such a bet will be

E[gain from $1 bet]=$13738+$35138=$119.{\displaystyle {E} [\,{\text{gain from }}\$1{\text{ bet}}\,]=-\$1\cdot {\frac {37}{38}}+\$35\cdot {\frac {1}{38}}=-\${\frac {1}{19}}.}

That is, the bet of $1 stands to lose $119$119, so its expected value is $119.$119.-\${\frac {1}{19}} -\${\frac {1}{19}}, \text \ so \ its \ expected \ value \ is \ -\${\frac {1}{19}}.-\${\frac {1}{19}}.

Example on variance of random variable

1] A fair six-sided die can be modeled as a discrete random variable, X, with outcomes 1 through 6, each with equal probability 1/6. The expected value of X is (1+2+3+4+5+6)/6=7/2.(1+2+3+4+5+6)/6=7/2.{\displaystyle (1+2+3+4+5+6)/6=7/2.}{\displaystyle (1+2+3+4+5+6)/6=7/2.} 

Therefore, the variance of X is

Var(X)=i=1616(i72)2=16((5/2)2+(3/2)2+(1/2)2+(1/2)2+(3/2)2+(5/2)2)=35122.92.{Var} (X)=\sum _{i=1}^{6}{\frac {1}{6}}\left(i-{\frac {7}{2}}\right)^{2}\\[5pt]\\={\frac {1}{6}}\left((-5/2)^{2}+(-3/2)^{2}+(-1/2)^{2}+(1/2)^{2}+(3/2)^{2}+(5/2)^{2}\right)\\[5pt]\\={\frac {35}{12}}\approx 2.92.

The general formula for the variance of the outcome, X, of an n-sided die is

Var(X)=E(X2)E(X)2=1ni=1ni2(1ni=1ni)2=(n+1)(2n+1)6(n+12)2=n2112.{Var} (X)= {E} (X^{2})- {E} (X)^{2}\\[5pt]\\={\frac {1}{n}}\sum _{i=1}^{n}i^{2}-\left({\frac {1}{n}}\sum _{i=1}^{n}i\right)^{2}\\[5pt]={\frac {(n+1)(2n+1)}{6}}-\left({\frac {n+1}{2}}\right)^{2}\\[4pt]={\frac {n^{2}-1}{12}}.

Also Read

Mean And Variance Of Random Variables Problems

Example 1: If X and Y be the random variables with the distributions,

Xi 2 3 6 10
Pi 0.2 0.2 0.5 0.1
Yi 0.8 0.2 0 3 7
Pi 0.2 0.3 0.1 0.3 0.1

Then find the expected value of X and Y.

Solution:

E (x) = ∑ Xi Pi

= 2 × (0.2) + 3 × 0.2 + 6 × 0.5 + 10 × 0.1

= 0.4 + 0.6 + 3.0 + 1.0 = 5

E (Y) = ∑ Yi Pi

= (0.8) × (0.2) + (0.2) (0.3) + 0 × 0.1 + 3 × 0.3 + 7 × 0.1

= 0.16 + 0.06 + 0 + 0.9 + 0.7 = 0.38

Example 2: There are 4 numbered cards beginning with 1. Two cards need to be drawn without replacement. If x denotes the sum of the numbers on the 2 cards drawn, find the mean and variance of x.

Solution:

The possible sums are 3, 4, 5, 6, 7

x 3 4 5 6 7

P(x) 2/12 2/12 4/12 2/12 2/12

x * P(x) 3/6 4/6 5/3 6/6 7/6

x2 * P(x) 9/6 16/6 25/3 36/6 49/6

Mean = ∑ x * P(x) = 30/6 = 5

Variance = ∑ x2 * P(x) – [∑ x * P(x)]2 = [160/6] – 25 = 5/3

Example 3: Consider a meeting where a proposal is announced. Out of them, 70% of the members are in favour and 30% are against it. If a member is selected at random, taking X = 0 if he opposed, and X = 1 if he is in favour, find the mean and variance of X.

Solution:
Here, the distribution of random variable X is:
P (X = 0) = 30/100 = 0.3 and P(X = 1) = 70/100 = 0.7

X 0 1
P(X) 0.3 0.7

Mean = E (X) = 0 * 0.3 + 1 * 0.7 = 0.7

E (X2) = 02 * 0.3 + 12 * 0.7 = 0.7

Var (X) = E (X2) – [E (X)]2

= 0.7 – [0.7]2

= 0.7 – 0.49

= 0.21

Example 4: A pair of dice is thrown and let X be the random variable which represents the sum of the numbers that appear on the two dice. Find the mean of X.

Solution:
The S be the sample space when a pair of dice is thrown.
Mean And Variance Of Random Variables Examples; n(S) = 36

<
The random variable X i.e. the sum of the numbers on the two dice takes the values 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 or 12.
Find Probabilities of Two Dice Thrown

X or xi 2 3 4 5 6 7 8 9 10 11 12
P(X) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

Mean of the Two Dice Thrown