**The mathematical expectation of a random variable X is the number that expresses the average value of the phenomenon that this variable represents.**

Mathematical hope, also called expected value, is equal to the sum of the probabilities of a random event, multiplied by the value of the random event. Or, put another way, the average value of a data set. Taking into account, of course, that the term mathematical hope is coined by the theory of probability. While in mathematics, the average value of an event that has occurred is called the mathematical mean. In discrete distributions with the same probability in each event the arithmetic mean is the same as the mathematical hope.

**Example of mathematical hope**

Let’s see a simple example to understand it. Imagine a coin. Two faces, face and cross. What would be the mathematical hope (expected value) to make it expensive? Mathematical hope would be calculated as the probability that, throwing the coin a very very large number of times, it will be expensive.

Since the currency can only fall in one of those two positions and both have the same probability of going out, we will say that the mathematical hope that it comes out expensive is one in two, or what is the same, 50% of the time .

We will do a test and we will throw a coin 10 times. Suppose the currency is perfect:

- Roll 1: C
- Roll 2: X
- Roll 3: X
- Roll 4: C
- Roll 5: X
- Roll 6: C
- Roll 7: C
- Roll 8: C
- Roll 9: X
- Roll 10: X

How many times has it been expensive (we count the C)? 5 times How many times has a cross come out (we count the X)? 5 times. The probability of being expensive will be 5/10 = 0.5 or as a percentage of 50%.

Once that event has occurred we can calculate the mathematical average of the number of times each event has occurred. The expensive side has left once in two times, that is, 50% of the time. The average coincides with the mathematical hope.

**Calculation of mathematical hope**

Mathematical hope is calculated using the probability of each event. The formula that formalizes this calculation is stated as follows:

Where x is the value of the event, P the probability of its occurrence, and the period in which said event occurs and N the total number of periods or observations.

The probability of an event not always happening is the same, as with currencies. There are countless cases in which one event is more likely to leave than another. That is why we use the formula P. In addition, when calculating mathematical numbers we must multiply by the value of the event. Below we see an example.

**What is mathematical hope used for?**

**Mathematical hope is used in all those disciplines in which the presence of probabilistic events is inherent in them. **Disciplines such as theoretical statistics, quantum physics, econometrics, biology or financial markets. A large number of processes and events that occur in the world are inaccurate. A clear and easy to understand example is that of the stock market.

In the stock market, everything is calculated based on expected values. Why expected values? Because it is what we expect to happen, but we cannot confirm it. Everything is based on probabilities, not certainties. If the expected value or mathematical expectation of the profitability of an asset is 10% per year, it means that according to the information we have from the past, the most likely return is to be 10%. If we only consider, of course, mathematical hope as a method to make our investment decisions.

Within the theories about financial markets, many use this concept of mathematical hope. Among those theories is that developed by **Markowitz on efficient portfolios** . In numbers, simplifying much, suppose that the returns of a financial asset are as follows:

**Year 1 ** 12%

**Year 2 ** 6%

**Year 3 ** 15%

**Year 4 ** 12%

The expected value would be the sum of the returns multiplied by their probability of happening. The probability of each profitability “happening” is 0.25. We have four observations, four years. Every year they have the same probability of repeating themselves.

Hope = (12 x 0.25) + (6 x 0.25) + (15 x 0.25) + (12 x 0.25) = 3 + 1.5 + 3.75 + 3 = 11.25%

Taking this information into account, we will say that the hope of the return on the asset is 11.25%.