Mathematical expectation m. Average value of a random variable


Let for random variable x possible values:

X1, x2, …, xk.

Measurements are taken N times, result x i observed N i once, then

Average value

(sum of measurement results)/(number of all measurements) =
.

At
taking into account (1.1)

we get

. (1.5)

For a random variable function

. (1.5a)

The average value of a quantity is equal to the sum of the products of its values ​​and the probabilities of these values .

At
we get
and (1.5a) gives normalization of probabilities

. (1.6)

Properties of the average

For constant
and independent random variables x And y performed:

1)

– the constant multiplier is taken out from under the averaging sign;

– the average of the sum/difference is equal to the sum/difference of the averages;

3)

– the average of the product of independent quantities is equal to the product of their averages.

Proof of Property 1

From the definition of average (1.5a)

we get

Proof of Property 2

Function
, describing the probability distribution for a random variable x, is the same for functions
And
, then from the definition of average (1.5a)

;

Proofproperties 3

We use the definition of the average and the distribution function
independent random variables x And y. According to the theorem about independent events, their probabilities are multiplied

Then we get

.

Basic definitions

Deviation from the average random variable

.

Average deviation from average random variable equals zero

Mean square value

. (1.7)

For average values ​​of random variables x And y performed Cauchy–Bunyakovsky–Schwartz inequality

. (1.7a)

From (1.7a) at
we find

. (1.7b)

The root mean is greater than or equal to the square of the mean.

Dispersion– standard deviation from the mean

From (1.7b) we obtain
.

Fluctuation– square root of variance

Relative fluctuation

. (1.10)

If x changes randomly over time, then the relative fluctuation shows the proportion of time during which the system is in a state with
.

Theorem:The relative fluctuation of the additive quantity characterizing the system decreases in inverse proportion to the square root of the number of independent subsystems and for a macroscopic system it is small. An example of an additive quantity (from the Latin additivus - “added”) is energy. Energy fluctuations for a macrosystem are negligible, but for a microsystem they are significant.

Proof

Additive quantity X for the system is equal to the sum of values x k For N independent subsystems

.

According to property 2 of averaging - the average of the sum is equal to the sum of the averages

– proportional to the number of subsystems.

Deviation from the average

,

dispersion

.

When squaring
and averaging the result for cross products, property 3 of averaging is taken into account - the average of the product of independent quantities is equal to the product of their averages

,
,

and it is used that the average deviation from the mean is zero

.

The squares of quantities remain non-zero. As a result, fluctuation

.

Relative fluctuation

(P.1.11)

decreases in inverse proportion to the square root of the number of independent subsystems.

Generating function. There is a random variable n, which takes discrete values ​​in the interval
. Probability of getting a result n equal to
. Defining the generating function

. (P.1.14)

If the generating function is known, then the probability distribution is obtained from (A.1.14)

, (P.1.15)

where used

Normalization condition (1.6)

requires fulfillment

. (P.1.16)

To obtain the average values ​​of a random variable, we differentiate (A.1.14)

,

and we find

. (P.1.17)

Double differentiation (A.1.14)

. (P.1.18)

Theorem on the product of generating functions. If two independent types of events occur, which are described by probability distributions with generating functions
And
, then the distribution for the sum of events is expressed by the product of their generating functions

Probability theory is a special branch of mathematics that is studied only by students of higher educational institutions. Do you like calculations and formulas? Aren't you scared by the prospects of getting acquainted with the normal distribution, ensemble entropy, mathematical expectation and dispersion of a discrete random variable? Then this subject will be very interesting to you. Let's take a look at a few of the most important basic concepts this branch of science.

Let's remember the basics

Even if you remember the most simple concepts theory of probability, do not neglect the first paragraphs of the article. The point is that without a clear understanding of the basics, you will not be able to work with the formulas discussed below.

