Expected Value of a Random Variable
This chapter discusses the expected values of random variables and how to calculate them.
We'll cover the following
Expected Value of a random variable
We all understand the concept of average. The average test-score of a class is the sum of each individual student's score divided by the total number of students in the class. The expected value of a random variable is somewhat a similar concept. However, note that the outcomes that a random variable can take on don't happen with the same frequency. An outcome that happens more frequently should get a higher weight when computing the "average" for a random variable. The weight here is the probability with which each outcome occurs.
Take the case of the random variable X which we define as the number of heads that occur in 3 flips of a coin. The expected number of heads seen when the experiment of flipping a coin thrice is repeated many many times is shown below:
Thus we can make a claim: if we do several experiments of flipping a coin three times and noting down the results from each experiment, we can expect to see heads appearing 1.5 times across all the experiments.
Level up your interview prep. Join Educative to access 70+ hands-on prep courses.