Tabla de Contenidos
In mathematics, the expected value , also known as the expectation , is the long-term average of the value of a random variable. In a way, it corresponds to the value of the random variable that we would expect to obtain, on average, after repeating a random experiment many times (hence the name “expected value”).
There are two different ways to calculate the expected value depending on the type of random variable in question. This variable is usually represented by the capital letter X, and can be either continuous or discrete. In each of the cases, the way of calculating the expectation of X (denoted by E[X]) changes, as will be seen below.
Calculation of the expected value of a discrete random variable
A random variable is any function that assigns a number or a numerical value to each outcome of a random experiment, be it quantitative or qualitative. In the case of discrete random variables, these refer to those random variables that have a finite number of possible outcomes, or whose outcomes can be ordered as first, second, third, etc.
An example of a discrete random variable might be the number of even numbers rolled when two 6-sided dice are rolled. In this case, the only possible values of the random variable would be 0, 1, and 2.
The expected value of a discrete random variable is calculated by adding the product of each value of the variable and the probability of that value. This can be written mathematically using the following formula:
In this equation, E[X] is the expectation of X (the value we want to determine), x i corresponds to the ith value of the random variable, and P(x i ) corresponds to the probability that the outcome of the experiment is x i .
Example of calculating the expected value of a discrete random variable
A practical and simple way to understand the concept of expected value is through games of chance. Imagine a game of lucky roulette, like the show that, with local variations, is broadcast on television in many countries. In this roulette wheel, in certain cases there are 4 wedges that result in losing $400, there are 5 wedges that contain 0, 6 that contain $1,000 and 1 wedge with the jackpot of $6,000. The question is, what is the expected value of the amount of money that roulette contestants will win in the long run?
When faced with a problem like this, the first thing we must do is determine all the possible results of the experiment that consists of spinning the roulette wheel. In addition, it must be possible to determine the probability of obtaining each of the possible values of the random variable.
In the present case, there are only 4 possible outcomes which are –$400, $0, $1,000, and $6,000. In total, there are 4 + 5 + 6 + 1 = 16 wedges, so the probabilities of each outcome of the random variable are 1/4, 5/16. 3/8 and 1/16.
X | P(x) |
-$400 | 4/16 = 1/4 |
$0 | 5/16 |
$1,000 | 6/16 = 3/8 |
$6,000 | 1/16 |
Now, we already have what we need to carry out the summation to determine the expected value:
This means that, in the long run, roulette pays its participants $650.
Calculation of the expected value of a continuous random variable
When a random variable is continuous, it means that the set of its possible values consists of an interval of real numbers, whether this interval is finite or infinite. For continuous random variables, the probability is replaced by the pdf and the summation is replaced by the integral:
In this equation, x is the continuous random variable, and f (x) corresponds to the probability distribution function of x. As can be seen here, the integral must be done over all possible values of the random variable, X-
Example of calculating the expected value of a continuous random variable
Consider a continuous random variable whose distribution function is given by:
You are asked to determine what the mean or expected value of this continuous random variable is.
When solving this problem, it should be considered that the function is defined piecemeal, dividing the real line into 3 intervals, which are (-∞; -2 ), [-2 ; 2] and (2 ; + ∞). In this way, when applying the formula for the expectation of X, the integral is divided into the sum of three integrals:
But, since the random variable, x, is zero in the first and last interval, then both integrals are zero, which only gives the center integral, evaluated between -2 and +2:
References
Expected Value Calculator. (nd). Retrieved from http://www.learningaboutelectronics.com/Articulos/Calculadora-de-valor-esperado.php
del Rio, AQ (2019, September 4). 5.4 Mathematical Expectation of a Random Variable | Sweetened Basic Statistics. Retrieved from https://bookdown.org/aquintela/EBE/esperanza-matematica-de-una-variable-aleatoria.html
López, JF (2021, February 15). Mathematical hope. Retrieved from https://economipedia.com/definiciones/esperanza-matematica.html
MateMobile. (2021, January 1). Mean or expected value, variance, and standard deviation of a continuous random variable | matmobile. Retrieved from https://matemovil.com/media-o-valor-esperado-varianza-y-desviacion-estandar-de-una-variable-aleatoria-continua/
Webster, A. (2001). Statistics Applied to Business and the Economy (Spanish Edition) . Toronto, Canada: Irwin Professional Publishing.