So, some random event occurs, some experiment. As a result of the actions we take, we can get several outcomes - some of them occur more often, others less often. The probability of an event is the ratio of the number of actually obtained outcomes of one type to the total number of possible ones. Only knowing the classic definition of this concept can you begin to study mathematical expectation and variances of continuous random variables.

Average

Back in school, during math lessons, you started working with the arithmetic mean. This concept is widely used in probability theory, and therefore cannot be ignored. The main thing for us is this moment is that we will encounter it in the formulas for the mathematical expectation and dispersion of a random variable.

We have a sequence of numbers and want to find the arithmetic mean. All that is required of us is to sum up everything available and divide by the number of elements in the sequence. Let us have numbers from 1 to 9. The sum of the elements will be equal to 45, and we will divide this value by 9. Answer: - 5.

Dispersion

Speaking scientific language, dispersion is the average square of deviations of the obtained characteristic values ​​from the arithmetic mean. It is denoted by one capital Latin letter D. What is needed to calculate it? For each element of the sequence, we calculate the difference between the existing number and the arithmetic mean and square it. There will be exactly as many values ​​as there can be outcomes for the event we are considering. Next, we sum up everything received and divide by the number of elements in the sequence. If we have five possible outcomes, then divide by five.

Dispersion also has properties that need to be remembered in order to be used when solving problems. For example, when increasing a random variable by X times, the variance increases by X squared times (i.e. X*X). It is never less than zero and does not depend on shifting values ​​up or down by equal amounts. Additionally, for independent trials, the variance of the sum is equal to the sum of the variances.

Now we definitely need to consider examples of the variance of a discrete random variable and the mathematical expectation.

Let's say we ran 21 experiments and got 7 different outcomes. We observed each of them 1, 2, 2, 3, 4, 4 and 5 times, respectively. What will the variance be equal to?

First, let's calculate the arithmetic mean: the sum of the elements, of course, is 21. Divide it by 7, getting 3. Now subtract 3 from each number in the original sequence, square each value, and add the results together. The result is 12. Now all we have to do is divide the number by the number of elements, and, it would seem, that’s all. But there's a catch! Let's discuss it.

Dependence on the number of experiments

It turns out that when calculating variance, the denominator can contain one of two numbers: either N or N-1. Here N is the number of experiments performed or the number of elements in the sequence (which is essentially the same thing). What does this depend on?

If the number of tests is measured in hundreds, then we must put N in the denominator. If in units, then N-1. Scientists decided to draw the border quite symbolically: today it passes through the number 30. If we conducted less than 30 experiments, then we will divide the amount by N-1, and if more, then by N.

Task

Let's return to our example of solving the problem of variance and mathematical expectation. We got an intermediate number 12, which needed to be divided by N or N-1. Since we conducted 21 experiments, which is less than 30, we will choose the second option. So the answer is: the variance is 12 / 2 = 2.

Expected value

Let's move on to the second concept, which we must consider in this article. The mathematical expectation is the result of adding all possible outcomes multiplied by the corresponding probabilities. It is important to understand that the obtained value, as well as the result of calculating the variance, is obtained only once for the entire problem, no matter how many outcomes are considered in it.

The formula for mathematical expectation is quite simple: we take the outcome, multiply it by its probability, add the same for the second, third result, etc. Everything related to this concept is not difficult to calculate. For example, the sum of the expected values ​​is equal to the expected value of the sum. The same is true for the work. Not every quantity in probability theory allows you to perform such simple operations. Let's take the problem and calculate the meaning of two concepts we have studied at once. Besides, we were distracted by theory - it's time to practice.

One more example

We ran 50 trials and got 10 types of outcomes - numbers from 0 to 9 - appearing in different percentages. These are, respectively: 2%, 10%, 4%, 14%, 2%,18%, 6%, 16%, 10%, 18%. Recall that to obtain probabilities, you need to divide the percentage values ​​by 100. Thus, we get 0.02; 0.1, etc. Let us present an example of solving the problem for the variance of a random variable and the mathematical expectation.

