- In probability theory, variance is a measure of how much the values in a data set deviate from the mean.
- It measures the spread or dispersion of the data.
- The formula to calculate the variance of a data set is given by:
- Var(X) = Σ(x - μ)² * P(x), where x represents each value in the data set, μ is the mean of the data set, and P(x) is the probability of x occurring.
- However, in some cases, it is not easy to calculate the variance using the above formula.
- In such cases, an alternative formula can be used, which simplifies the calculation.
- The alternative formula for calculating the variance is given by:
- Var(X) = E(X²) - [E(X)]², where E(X) represents the expected value of X and E(X²) represents the expected value of X squared.
- This formula is particularly useful when working with discrete random variables.
- It involves calculating the expected value of X and the expected value of X squared.
- Let’s understand this formula with the help of an example.
Example 1
- Suppose we have a fair six-sided dice.
- Let X be the random variable representing the outcome of rolling the dice.
- The possible values of X are 1, 2, 3, 4, 5, and 6, each with a probability of 1/6.
- We want to calculate the variance of X using the alternative formula.
- Step 1: Calculate E(X)
- E(X) = (1 * 1/6) + (2 * 1/6) + (3 * 1/6) + (4 * 1/6) + (5 * 1/6) + (6 * 1/6)
= (1 + 2 + 3 + 4 + 5 + 6) / 6
= 3.5
- Step 2: Calculate E(X²)
- E(X²) = (1² * 1/6) + (2² * 1/6) + (3² * 1/6) + (4² * 1/6) + (5² * 1/6) + (6² * 1/6)
= (1 + 4 + 9 + 16 + 25 + 36) / 6
= 15.1667
- Step 3: Calculate Var(X)
- Var(X) = E(X²) - [E(X)]²
= 15.1667 - (3.5)²
= 15.1667 - 12.25
= 2.9167
Properties of Variance
- Variance has the following properties:
- Var(X + c) = Var(X), where c is a constant
- Var(cX) = c²Var(X), where c is a constant
- Var(X + Y) = Var(X) + Var(Y), where X and Y are independent random variables
- Var(aX + bY) = a²Var(X) + b²Var(Y) + 2abCov(X, Y), where a and b are constants and Cov(X, Y) represents the covariance between X and Y.
- These properties can be used to simplify the calculation of variance in various scenarios.
Example 2
- Consider two independent random variables X and Y.
- The variance of X is 4 and the variance of Y is 9.
- Let Z = 2X - 3Y.
- We want to calculate the variance of Z using the properties of variance.
- Step 1: Calculate Var(Z)
- Var(Z) = (2²)Var(X) + (-3)²Var(Y) + 2(2)(-3)Cov(X, Y)
= 4(4) + 9(9) + 2(2)(-3)(0)
= 16 + 81 + 0
= 97
- Therefore, the variance of Z is 97.
Conclusion
- In probability theory, variance is a measure of the spread or dispersion of a data set.
- The alternative formula for calculating variance, Var(X) = E(X²) - [E(X)]², is useful when the traditional formula is not easily applicable.
- Variance has certain properties that can simplify its calculation in different scenarios.
Here are slides 11 to 20 for the topic “Probability - Alternative formula for evaluation of Variance”:
Slide 11:
Probability - Alternative formula for evaluation of Variance
- The alternative formula for calculating the variance is given by:
Slide 12:
Example 1: Rolling a Fair Six-Sided Dice
- Suppose we have a fair six-sided dice.
- Let X be the random variable representing the outcome of rolling the dice.
- The possible values of X are 1, 2, 3, 4, 5, and 6, each with a probability of 1/6.
- We want to calculate the variance of X using the alternative formula.
Slide 13:
Example 1: Rolling a Fair Six-Sided Dice (contd.)
- Step 1: Calculate E(X)
- E(X) = (1 * 1/6) + (2 * 1/6) + (3 * 1/6) + (4 * 1/6) + (5 * 1/6) + (6 * 1/6)
= (1 + 2 + 3 + 4 + 5 + 6) / 6
= 3.5
Slide 14:
Example 1: Rolling a Fair Six-Sided Dice (contd.)
- Step 2: Calculate E(X²)
- E(X²) = (1² * 1/6) + (2² * 1/6) + (3² * 1/6) + (4² * 1/6) + (5² * 1/6) + (6² * 1/6)
= (1 + 4 + 9 + 16 + 25 + 36) / 6
= 15.1667
Slide 15:
Example 1: Rolling a Fair Six-Sided Dice (contd.)
- Step 3: Calculate Var(X)
- Var(X) = E(X²) - [E(X)]²
= 15.1667 - (3.5)²
= 15.1667 - 12.25
= 2.9167
Slide 16:
Properties of Variance
- Variance has the following properties:
- Var(X + c) = Var(X), where c is a constant
- Var(cX) = c²Var(X), where c is a constant
- Var(X + Y) = Var(X) + Var(Y), where X and Y are independent random variables
- Var(aX + bY) = a²Var(X) + b²Var(Y) + 2abCov(X, Y), where a and b are constants and Cov(X, Y) represents the covariance between X and Y.
Slide 17:
Example 2: Independent Random Variables
- Consider two independent random variables X and Y.
- The variance of X is 4 and the variance of Y is 9.
- Let Z = 2X - 3Y.
- We want to calculate the variance of Z using the properties of variance.
Slide 18:
Example 2: Independent Random Variables (contd.)
- Step 1: Calculate Var(Z)
- Var(Z) = (2²)Var(X) + (-3)²Var(Y) + 2(2)(-3)Cov(X, Y)
= 4(4) + 9(9) + 2(2)(-3)(0)
= 16 + 81 + 0
= 97
Slide 19:
Example 2: Independent Random Variables (contd.)
- Therefore, the variance of Z is 97.
Slide 20:
Conclusion
- In probability theory, variance measures the spread or dispersion of a data set.
- The alternative formula for variance, Var(X) = E(X²) - [E(X)]², provides a simplified calculation.
- Variance has properties that can simplify its calculation in different scenarios.
- Variance of a Continuous Random Variable
- In addition to discrete random variables, variance can also be calculated for continuous random variables.
- The formula for calculating the variance of a continuous random variable is slightly different from the formula for discrete random variables.
- For a continuous random variable X with probability density function f(x), the variance is given by:
- Var(X) = ∫[(x - μ)² * f(x)] dx, where μ is the mean of the random variable.
- Example 1: Calculating the Variance of a Continuous Random Variable
- Suppose we have a continuous random variable X with the probability density function f(x) = 2x for 0 ≤ x ≤ 1.
- We want to calculate the variance of X.
- Step 1: Calculate the mean, μ.
- μ = ∫[x * f(x)] dx
= ∫[x * 2x] dx
= 2∫[x²] dx
= 2[x³/3] from 0 to 1
= 2/3
- Example 1: Calculating the Variance of a Continuous Random Variable (contd.)
- Step 2: Calculate the variance, Var(X).
- Var(X) = ∫[(x - μ)² * f(x)] dx
= ∫[(x - 2/3)² * 2x] dx
= 2∫[(x - 2/3)² * x] dx
- Example 1: Calculating the Variance of a Continuous Random Variable (contd.)
- Step 2: Calculate the variance, Var(X) (contd.)
- We solve this integral using integration by parts.
- Integration by parts formula: ∫[u dv] = uv - ∫[v du]
- Let u = (x - 2/3)²
- Let dv = x dx
- Example 1: Calculating the Variance of a Continuous Random Variable (contd.)
- Step 2: Calculate the variance, Var(X) (contd.)
- Using the integration by parts formula, we have:
- ∫[(x - 2/3)² * x] dx = [(x - 2/3)² * (x²/2)] - ∫[(x²/2) * 2(x - 2/3)] dx
- Example 1: Calculating the Variance of a Continuous Random Variable (contd.)
- Step 2: Calculate the variance, Var(X) (contd.)
- Using the integration by parts formula, we have:
- ∫[(x - 2/3)² * x] dx = [(x - 2/3)² * (x²/2)] - ∫[(x²/2) * 2(x - 2/3)] dx
- Example 1: Calculating the Variance of a Continuous Random Variable (contd.)
- Step 2: Calculate the variance, Var(X) (contd.)
- Simplifying the equation, we have:
- [(x - 2/3)² * (x²/2)] - ∫[(x²/2) * 2(x - 2/3)] dx
= (x - 2/3)³/2 - [x³/3 - 4x²/3 + 8x/9] from 0 to 1
- Example 1: Calculating the Variance of a Continuous Random Variable (contd.)
- Step 2: Calculate the variance, Var(X) (contd.)
- Substituting the limits of integration, we have:
- (1 - 2/3)³/2 - [(1)³/3 - 4(1)²/3 + 8(1)/9] - (0 - 2/3)³/2 + [(0)³/3 - 4(0)²/3 + 8(0)/9]
- Example 1: Calculating the Variance of a Continuous Random Variable (contd.)
- Step 2: Calculate the variance, Var(X) (contd.)
- Simplifying the expression, we have:
- (1/3)³/2 - (1/3 - 4/3 + 8/9) - (-2/3)³/2 + (0 - 0 + 0)
- Example 1: Calculating the Variance of a Continuous Random Variable (contd.)
- Step 2: Calculate the variance, Var(X) (contd.)
- Simplifying the expression, we have:
- (1/27) - (3/9) - (-8/27)
= 1/27 - 1/3 + 8/27
= 8/27 - 1/3
= 8/27 - 9/27
= -1/27