ScholarQuill logoScholarQuillUniversity Notes
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
Study Tools
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
Contact
ScholarQuill logo
My Semester
Explore Notes
Past Papers12 New
Video CoursesNew
Search
Settings
GPA/CGPA Calculator
Schedule & To-Do
Student Portal
Contact
ScholarQuill logoScholarQuillUniversity Notes
Study PortalMS-251Variance Covariance Ra…
Ctrl + K
Login
Explore
Search
Semester
Papers
CGPA
    MS-251

    Probability and Statistics

    Progress0 / 36 done
    Topics36
    1Statistics and Data Analysis2Statistical Inference3Samples, Populations, and the Role of Probability4Sampling Procedures5Discrete and Continuous Data6Statistical Modeling7Types of Statistical Studies
    8Sample Space, Events, Counting Sample Points9Probability of an Event10Additive Rules11Conditional Probability12Independence and the Product Rule13Bayes’ Rule14Random Variables and Probability Distributions
    15Mean of a Random Variable16Variance and Covariance of Random Variables17Means and Variances of Linear Combinations of Random Variables18Chebyshev’s Theorem19Discrete Probability Distributions20Continuous Probability Distributions21Fundamental Sampling Distributions22Sampling Distributions and Data Descriptions23Random Sampling24Sampling Distributions25Sampling Distribution of Means and the Central Limit Theorem26Sampling Distribution of S227t-Distribution28F-Quantile and Probability Plots29Single Sample & One- and Two-Sample Estimation Problems30Single Sample & One- and Two-Sample Tests of Hypotheses31The Use of P-Values for Decision Making in Testing Hypotheses
    32Linear Regression and Correlation33Least Squares and the Fitted Model34Multiple Linear Regression and Certain Nonlinear Regression Models35Linear Regression Model Using Matrices36Properties of the Least Squares Estimators
    13 min read
    Topic 16 of 36
    Topic Study Note Illustration
    16

    Variance and Covariance of Random Variables

    Variance and covariance are important concepts in probability theory and statistics that measure the spread (or variability) of random variables and the relationship between two random variables,...

    Variance and Covariance of Random Variables

    Variance and covariance are important concepts in probability theory and statistics that measure the spread (or variability) of random variables and the relationship between two random variables, respectively. Let's go over each concept in detail.


    1. Variance of a Random Variable

    Definition

    The variance of a random variable measures the spread or dispersion of its values around the expected value (mean). It quantifies how much the values of the random variable deviate, on average, from the expected value.

    The variance of a random variable XXX, denoted by Var(X)\text{Var}(X)Var(X), is defined as the expected value of the squared deviation from the mean E[X]E[X]E[X]:

    Var(X)=E[(X−E[X])2]\text{Var}(X) = E[(X - E[X])^2]Var(X)=E[(X−E[X])2]

    Alternatively, the variance can be computed using the following formula:

    Var(X)=E[X2]−(E[X])2\text{Var}(X) = E[X^2] - (E[X])^2Var(X)=E[X2]−(E[X])2

    This formula is useful because it allows you to compute the variance by finding the expected value of X2X^2X2 and subtracting the square of the expected value of XXX.

    Interpretation

    • A higher variance indicates that the values of XXX are spread out over a larger range, meaning the data is more dispersed.
    • A lower variance indicates that the values of XXX are clustered more closely around the expected value, meaning the data is less dispersed.

    Example

    Let’s say you have a random variable XXX with possible outcomes 1,2,31, 2, 31,2,3, and corresponding probabilities P(X=1)=0.2P(X = 1) = 0.2P(X=1)=0.2, P(X=2)=0.5P(X = 2) = 0.5P(X=2)=0.5, and P(X=3)=0.3P(X = 3) = 0.3P(X=3)=0.3.

    1. First, calculate the expected value E[X]E[X]E[X]:

      E[X]=(1⋅0.2)+(2⋅0.5)+(3⋅0.3)=0.2+1+0.9=2.1E[X] = (1 \cdot 0.2) + (2 \cdot 0.5) + (3 \cdot 0.3) = 0.2 + 1 + 0.9 = 2.1E[X]=(1⋅0.2)+(2⋅0.5)+(3⋅0.3)=0.2+1+0.9=2.1
    2. Next, calculate E[X2]E[X^2]E[X2]:

      E[X2]=(12⋅0.2)+(22⋅0.5)+(32⋅0.3)=(1⋅0.2)+(4⋅0.5)+(9⋅0.3)=0.2+2+2.7=4.9E[X^2] = (1^2 \cdot 0.2) + (2^2 \cdot 0.5) + (3^2 \cdot 0.3) = (1 \cdot 0.2) + (4 \cdot 0.5) + (9 \cdot 0.3) = 0.2 + 2 + 2.7 = 4.9E[X2]=(12⋅0.2)+(22⋅0.5)+(32⋅0.3)=(1⋅0.2)+(4⋅0.5)+(9⋅0.3)=0.2+2+2.7=4.9
    3. Finally, compute the variance:

      Var(X)=E[X2]−(E[X])2=4.9−(2.1)2=4.9−4.41=0.49\text{Var}(X) = E[X^2] - (E[X])^2 = 4.9 - (2.1)^2 = 4.9 - 4.41 = 0.49Var(X)=E[X2]−(E[X])2=4.9−(2.1)2=4.9−4.41=0.49

    Thus, the variance of XXX is 0.49.


    2. Standard Deviation

    The standard deviation is the square root of the variance and provides a measure of the spread of the random variable in the same units as the random variable itself. It is given by:

    SD(X)=Var(X)\text{SD}(X) = \sqrt{\text{Var}(X)}SD(X)=Var(X)​

    Standard deviation is often easier to interpret because it is in the same units as the data.

    In our example, since Var(X)=0.49\text{Var}(X) = 0.49Var(X)=0.49, the standard deviation is:

    SD(X)=0.49=0.7\text{SD}(X) = \sqrt{0.49} = 0.7SD(X)=0.49​=0.7

    3. Covariance of Two Random Variables

    Definition

    The covariance of two random variables XXX and YYY measures the degree to which the two variables change together. If XXX and YYY tend to increase or decrease together, the covariance will be positive. If one tends to increase while the other decreases, the covariance will be negative. A covariance of zero indicates that the two variables are linearly independent.

    The covariance between two random variables XXX and YYY, denoted Cov(X,Y)\text{Cov}(X, Y)Cov(X,Y), is defined as:

    Cov(X,Y)=E[(X−E[X])(Y−E[Y])]\text{Cov}(X, Y) = E[(X - E[X])(Y - E[Y])]Cov(X,Y)=E[(X−E[X])(Y−E[Y])]

    Alternatively, the covariance can be calculated using the following formula:

    Cov(X,Y)=E[XY]−E[X]E[Y]\text{Cov}(X, Y) = E[XY] - E[X]E[Y]Cov(X,Y)=E[XY]−E[X]E[Y]

    Interpretation

    • A positive covariance indicates that as XXX increases, YYY tends to increase as well (and vice versa).
    • A negative covariance indicates that as XXX increases, YYY tends to decrease.
    • A covariance of zero indicates that there is no linear relationship between the two variables.

    Example

    Let’s say we have two random variables XXX and YYY with the following values and probabilities:

    XXX YYY P(X,Y)P(X, Y)P(X,Y)
    1 2 0.1
    1 3 0.4
    2 2 0.3
    2 4 0.2
    1. First, calculate the expected values E[X]E[X]E[X] and E[Y]E[Y]E[Y]:

      E[X]=(1⋅0.1)+(1⋅0.4)+(2⋅0.3)+(2⋅0.2)=0.1+0.4+0.6+0.4=1.5E[X] = (1 \cdot 0.1) + (1 \cdot 0.4) + (2 \cdot 0.3) + (2 \cdot 0.2) = 0.1 + 0.4 + 0.6 + 0.4 = 1.5E[X]=(1⋅0.1)+(1⋅0.4)+(2⋅0.3)+(2⋅0.2)=0.1+0.4+0.6+0.4=1.5 E[Y]=(2⋅0.1)+(3⋅0.4)+(2⋅0.3)+(4⋅0.2)=0.2+1.2+0.6+0.8=2.8E[Y] = (2 \cdot 0.1) + (3 \cdot 0.4) + (2 \cdot 0.3) + (4 \cdot 0.2) = 0.2 + 1.2 + 0.6 + 0.8 = 2.8E[Y]=(2⋅0.1)+(3⋅0.4)+(2⋅0.3)+(4⋅0.2)=0.2+1.2+0.6+0.8=2.8
    2. Next, calculate E[XY]E[XY]E[XY]:

      E[XY]=(1⋅2⋅0.1)+(1⋅3⋅0.4)+(2⋅2⋅0.3)+(2⋅4⋅0.2)E[XY] = (1 \cdot 2 \cdot 0.1) + (1 \cdot 3 \cdot 0.4) + (2 \cdot 2 \cdot 0.3) + (2 \cdot 4 \cdot 0.2)E[XY]=(1⋅2⋅0.1)+(1⋅3⋅0.4)+(2⋅2⋅0.3)+(2⋅4⋅0.2) E[XY]=(2⋅0.1)+(3⋅0.4)+(4⋅0.3)+(8⋅0.2)E[XY] = (2 \cdot 0.1) + (3 \cdot 0.4) + (4 \cdot 0.3) + (8 \cdot 0.2)E[XY]=(2⋅0.1)+(3⋅0.4)+(4⋅0.3)+(8⋅0.2) E[XY]=0.2+1.2+1.2+1.6=4.2E[XY] = 0.2 + 1.2 + 1.2 + 1.6 = 4.2E[XY]=0.2+1.2+1.2+1.6=4.2
    3. Finally, compute the covariance:

      Cov(X,Y)=E[XY]−E[X]E[Y]=4.2−(1.5⋅2.8)=4.2−4.2=0\text{Cov}(X, Y) = E[XY] - E[X]E[Y] = 4.2 - (1.5 \cdot 2.8) = 4.2 - 4.2 = 0Cov(X,Y)=E[XY]−E[X]E[Y]=4.2−(1.5⋅2.8)=4.2−4.2=0

    Thus, Cov(X,Y)=0\text{Cov}(X, Y) = 0Cov(X,Y)=0, meaning that there is no linear relationship between XXX and YYY in this example.


    4. Properties of Covariance

    Covariance has the following important properties:

    • Symmetry:

      Cov(X,Y)=Cov(Y,X)\text{Cov}(X, Y) = \text{Cov}(Y, X)Cov(X,Y)=Cov(Y,X)
    • Linear Scaling: If XXX and YYY are random variables and aaa and bbb are constants, then:

      Cov(aX+b,Y)=a⋅Cov(X,Y)\text{Cov}(aX + b, Y) = a \cdot \text{Cov}(X, Y)Cov(aX+b,Y)=a⋅Cov(X,Y)
    • Covariance of a Random Variable with Itself: The covariance of a random variable with itself is simply its variance:

      Cov(X,X)=Var(X)\text{Cov}(X, X) = \text{Var}(X)Cov(X,X)=Var(X)

    5. Correlation Coefficient

    The correlation coefficient is a normalized measure of the relationship between two random variables. It is defined as:

    ρ(X,Y)=Cov(X,Y)SD(X)⋅SD(Y)\rho(X, Y) = \frac{\text{Cov}(X, Y)}{\text{SD}(X) \cdot \text{SD}(Y)}ρ(X,Y)=SD(X)⋅SD(Y)Cov(X,Y)​

    The correlation coefficient ranges from -1 to 1:

    • A value of 1 indicates a perfect positive linear relationship.
    • A value of -1 indicates a perfect negative linear relationship.
    • A value of 0 indicates no linear relationship.

    Summary

    1. Variance measures the spread of a random variable around its expected value.
    2. Covariance measures the relationship between two random variables—whether they tend to increase or decrease together.
    3. Standard Deviation is the square root of the variance and is a measure of the spread in the same units as the data.
    4. The correlation coefficient normalizes the covariance to provide a standardized measure of the strength and direction of the linear relationship between two variables.

    These concepts are fundamental to understanding how random variables behave, both individually (through variance) and in relation to one another (through covariance).

    ← Previous topic 15
    Mathematical Expectation: Mean of a Random Variable
    Next topic 17 →
    Means and Variances of Linear Combinations of Random Variables

    Past Papers

    Open this section to view and download past papers

    Click on Show Past Papers to load available exam papers.

    Reading Progress
    0%
    13mremaining
    2.1kwords
    Intermediatelevel
    On This Page

    No headings found

    Study Toolkit

    Subject Portal

    Probability and Statistics