We calculate the arithmetic mean using the formula that we remember from elementary school: 50/10 = 5.

Now let’s convert the probabilities into the number of outcomes “in pieces” to make it easier to count. We get 1, 5, 2, 7, 1, 9, 3, 8, 5 and 9. From each value obtained, we subtract the arithmetic mean, after which we square each of the results obtained. See how to do this using the first element as an example: 1 - 5 = (-4). Next: (-4) * (-4) = 16. For other values, do these operations yourself. If you did everything correctly, then after adding them all up you will get 90.

Let's continue calculating the variance and expected value by dividing 90 by N. Why do we choose N rather than N-1? Correct, because the number of experiments performed exceeds 30. So: 90/10 = 9. We got the variance. If you get a different number, don't despair. Most likely, you made a simple mistake in the calculations. Double-check what you wrote, and everything will probably fall into place.

Finally, remember the formula for mathematical expectation. We will not give all the calculations, we will only write an answer that you can check with after completing all the required procedures. The expected value will be 5.48. Let us only recall how to carry out operations, using the first elements as an example: 0*0.02 + 1*0.1... and so on. As you can see, we simply multiply the outcome value by its probability.

Deviation

Another concept closely related to dispersion and mathematical expectation is standard deviation. It is designated either with Latin letters sd, or Greek lowercase "sigma". This concept shows how much on average the values ​​deviate from central feature. To find its value, you need to calculate Square root from dispersion.

If you plot normal distribution and want to see the square deviation directly on it, this can be done in several stages. Take half of the image to the left or right of the mode (central value), draw a perpendicular to the horizontal axis so that the areas of the resulting figures are equal. The size of the segment between the middle of the distribution and the resulting projection onto the horizontal axis will represent the standard deviation.

Software

As can be seen from the descriptions of the formulas and the examples presented, calculating variance and mathematical expectation is not the simplest procedure from an arithmetic point of view. In order not to waste time, it makes sense to use the program used in higher education educational institutions- it's called "R". It has functions that allow you to calculate values ​​for many concepts from statistics and probability theory.

For example, you specify a vector of values. This is done as follows: vector<-c(1,5,2…). Теперь, когда вам потребуется посчитать какие-либо значения для этого вектора, вы пишете функцию и задаете его в качестве аргумента. Для нахождения дисперсии вам нужно будет использовать функцию var. Пример её использования: var(vector). Далее вы просто нажимаете «ввод» и получаете результат.

Finally

Dispersion and mathematical expectation are without which it is difficult to calculate anything in the future. In the main course of lectures at universities, they are discussed already in the first months of studying the subject. It is precisely because of the lack of understanding of these simple concepts and the inability to calculate them that many students immediately begin to fall behind in the program and later receive bad grades at the end of the session, which deprives them of scholarships.

Practice for at least one week, half an hour a day, solving tasks similar to those presented in this article. Then, on any test in probability theory, you will be able to cope with the examples without extraneous tips and cheat sheets.

Each individual value is completely determined by its distribution function. Also, to solve practical problems, it is enough to know several numerical characteristics, thanks to which it becomes possible to present the main features of a random variable in a short form.

These quantities include primarily expected value And dispersion .

Expected value— the average value of a random variable in probability theory. Denoted as .

In the simplest way, the mathematical expectation of a random variable X(w), find how integralLebesgue in relation to the probability measure R original probability space

You can also find the mathematical expectation of a value as Lebesgue integral from X by probability distribution R X quantities X:

where is the set of all possible values X.

Mathematical expectation of functions from a random variable X found through distribution R X. For example, If X- a random variable with values ​​in and f(x)- unambiguous Borel'sfunction X , That:

If F(x)- distribution function X, then the mathematical expectation is representable integralLebesgue - Stieltjes (or Riemann - Stieltjes):

