chapter

    Random Variables, Expectation, Variance and Covariance Notes for Gate Cs

    Random Variables, Expectation, Variance and Covariance notes for GATE CS: 26 study cards covering concepts, formulas, shortcuts and exam traps, plus solved pr

    Random Variables Expectation Variance and Covariance notes

    Chapter Roadmap: Probability and Statistics

    Chapter Journey: Probability and Statistics

    1. Random Variables and Distributions

    Discrete vs Continuous, PMF vs PDF, CDF. Map outcomes to numbers.

    2. Expectation and Moments (Current Topic)

    Mean, Variance, Covariance. Calculate expected values for geometric quantities.

    3. Standard Distributions

    Binomial, Poisson, Normal, Exponential. Recognize patterns and apply formulas.

    4. Limit Theorems

    Law of Large Numbers, Central Limit Theorem. Behavior of sums.

    Exam Insight: Questions often blend probability with algorithms (expected running time) or systems (queueing delays). Mastering expectation is non-negotiable.

    Core Idea: Geometric Expectation via Integration

    The Core Idea

    In many problems, a random experiment defines a geometric object (like a sub-interval). We are asked to find the Expected Value (mean) of a property of that object (like its length).

    General Method

    If is a continuous random variable with PDF , and is a geometric quantity derived from , then:

    Key Steps

    1. Identify the Random Variable: Usually the position of a cut or a point, e.g., .
    2. Define the Geometry: Express the target quantity (length, area) as a function . Note that this function might be piecewise.
    3. Determine the PDF: For uniform distributions over , .
    4. Integrate: Compute over the valid range.

    Worked Example: The Split Interval

    The Split Interval

    The unit interval is divided at a point chosen uniformly distributed over . Find the expected length of the sub-interval that contains $0.4$.

    0.4 X 0 1

    Step-by-Step Solution

    1. Define the Random Variable

    Let be the point where the interval is cut. for .

    2. Define the Target Variable (Length)

    Let be the length of the sub-interval containing . The cut creates two intervals: and .

    • Case 1: point $0.4$ lies in .
    • Case 2: point $0.4$ lies in .

    3. Calculate Expectation

    Integral 1:

    Integral 2:

    23 more cards in this chapter

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    Level 1: Warm-up

    Let be a discrete random variable taking values in the set . What is the maximum possible value of the expected value ?

    Question 2
    Level 1: Warm-up

    Consider the following three games:

    \begin{itemize}

    \item Game A: Win 10 with probability 0.5, lose 2 with probability 0.5

    \item Game B: Win 8 with probability 0.6, lose 4 with probability 0.4

    \item Game C: Win 6 with probability 0.7, lose 3 with probability 0.3

    \end{itemize}

    Match each game with its expected payoff and identify the optimal game to play.

    Question 3
    Level 1: Warm-up

    Consider the following statements about a discrete random variable :

    \begin{enumerate}

    \item

    \item

    \item

    \end{enumerate}

    Which of the statements are ALWAYS true?

    Question 4
    Level 1: Warm-up

    Let and be random variables, not necessarily independent, with and . The expected value of is ___________. (rounded off to two decimal places)

    Question 5
    Level 1: Warm-up

    Let be a random variable that takes values in the interval with . The maximum possible value of is:

    Question 6
    Level 1: Warm-up

    Let and be any random variables. Which of the following statements is ALWAYS true?

    Question 7
    Level 1: Warm-up

    Let and be discrete random variables. Which of the following statements is ALWAYS true?

    Question 8
    Level 1: Warm-up

    Let and be random variables with , , and . The variance of is _______.

    Question 9
    Level 1: Warm-up

    Let and be random variables with and . The maximum possible value of is _______.

    Question 10
    Level 1: Warm-up

    Let and be random variables with , and . The covariance is ___________. (rounded off to two decimal places)

    Free preview ends here

    Login to view the complete notes

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Random Variables, Expectation, Variance and Covariance Notes for GATE CS

    Random Variables, Expectation, Variance and Covariance notes for GATE CS: 26 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.

    Chapter Roadmap: Probability and Statistics

    Chapter Journey: Probability and Statistics

    1. Random Variables and Distributions

    Discrete vs Continuous, PMF vs PDF, CDF. Map outcomes to numbers.

    2. Expectation and Moments (Current Topic)

    Mean, Variance, Covariance. Calculate expected values for geometric quantities.

    3. Standard Distributions

    Binomial, Poisson, Normal, Exponential. Recognize patterns and apply formulas.

    4. Limit Theorems

    Law of Large Numbers, Central Limit Theorem. Behavior of sums.

    Exam Insight: Questions often blend probability with algorithms (expected running time) or systems (queueing delays). Mastering expectation is non-negotiable.

    Core Idea: Geometric Expectation via Integration

    The Core Idea

    In many problems, a random experiment defines a geometric object (like a sub-interval). We are asked to find the Expected Value (mean) of a property of that object (like its length).

    General Method

    If is a continuous random variable with PDF , and is a geometric quantity derived from , then:

    Key Steps

    1. Identify the Random Variable: Usually the position of a cut or a point, e.g., .
    2. Define the Geometry: Express the target quantity (length, area) as a function . Note that this function might be piecewise.
    3. Determine the PDF: For uniform distributions over , .
    4. Integrate: Compute over the valid range.

    Worked Example: The Split Interval

    The Split Interval

    The unit interval is divided at a point chosen uniformly distributed over . Find the expected length of the sub-interval that contains $0.4$.

    0.4 X 0 1

    Step-by-Step Solution

    1. Define the Random Variable

    Let be the point where the interval is cut. for .

    2. Define the Target Variable (Length)

    Let be the length of the sub-interval containing . The cut creates two intervals: and .

    • Case 1: point $0.4$ lies in .
    • Case 2: point $0.4$ lies in .

    3. Calculate Expectation

    Integral 1:

    Integral 2:

    Pattern: Piecewise Geometric Functions

    Recognizing the Pattern

    Many geometric expectation problems involve a fixed reference point inside a domain, and a random cut or point .

    The Structure

    1. Domain: Usually or .
    2. Random Point: .
    3. Fixed Point: .
    4. Quantity: Distance to nearest edge, length of segment containing , etc.

    The Trap

    The function describing the quantity is rarely linear across the entire domain. It usually has a kink or change in slope at .

    Action Plan

    • Identify the critical point .
    • Write for and separately.
    • Split the integral: .

    Random Variables, Expectation, Variance and Covariance: Solved Questions with Step-by-Step Explanations (10 Problems)

    Question 1 · Engineering Mathematics MCQ

    Let be a discrete random variable taking values in the set . What is the maximum possible value of the expected value ?

    1. A.

      2

    2. B.

      3

    3. C.

      3.5

    4. D.

      4

    Correct Answer:

    D

    Step-by-Step Solution

    Key idea: The expected value is bounded by the minimum and maximum possible values of the random variable.

    Step 1: Recall that is a weighted average of the possible values.

    Step 2: A weighted average is maximized when all weight is on the largest value.

    Step 3: The maximum value in is 4. This occurs when and all other probabilities are 0.

    Step 4: In this case, .

    Answer: 4

    Common mistake: Thinking is always the middle value (2) or the average of the range (3.5).

    Question 2 · Engineering Mathematics MCQ

    Consider the following three games:

    \begin{itemize}

    \item Game A: Win 10 with probability 0.5, lose 2 with probability 0.5

    \item Game B: Win 8 with probability 0.6, lose 4 with probability 0.4

    \item Game C: Win 6 with probability 0.7, lose 3 with probability 0.3

    \end{itemize}

    Match each game with its expected payoff and identify the optimal game to play.

    1. A.

      A: 4, B: 3.2, C: 3.3; Optimal: A

    2. B.

      A: 4, B: 3.2, C: 3.3; Optimal: B

    3. C.

      A: 6, B: 4.8, C: 4.2; Optimal: A

    4. D.

      A: 4, B: 3.3, C: 3.2; Optimal: C

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is a decision problem where we compute the expected payoff for each option and choose the maximum.

    Step 1: Compute for each game. "Lose" means negative payoff.

    Step 2: Game A:

    Step 3: Game B:

    Step 4: Game C:

    Step 5: Compare: .

    Answer: A: 4, B: 3.2, C: 3.3; Optimal: A

    Common mistake: Misreading "lose" as "win" or swapping B and C values.

    Question 3 · Engineering Mathematics MCQ

    Consider the following statements about a discrete random variable :

    \begin{enumerate}

    \item

    \item

    \item

    \end{enumerate}

    Which of the statements are ALWAYS true?

    1. A.

      S1 and S3 only

    2. B.

      S1 and S2 only

    3. C.

      S2 and S3 only

    4. D.

      S1, S2 and S3

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a statement truth question testing fundamental properties of expectation. We need to verify each statement using expectation properties.

    Step 1: Evaluate S1: .

    By linearity of expectation, for any constant . With :

    S1 is true.

    Step 2: Evaluate S2: .

    This is equivalent to , which is always true since variance is non-negative.

    S2 is true.

    Step 3: Evaluate S3: .

    This is false. By Jensen's inequality (or triangle inequality for expectations), .

    Counterexample: Let take values and $1$ with probability $0.5$ each. Then , so . But .

    S3 is false.

    Answer: S1 and S2 only

    Question 4 · Engineering Mathematics NAT

    Let and be random variables, not necessarily independent, with and . The expected value of is ___________. (rounded off to two decimal places)

    Correct Answer:

    11.00

    Step-by-Step Solution

    Insight: linearity of expectation holds for any random variables. The phrase about

    independence is there to test whether you know that it is irrelevant for a linear

    combination.

    Exam route: .

    Learning route:

    Step 1 — recall the property. For constants and any random variables ,

    No independence assumption is used anywhere in its proof, so dependence changes nothing.

    Step 2 — match the coefficients: , , . Keep the minus sign attached

    to the $2$.

    Step 3 — substitute the given means:

    Step 4 — add: .

    Answer: $11.00$.

    Tempting wrong path 1: losing the sign of the second coefficient and computing

    . The break is at Step 2; the coefficient is , so its contribution

    is .

    Tempting wrong path 2: dropping the constant and reporting . The break is

    at Step 3, where must be included; a constant is its own expectation.

    Tempting wrong path 3: concluding that the value cannot be found because the dependence

    is unknown. That would be correct for , not for a linear combination.

    Generalization: sums and constants pass through expectation freely; products do not.

    Verification: take the degenerate choice , , which matches both

    given means. Then , consistent with the answer.

    Question 5 · Engineering Mathematics MCQ

    Let be a random variable that takes values in the interval with . The maximum possible value of is:

    1. A.

      $0.25$

    2. B.

      $0.50$

    3. C.

      $0.75$

    4. D.

      $1.00$

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is an optimization problem using the computational formula for variance and the constraint that .

    Step 1: Recall the computational formula:

    Step 2: To maximize , we need to maximize .

    Step 3: Since , we have (because implies ).

    Step 4: Therefore, .

    Step 5: The maximum value of is $0.5$, achieved when is a Bernoulli random variable with and .

    Step 6: Maximum variance:

    Answer: A

    Common trap: A student might think can be as large as $1$ (since ), giving (option C). However, this ignores the constraint that , which limits how large can be.

    Question 6 · Engineering Mathematics MCQ

    Let and be any random variables. Which of the following statements is ALWAYS true?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: This is a statement truth problem testing the properties of variance, specifically the effect of constants and the requirement of independence.

    Step 1: Analyze each option:

    Option A:

    • This is ONLY true if and are independent (or uncorrelated)
    • In general:
    • NOT always true ✗

    Option B:

    • The correct property is:
    • So , not
    • NOT true ✗

    Option C:

    • Adding a constant shifts the distribution but doesn't change the spread
    • Property: for any constant
    • ALWAYS true ✓

    Option D:

    • The correct formula is:
    • This is NOT
    • NOT true ✗

    Answer: C

    Common trap: A student might choose option A, forgetting that only holds when and are independent. The problem states "any random variables," so we cannot assume independence.

    Question 7 · Engineering Mathematics MCQ

    Let and be discrete random variables. Which of the following statements is ALWAYS true?

    1. A.

    2. B.

      only if and are independent

    3. C.

      for any constants

    4. D.

      must be a possible value of

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: This is a statement truth problem testing the properties of discrete expectation, specifically linearity and common misconceptions.

    Step 1: Analyze each option:

    Option A:

    • This is FALSE in general
    • The correct relationship is:
    • So
    • Equality holds only when (i.e., is constant)
    • NOT always true ✗

    Option B: only if and are independent

    • This is FALSE
    • Linearity of expectation holds regardless of independence
    • is ALWAYS true
    • NOT always true ✗

    Option C: for any constants

    • This is the linearity property of expectation
    • It holds for any random variable and any constants
    • ALWAYS true ✓

    Option D: must be a possible value of

    • This is FALSE
    • Example: Fair die roll has , but 3.5 is not a possible outcome
    • NOT always true ✗

    Answer: C

    Common trap: A student might choose option B, thinking that linearity requires independence. However, linearity of expectation is one of the most powerful properties precisely because it holds regardless of dependence.

    Question 8 · Engineering Mathematics MCQ

    Let and be random variables with , , and . The variance of is _______.

    1. A.

      25

    2. B.

      13

    3. C.

      37

    4. D.

      11

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a variance of linear combination question. Use the formula .

    Step 1: Identify coefficients. Here , .

    Step 2: Apply the formula.

    Answer: 13

    Question 9 · Engineering Mathematics MCQ

    Let and be random variables with and . The maximum possible value of is _______.

    1. A.

      100

    2. B.

      29

    3. C.

      10

    4. D.

      1

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: This is a Cauchy-Schwarz inequality question. The covariance is bounded by the product of standard deviations: .

    Step 1: Compute standard deviations.

    Step 2: Apply Cauchy-Schwarz.

    Step 3: The maximum value is $10$ (achieved when and are perfectly positively correlated).

    Answer: 10

    Question 10 · Engineering Mathematics NAT

    Let and be random variables with , and . The covariance is ___________. (rounded off to two decimal places)

    Correct Answer:

    -2.00

    Step-by-Step Solution

    Insight: three raw moments are handed over, so this is the computational form of

    covariance, one subtraction, and nothing else.

    Exam route: .

    Learning route:

    Step 1 — recall what covariance measures. By definition

    Step 2 — expand the product inside the expectation, writing , :

    Step 3 — take expectations term by term. The means are constants, so

    Step 4 — substitute the given numbers:

    Answer: .

    Tempting wrong path 1: subtracting in the reverse order, .

    The break is at Step 3, where the term carries the plus sign. A quick sanity rule

    fixes the order: here is smaller than the product of the means, so the variables

    tend to sit on opposite sides of their means together, and covariance must be negative.

    Tempting wrong path 2: reporting as the covariance. That skips the

    centring entirely; is a raw joint moment, not a measure of joint variability.

    Generalization: covariance is the raw product moment minus the product moment you would

    get if the variables were uncorrelated.

    Verification: invert the formula, ,

    which is exactly the given value.

    More notes in this unit