ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Probability and Statistics
    MS-251
    Progress0 / 36 topics
    Topics
    1. Introduction: Statistics and Data Analysis2. Statistical Inference3. Samples, Populations, and the Role of Probability4. Sampling Procedures5. Discrete and Continuous Data6. Statistical Modeling7. Types of Statistical Studies8. Probability: Sample Space, Events, Counting Sample Points9. Probability of an Event10. Additive Rules11. Conditional Probability12. Independence and the Product Rule13. Bayes’ Rule14. Random Variables and Probability Distributions15. Mathematical Expectation: Mean of a Random Variable16. Variance and Covariance of Random Variables17. Means and Variances of Linear Combinations of Random Variables18. Chebyshev’s Theorem19. Discrete Probability Distributions20. Continuous Probability Distributions21. Fundamental Sampling Distributions22. Sampling Distributions and Data Descriptions23. Random Sampling24. Sampling Distributions25. Sampling Distribution of Means and the Central Limit Theorem26. Sampling Distribution of S227. t-Distribution28. F-Quantile and Probability Plots29. Single Sample & One- and Two-Sample Estimation Problems30. Single Sample & One- and Two-Sample Tests of Hypotheses31. The Use of P-Values for Decision Making in Testing Hypotheses32. Regression: Linear Regression and Correlation33. Least Squares and the Fitted Model34. Multiple Linear Regression and Certain Nonlinear Regression Models35. Linear Regression Model Using Matrices36. Properties of the Least Squares Estimators
    MS-251›Mathematical Expectation: Mean of a Random Variable
    Probability and StatisticsTopic 15 of 36

    Mathematical Expectation: Mean of a Random Variable

    13 minread
    2,178words
    Intermediatelevel

    Mathematical Expectation: Mean of a Random Variable

    In probability theory and statistics, the mathematical expectation (often simply called the expected value) of a random variable is a key concept used to describe the "average" or "central" value of the variable. It provides a way to quantify the center of the distribution of the random variable, representing the long-term average value one would expect if the experiment or random process were repeated many times.

    1. Definition of Expected Value (Mathematical Expectation)

    The expected value E[X]E[X]E[X] of a random variable XXX is defined as the weighted average of all possible values that the random variable can take, with the weights being the probabilities associated with each value. It is sometimes called the "mean" of the random variable.

    For Discrete Random Variables

    For a discrete random variable XXX with possible values x1,x2,…,xnx_1, x_2, \dots, x_nx1​,x2​,…,xn​, and corresponding probabilities P(X=x1),P(X=x2),…,P(X=xn)P(X = x_1), P(X = x_2), \dots, P(X = x_n)P(X=x1​),P(X=x2​),…,P(X=xn​), the expected value is given by:

    E[X]=∑i=1nxi⋅P(X=xi)E[X] = \sum_{i=1}^{n} x_i \cdot P(X = x_i)E[X]=i=1∑n​xi​⋅P(X=xi​)

    In words, the expected value is the sum of the possible values xix_ixi​ weighted by their respective probabilities P(X=xi)P(X = x_i)P(X=xi​).

    Example (Discrete Case):

    Suppose you roll a fair six-sided die, and let XXX be the outcome of the roll. The possible values of XXX are 1, 2, 3, 4, 5, and 6, each with a probability of 16\frac{1}{6}61​. The expected value of XXX is:

    E[X]=1⋅16+2⋅16+3⋅16+4⋅16+5⋅16+6⋅16E[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}E[X]=1⋅61​+2⋅61​+3⋅61​+4⋅61​+5⋅61​+6⋅61​ E[X]=1+2+3+4+5+66=216=3.5E[X] = \frac{1 + 2 + 3 + 4 + 5 + 6}{6} = \frac{21}{6} = 3.5E[X]=61+2+3+4+5+6​=621​=3.5

    So, the expected value of rolling a fair die is 3.5.

    For Continuous Random Variables

    For a continuous random variable XXX with a probability density function (PDF) f(x)f(x)f(x), the expected value is defined as:

    E[X]=∫−∞∞x⋅f(x) dxE[X] = \int_{-\infty}^{\infty} x \cdot f(x) \, dxE[X]=∫−∞∞​x⋅f(x)dx

    In this case, the expected value is the integral of the product of the random variable xxx and its probability density function f(x)f(x)f(x) over all possible values of xxx.

    Example (Continuous Case):

    Consider a uniform distribution where a random variable XXX is uniformly distributed between 0 and 1. The probability density function is:

    f(x)=1for0≤x≤1f(x) = 1 \quad \text{for} \quad 0 \leq x \leq 1f(x)=1for0≤x≤1

    The expected value of XXX is:

    E[X]=∫01x⋅1 dx=∫01x dxE[X] = \int_{0}^{1} x \cdot 1 \, dx = \int_{0}^{1} x \, dxE[X]=∫01​x⋅1dx=∫01​xdx

    The integral of xxx from 0 to 1 is:

    E[X]=[x22]01=122−022=12E[X] = \left[ \frac{x^2}{2} \right]_{0}^{1} = \frac{1^2}{2} - \frac{0^2}{2} = \frac{1}{2}E[X]=[2x2​]01​=212​−202​=21​

    So, the expected value of a uniformly distributed random variable between 0 and 1 is 0.5.


    2. Properties of Expected Value

    The expected value has several important properties that make it useful in various applications. Some key properties include:

    2.1 Linearity of Expectation

    The expected value operator is linear. This means that for any two random variables XXX and YYY, and any constants aaa and bbb, the following holds:

    E[aX+bY]=aE[X]+bE[Y]E[aX + bY] = aE[X] + bE[Y]E[aX+bY]=aE[X]+bE[Y]

    This property allows you to compute the expected value of linear combinations of random variables by simply taking the linear combination of their expected values.

    Example:

    Let XXX and YYY be two random variables with E[X]=3E[X] = 3E[X]=3 and E[Y]=5E[Y] = 5E[Y]=5, and let a=2a = 2a=2 and b=−1b = -1b=−1. Then:

    E[2X−Y]=2E[X]−E[Y]=2(3)−5=6−5=1E[2X - Y] = 2E[X] - E[Y] = 2(3) - 5 = 6 - 5 = 1E[2X−Y]=2E[X]−E[Y]=2(3)−5=6−5=1

    2.2 Expected Value of a Constant

    If ccc is a constant (a fixed number), then:

    E[c]=cE[c] = cE[c]=c

    This means that the expected value of a constant is simply the constant itself.

    2.3 Expected Value of a Function of a Random Variable

    If g(X)g(X)g(X) is a function of the random variable XXX, then the expected value of g(X)g(X)g(X) is given by:

    • For a discrete random variable XXX:

      E[g(X)]=∑i=1ng(xi)⋅P(X=xi)E[g(X)] = \sum_{i=1}^{n} g(x_i) \cdot P(X = x_i)E[g(X)]=i=1∑n​g(xi​)⋅P(X=xi​)
    • For a continuous random variable XXX:

      E[g(X)]=∫−∞∞g(x)⋅f(x) dxE[g(X)] = \int_{-\infty}^{\infty} g(x) \cdot f(x) \, dxE[g(X)]=∫−∞∞​g(x)⋅f(x)dx

    This property is useful when dealing with transformations of random variables, such as squaring the variable or applying other functions.

    Example:

    If XXX is a random variable with E[X]=2E[X] = 2E[X]=2, and we want to find the expected value of X2X^2X2 (i.e., g(X)=X2g(X) = X^2g(X)=X2), we use:

    E[X2]=∑i=1nxi2⋅P(X=xi)E[X^2] = \sum_{i=1}^{n} x_i^2 \cdot P(X = x_i)E[X2]=i=1∑n​xi2​⋅P(X=xi​)

    or, for continuous variables:

    E[X2]=∫−∞∞x2⋅f(x) dxE[X^2] = \int_{-\infty}^{\infty} x^2 \cdot f(x) \, dxE[X2]=∫−∞∞​x2⋅f(x)dx

    3. Variance and Standard Deviation

    The variance of a random variable XXX, denoted Var(X)\text{Var}(X)Var(X), measures the spread of the random variable around its expected value. The variance is defined as:

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

    Alternatively, you can compute the variance as:

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

    The standard deviation is the square root of the variance:

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

    Variance and standard deviation are key measures of variability or uncertainty in the values of a random variable.


    4. Interpretation of Expected Value

    The expected value provides a summary measure of the distribution of a random variable, representing the "center" of the distribution. In the long run, if an experiment or random process is repeated many times, the average outcome will converge to the expected value. However, it's important to note that the expected value is not necessarily a value that the random variable will take on any given trial—it is a theoretical long-term average.

    Example: Gambling Game

    Imagine a simple gambling game where you bet 1onacoinflip.Ifyouwin,youget1 on a coin flip. If you win, you get 1onacoinflip.Ifyouwin,youget2 (your 1backplus1 back plus 1backplus1 profit), and if you lose, you lose your 1 bet. Let $$ X $$ represent the profit from the game (which can be 1 for a win and -$1 for a loss). The probability of winning and losing is both 0.50.50.5.

    The expected value of your profit is:

    E[X]=(1⋅0.5)+(−1⋅0.5)=0.5−0.5=0E[X] = (1 \cdot 0.5) + (-1 \cdot 0.5) = 0.5 - 0.5 = 0E[X]=(1⋅0.5)+(−1⋅0.5)=0.5−0.5=0

    Thus, the expected value of this game is $0, meaning, on average, you break even over many plays. This doesn't mean you will always break even on each individual flip, but over many flips, the average outcome will tend to zero.


    5. Conclusion

    The expected value is a fundamental concept in probability and statistics. It represents the "average" or "mean" of a random variable and is central to understanding the behavior of random processes. It is useful for making decisions, predicting future outcomes, and analyzing distributions. Understanding how to calculate and interpret expected values is crucial for working with random variables and probability distributions in both theoretical and applied contexts.

    Previous topic 14
    Random Variables and Probability Distributions
    Next topic 16
    Variance and Covariance of Random Variables

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time13 min
      Word count2,178
      Code examples0
      DifficultyIntermediate