in this case integrability X In terms of ( * ) corresponds to the finiteness of the integral

In specific cases, if X has a discrete distribution with probable values x k, k=1, 2, . , and probabilities, then

If X has an absolutely continuous distribution with probability density p(x), That

in this case, the existence of a mathematical expectation is equivalent to the absolute convergence of the corresponding series or integral.

Properties of the mathematical expectation of a random variable.

  • The mathematical expectation of a constant value is equal to this value:

C- constant;

  • M=C.M[X]
  • The mathematical expectation of the sum of randomly taken values ​​is equal to the sum of their mathematical expectations:

  • The mathematical expectation of the product of independent randomly taken variables = the product of their mathematical expectations:

M=M[X]+M[Y]

If X And Y independent.

if the series converges:

Algorithm for calculating mathematical expectation.

Properties of discrete random variables: all their values ​​can be renumbered by natural numbers; assign each value a non-zero probability.

1. Multiply the pairs one by one: x i on p i.

2. Add the product of each pair x i p i.

For example, For n = 4 :

Distribution function of a discrete random variable stepwise, it increases abruptly at those points whose probabilities have a positive sign.

Example: Find the mathematical expectation using the formula.

The concept of mathematical expectation can be considered using the example of throwing a die. With each throw, the dropped points are recorded. To express them, natural values ​​in the range 1 – 6 are used.

After a certain number of throws, using simple calculations, you can find the arithmetic average of the points rolled.

Just like the occurrence of any of the values ​​in the range, this value will be random.

What if you increase the number of throws several times? With a large number of throws, the arithmetic average of the points will approach a specific number, which in probability theory is called the mathematical expectation.

So, by mathematical expectation we mean the average value of a random variable. This indicator can also be presented as a weighted sum of probable value values.

This concept has several synonyms:

  • average value;
  • average value;
  • indicator of central tendency;
  • first moment.

In other words, it is nothing more than a number around which the values ​​of a random variable are distributed.

In different spheres of human activity, approaches to understanding mathematical expectation will be somewhat different.

It can be considered as:

  • the average benefit obtained from making a decision, when such a decision is considered from the point of view of large number theory;
  • the possible amount of winning or losing (gambling theory), calculated on average for each bet. In slang, they sound like “player’s advantage” (positive for the player) or “casino advantage” (negative for the player);
  • percentage of profit received from winnings.

The expectation is not mandatory for absolutely all random variables. It is absent for those who have a discrepancy in the corresponding sum or integral.

Properties of mathematical expectation

Like any statistical parameter, the mathematical expectation has the following properties:


Basic formulas for mathematical expectation

The calculation of the mathematical expectation can be performed both for random variables characterized by both continuity (formula A) and discreteness (formula B):

  1. M(X)=∑i=1nxi⋅pi, where xi are the values ​​of the random variable, pi are the probabilities:
  2. M(X)=∫+∞−∞f(x)⋅xdx, where f(x) is the given probability density.

Examples of calculating mathematical expectation

Example A.

Is it possible to find out the average height of the dwarfs in the fairy tale about Snow White. It is known that each of the 7 dwarves had a certain height: 1.25; 0.98; 1.05; 0.71; 0.56; 0.95 and 0.81 m.

The calculation algorithm is quite simple:

  • we find the sum of all values ​​of the growth indicator (random variable):
    1,25+0,98+1,05+0,71+0,56+0,95+ 0,81 = 6,31;
  • Divide the resulting amount by the number of gnomes:
    6,31:7=0,90.

Thus, the average height of gnomes in a fairy tale is 90 cm. In other words, this is the mathematical expectation of the growth of gnomes.

Working formula - M(x)=4 0.2+6 0.3+10 0.5=6

Practical implementation of mathematical expectation

The calculation of the statistical indicator of mathematical expectation is resorted to in various areas of practical activity. First of all, we are talking about the commercial sphere. After all, Huygens’s introduction of this indicator is associated with determining the chances that can be favorable, or, on the contrary, unfavorable, for some event.

This parameter is widely used to assess risks, especially when it comes to financial investments.
Thus, in business, the calculation of mathematical expectation acts as a method for assessing risk when calculating prices.

This indicator can also be used to calculate the effectiveness of certain measures, for example, labor protection. Thanks to it, you can calculate the probability of an event occurring.

Another area of ​​application of this parameter is management. It can also be calculated during product quality control. For example, using mat. expectations, you can calculate the possible number of defective parts produced.

The mathematical expectation also turns out to be indispensable when carrying out statistical processing of the results obtained during scientific research. It allows you to calculate the probability of a desired or undesirable outcome of an experiment or study depending on the level of achievement of the goal. After all, its achievement can be associated with gain and benefit, and its failure can be associated with loss or loss.

Using mathematical expectation in Forex

The practical application of this statistical parameter is possible when conducting transactions on the foreign exchange market. With its help, you can analyze the success of trade transactions. Moreover, an increase in the expectation value indicates an increase in their success.

It is also important to remember that the mathematical expectation should not be considered as the only statistical parameter used to analyze a trader’s performance. The use of several statistical parameters along with the average value increases the accuracy of the analysis significantly.

This parameter has proven itself well in monitoring observations of trading accounts. Thanks to it, a quick assessment of the work carried out on the deposit account is carried out. In cases where the trader’s activity is successful and he avoids losses, it is not recommended to use exclusively the calculation of mathematical expectation. In these cases, risks are not taken into account, which reduces the effectiveness of the analysis.

Conducted studies of traders’ tactics indicate that:

  • The most effective tactics are those based on random entry;
  • The least effective are tactics based on structured inputs.

In achieving positive results, no less important are:

  • money management tactics;
  • exit strategies.

Using such an indicator as the mathematical expectation, you can predict what the profit or loss will be when investing 1 dollar. It is known that this indicator, calculated for all games practiced in the casino, is in favor of the establishment. This is what allows you to make money. In the case of a long series of games, the likelihood of a client losing money increases significantly.

Games played by professional players are limited to short periods of time, which increases the likelihood of winning and reduces the risk of losing. The same pattern is observed when performing investment operations.

An investor can earn a significant amount by having positive expectations and making a large number of transactions in a short period of time.

Expectation can be thought of as the difference between the percentage of profit (PW) multiplied by the average profit (AW) and the probability of loss (PL) multiplied by the average loss (AL).

As an example, we can consider the following: position – 12.5 thousand dollars, portfolio – 100 thousand dollars, deposit risk – 1%. The profitability of transactions is 40% of cases with an average profit of 20%. In case of loss, the average loss is 5%. Calculating the mathematical expectation for the transaction gives a value of $625.

It turns out that a number of practical problems can be solved using a few distribution characteristics, and knowledge of the exact distribution function of a random variable turns out to be optional. Such defining characteristics of a random variable include, for example, its mean and standard square values, as well as standard deviation.

You can find the average values ​​of random variables from experience, as well as from knowing the distribution functions of random variables. Let's look at how to find these averages in various cases.

Let a random variable take: values ​​with probability or this value falls out once

value with probability or this value drops out once from finally,

value with probability or this value falls out once from

Then the sum of the values ​​of the random variable during testing will be:

To find the average value of a random variable, i.e., the value per test, you need to divide the sum by the total number of tests:

If we have a certain average value found using formula (2.11), then, generally speaking, for different values ​​of the total number of tests, the values ​​of the average value will also be different, since the values ​​under consideration are random in nature. However, as the number increases, the average value of a given quantity will tend to a certain limit a. And the greater the number of tests, the closer determined by formula (2.11) will approach this limiting value:

The last equality is the so-called law of large numbers or Chebyshev's theorem: the average value of a random variable will tend to a constant number over a very large number of measurements.

So, the average value of a random variable is equal to the sum of the products of the random variable and the probability of its occurrence.

If a random variable changes continuously, then its average value can be found using integration:

Average values ​​have a number of important properties:

1) the average value of a constant value is equal to the constant value itself, i.e.

2) the average value of some random variable is a constant value, i.e.

3) the average value of the sum of several random variables is equal to the sum of the average values ​​of these variables, i.e.

4) the average value of the product of two mutually independent random variables is equal to the product of the average values ​​of each of them, i.e.

Extending this rule to a larger number of independent quantities, we have:

Sometimes, for one reason or another, knowledge of the average value of a random variable is insufficient. In such cases, not just the average value of a random variable is sought, but the average value of the square of this value (quadratic). In this case, similar formulas apply:

for discrete values ​​and

in the case of continuous change of a random variable.

The mean square value of a random variable is always positive and does not vanish.

Often one has to be interested not only in the average values ​​of the random variable itself, but also in the average values ​​of some functions of the random variable.

For example, given the distribution of molecules by speed, we can find the average speed. But we may also be interested in the average kinetic energy of thermal motion, which is a quadratic function of speed. In such cases, you can use the following general formulas that determine the average value of an arbitrary function of a random variable for the case of a discrete distribution

for the case of continuous distribution

To find the average values ​​of a random variable or a function of a random variable using a non-normalized distribution function, use the formulas:

Here, integration is carried out everywhere over the entire range of possible values ​​of the random variable

Deviation from the average. In a number of cases, knowledge of the mean and root mean square value of a random variable turns out to be insufficient to characterize the random variable. The distribution of a random variable around its mean value is also of interest. To do this, the deviation of a random variable from the average value is examined.

However, if we take the average deviation of a random variable from its mean value, i.e. the average of the numbers:

then we obtain, both in the case of discrete and in the case of continuous distribution, zero. Really,

Sometimes it is possible to find the average value of the modulus of deviations of a random variable from the average value, i.e. the value:

However, calculations with absolute values ​​are often difficult and sometimes impossible.

Therefore, much more often, to characterize the distribution of a random variable around its mean value, the so-called standard deviation or mean square deviation is used. The mean square deviation is otherwise called the variance of a random variable. The variance is determined by the formulas:

which are converted to one type (see problems 5, 9).

where the value represents the square of the deviation of the random variable from its mean value.

The square root of the variance of a random variable is called the standard deviation of the random variable, and for physical quantities - fluctuation:

Sometimes a relative fluctuation is introduced, determined by the formula

Thus, knowing the distribution law of a random variable, we can determine all the characteristics of a random variable that interest us: mean value, mean square, mean value of an arbitrary function of a random variable, mean square deviation or dispersion and fluctuation of a random variable.

Therefore, one of the main tasks of statistical physics is to find the laws and distribution functions of certain physical random variables and parameters in various physical systems.

Editor's Choice
The history of which begins back in 1918. Nowadays, the university is considered a leader both in the quality of education and in the number of students...

Kristina Minaeva 06.27.2013 13:24 To be honest, when I entered the university, I didn’t have a very good opinion of it. I've heard a lot...

Rate of return (IRR) is an indicator of the effectiveness of an investment project. This is the interest rate at which the net present...

My dear, now I will ask you to think carefully and answer me one question: what is more important to you - marriage or happiness? How are you...
In our country there is a specialized university for training pharmacists. It is called the Perm Pharmaceutical Academy (PGFA). Officially...
Dmitry Cheremushkin The Trader's Path: How to become a millionaire by trading on financial markets Project Manager A. Efimov Proofreader I....
1. Main issues of economics Every society, faced with the problem of limited available resources with limitless growth...
At St. Petersburg State University, a creative exam is a mandatory entrance test for admission to full-time and part-time courses in...
In special education, upbringing is considered as a purposefully organized process of pedagogical assistance in socialization,...