Mathematical expectation x y. The mathematical expectation of a discrete random variable

Each separately taken 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 random variable in short form.

These values ​​include primarily expected value and dispersion .

Expected value- the average value of a random variable in probability theory. It is indicated as.

The most in a simple way mathematical expectation of a random variable X (w) find as integralLebesgue in relation to the probabilistic measure R original probability space

You can also find the mathematical expectation of a value as Lebesgue integral from NS by probability distribution P X magnitudes X:

where is the set of all possible values X.

The mathematical expectation of functions of a random variable X is through distribution P X. For example, if X- random variable with values ​​in and f (x)- unambiguous Borelfunction NS , then:

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

moreover, the integrability X in what sense ( * ) 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 a probability density p (x), then

while the existence mathematical expectation is equivalent to the absolute convergence of the corresponding series or integral.

The 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 quantities = the product of their mathematical expectations:

M = M [X] + M [Y]

if X and Y independent.

if the series converges:

Algorithm for calculating the mathematical expectation.

Properties of discrete random variables: all their values ​​can be renumbered natural numbers; equate each value with a nonzero probability.

1. Multiply the pairs in turn: x i on the 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, the probabilities of which have a positive sign.

Example: Find the expected value by the formula.

The distribution law completely characterizes the random variable. However, the distribution law is often unknown and one has to limit oneself to less information. Sometimes it is even more profitable to use numbers that describe a random variable in total, such numbers are called numerical characteristics random variable. The mathematical expectation is one of the important numerical characteristics.

The mathematical expectation, as will be shown below, is approximately equal to the average value of the random variable. To solve many problems, it is enough to know the mathematical expectation. For example, if it is known that the mathematical expectation of the number of points knocked out by the first shooter is greater than that of the second, then the first shooter, on average, knocks out more points than the second, and, therefore, shoots better than the second.

Definition 4.1: Mathematical expectation a discrete random variable is called the sum of the products of all its possible values ​​by their probabilities.

Let the random variable X can only take values x 1, x 2, ... x n, the probabilities of which are respectively equal p 1, p 2, ... p n. Then the expectation M (X) of a random variable X is defined by the equality

M (X) = x 1 p 1 + x 2 p 2 +… + x n p n.

If a discrete random variable X takes a countable set of possible values, then

,

moreover, the expectation exists if the series on the right-hand side of the equality converges absolutely.

Example. Find the expected number of occurrences of an event A in one trial, if the probability of an event A is equal to p.

Solution: Random value X- the number of occurrences of the event A has a Bernoulli distribution, therefore

Thus, the mathematical expectation of the number of occurrences of an event in one trial is equal to the probability of this event.

Probabilistic meaning of mathematical expectation

Let it be produced n tests in which the random variable X accepted m 1 times value x 1, m 2 times value x 2 ,…, m k times value x k, and m 1 + m 2 +… + m k = n... Then the sum of all values ​​taken X, is equal to x 1 m 1 + x 2 m 2 +… + x k m k .

The arithmetic mean of all values ​​taken by a random variable will be

Attitude m i / n- relative frequency W i meaning x i approximately equal to the probability of the occurrence of the event p i, where , so

The probabilistic meaning of the obtained result is as follows: the mathematical expectation is approximately equal to(the more accurate, the greater the number of tests) the arithmetic mean of the observed values ​​of a random variable.

Mathematical expectation properties

Property1:The mathematical expectation of a constant is equal to the most constant

Property2:The constant factor can be taken out of the sign of the mathematical expectation

Definition 4.2: Two random variables are called independent, if the distribution law of one of them does not depend on what possible values ​​the other value has taken. Otherwise random variables are dependent.

Definition 4.3: Several random variables are called mutually independent, if the distribution laws of any number of them do not depend on the possible values ​​of the remaining quantities.

Property3:The mathematical expectation of the product of two independent random variables is equal to the product of their mathematical expectations.

Corollary:The mathematical expectation of the product of several mutually independent random variables is equal to the product of their mathematical expectations.

Property4:The mathematical expectation of the sum of two random variables is equal to the sum of their mathematical expectations.

Corollary:The mathematical expectation of the sum of several random variables is equal to the sum of their mathematical expectations.

Example. We calculate the mathematical expectation of a binomial random variable X - date of the event A in n experiments.

Solution: Total number X event appearances A in these trials is the sum of the number of occurrences of the event in individual trials. We introduce the random variables X i- the number of occurrences of the event in i th test, which are Bernoulli random variables with mathematical expectation, where ... By the property of the mathematical expectation, we have

Thus, expected value binomial distribution with parameters n and p is equal to the product of np.

Example. Probability of hitting the target when firing a gun p = 0.6. Find the mathematical expectation of the total number of hits if 10 shots are fired.

Solution: The hit with each shot does not depend on the outcomes of other shots, therefore the events in question are independent and, therefore, the desired mathematical expectation

In addition to distribution laws, random variables can also be described numerical characteristics .

Mathematical expectation M (x) of a random variable is called its mean value.

The mathematical expectation of a discrete random variable is calculated by the formula

where values ​​of a random variable, p i - their probabilities.

Consider the properties of the expected value:

1. The mathematical expectation of a constant is equal to the constant itself

2. If a random variable is multiplied by some number k, then the mathematical expectation will be multiplied by the same number

M (kx) = kM (x)

3. The mathematical expectation of the sum of random variables is equal to the sum of their mathematical expectations

M (x 1 + x 2 +… + x n) = M (x 1) + M (x 2) +… + M (x n)

4.M (x 1 - x 2) = M (x 1) - M (x 2)

5. For independent random variables x 1, x 2, ... x n the mathematical expectation of the product is equal to the product of their mathematical expectations

M (x 1, x 2, ... x n) = M (x 1) M (x 2) ... M (x n)

6.M (x - M (x)) = M (x) - M (M (x)) = M (x) - M (x) = 0

Let's calculate the mathematical expectation for the random variable from Example 11.

M (x) = = .

Example 12. Let the random variables x 1, x 2 be given by the distribution laws, respectively:

x 1 Table 2

x 2 Table 3

Calculate M (x 1) and M (x 2)

M (x 1) = (- 0.1) 0.1 + (- 0.01) 0.2 + 0 0.4 + 0.01 0.2 + 0.1 0.1 = 0

M (x 2) = (- 20) 0.3 + (- 10) 0.1 + 0 0.2 + 10 0.1 + 20 0.3 = 0

The mathematical expectations of both random variables are the same - they are equal to zero. However, the nature of their distribution is different. If the values ​​of x 1 differ little from their mathematical expectation, then the values ​​of x 2 differ to a large extent from their mathematical expectation, and the probabilities of such deviations are not small. These examples show that it is impossible to determine from the average value which deviations from it take place, both upward and downward. So with the same average amount of precipitation in the two areas per year, it cannot be said that these areas are equally favorable for agricultural work. Similarly, according to the indicator of average wages, it is not possible to judge the proportion of high- and low-paid workers. Therefore, a numerical characteristic is introduced - dispersion D (x) , which characterizes the degree of deviation of a random variable from its mean value:

D (x) = M (x - M (x)) 2. (2)

Variance is the mathematical expectation of the square of the deviation of a random variable from the mathematical expectation. For a discrete random variable, the variance is calculated by the formula:

D (x) = = (3)

It follows from the definition of variance that D (x) 0.

Dispersion properties:

1. The variance of the constant is zero

2. If a random variable is multiplied by some number k, then the variance is multiplied by the square of this number

D (kx) = k 2 D (x)

3. D (x) = M (x 2) - M 2 (x)

4. For pairwise independent random variables x 1, x 2,… x n, the variance of the sum is equal to the sum of variances.

D (x 1 + x 2 +… + x n) = D (x 1) + D (x 2) +… + D (x n)

Let's calculate the variance for the random variable from Example 11.

Mathematical expectation М (x) = 1. Therefore, according to formula (3), we have:

D (x) = (0 - 1) 2 1/4 + (1 - 1) 2 1/2 + (2 - 1) 2 1/4 = 1 1/4 + 1 1/4 = 1/2

Note that it is easier to calculate the variance if we use property 3:

D (x) = M (x 2) - M 2 (x).

Let's calculate the variance for the random variables x 1, x 2 from Example 12 using this formula. The mathematical expectations of both random variables are equal to zero.

D (x 1) = 0.01 0.1 + 0.0001 0.2 + 0.0001 0.2 + 0.01 0.1 = 0.001 + 0.00002 + 0.00002 + 0.001 = 0.00204

D (x 2) = (-20) 2 0.3 + (-10) 2 0.1 + 10 2 0.1 + 20 2 0.3 = 240 +20 = 260

The closer the variance value is to zero, the smaller the scatter of the random variable relative to the mean value.

The quantity is called standard deviation. Random variable mode x discrete type Md is called such a value of a random variable, which corresponds to the highest probability.

Random variable mode x continuous type Md, is called a real number, defined as the maximum point of the probability distribution density f (x).

The median of a random variable x continuous type Mn is called a real number satisfying the equation

Probability theory is a special branch of mathematics that is studied only by university students. Do you like calculations and formulas? Are you not afraid of the prospect of acquaintance with the normal distribution, ensemble entropy, mathematical expectation and variance of a discrete random variable? Then this subject will be very interesting to you. Let's get acquainted with some of the most important basic concepts in this branch of science.

Let's remember the basics

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

So there is some random event, a kind of experiment. As a result of the actions performed, we can get several outcomes - some of them are more common, others are less common. The probability of an event is the ratio of the number of actually obtained outcomes of one type to the total number of possible outcomes. Only knowing the classical definition of this concept, you can start studying the mathematical expectation and variance of continuous random variables.

Average

Back in school, in math lessons, you started working with the arithmetic mean. This concept is widely used in the theory of probability, and therefore it cannot be ignored. The main thing for us at the moment is that we will encounter it in the formulas for the mathematical expectation and variance 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 everything available and divide by the number of elements in the sequence. Suppose we have numbers from 1 to 9. The sum of the elements will be 45, and we will divide this value by 9. Answer: - 5.

Dispersion

Scientifically speaking, variance is the mean square of the deviations of the obtained values ​​of a feature from the arithmetic mean. One is denoted by a capital Latin letter D. What do you need to calculate it? For each element of the sequence, calculate the difference between the available 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 summarize all received and divide by the number of elements in the sequence. If we have five possible outcomes, then we divide by five.

Variance also has properties that need to be remembered in order to apply when solving problems. For example, when the random variable is increased by X times, the variance is increased by X times squared (i.e., X * X). It is never less than zero and does not depend on the shift of values ​​by equal value up or down. In addition, for independent tests, the variance of the sum is equal to the sum of the variances.

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

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

First, let's calculate the arithmetic mean: the sum of the elements, of course, is equal to 21. Divide it by 7, getting 3. Now, from each number in the original sequence, subtract 3, square each value, and add the results together. It will turn out 12. Now we just need to divide the number by the number of elements, and, it would seem, that's it. But there is a catch! Let's discuss it.

Dependence on the number of experiments

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

If the number of tests is measured in hundreds, then we should put in the denominator N. If in units, then N-1. The scientists decided to draw the border quite symbolically: today it runs at the number 30. If we conducted less than 30 experiments, then we will divide the sum by N-1, and if more, then by N.

A task

Let's go back to our example of solving the variance and expectation problem. 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 definitely consider in this article. The expected value is the sum of all possible outcomes multiplied by the corresponding probabilities. It is important to understand that the resulting value, as well as the result of calculating the variance, is obtained only once for the whole task no matter how many outcomes are considered in it.

The formula for the mathematical expectation is quite simple: we take the outcome, multiply by its probability, add the same for the second, third result, etc. Everything related to this concept is easy to calculate. For example, the sum of expectation is equal to the expectation of the sum. The same is true for a work. Not every value in the theory of probability allows such simple operations to be performed with itself. Let's take a problem and calculate the meaning of the two concepts we studied at once. In addition, we were distracted by theory - it was time to practice.

One more example

We ran 50 trials and got 10 kinds of outcomes - numbers from 0 to 9 - occurring 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 values ​​in percent 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 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. Subtract the arithmetic mean from each obtained value, 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 the rest of the values, do these operations yourself. If you did everything correctly, then after adding all you will get 90.

Let's continue calculating the variance and mean by dividing 90 by N. Why do we choose N and not N-1? That's right, 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 common mistake in the calculations. Recheck what you have written, and for sure everything will fall into place.

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

Deviation

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

If you plot normal distribution and want to see the squared deviation directly on it, this can be done in several steps. 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 shapes are equal. The value 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, the calculation of 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 are defining a vector of values. This is done as follows: vector<-c(1,5,2…). Теперь, когда вам потребуется посчитать какие-либо значения для этого вектора, вы пишете функцию и задаете его в качестве аргумента. Для нахождения дисперсии вам нужно будет использовать функцию var. Пример её использования: var(vector). Далее вы просто нажимаете «ввод» и получаете результат.

Finally

Dispersion and mathematical expectation - without which it is difficult to calculate anything in the future. In the main course of lectures in universities, they are considered already in the first months of studying the subject. It is because of the lack of understanding of these simple concepts and the inability to calculate them that many students immediately begin to lag behind in the program and later receive poor grades based on the results of the session, which deprives them of their 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 on the theory of probability, you will cope with examples without extraneous tips and cheat sheets.

- the number of boys among 10 newborns.

It is quite clear that this number is not known in advance, and in the next ten children born there may be:

Or boys - one and only one of the listed options.

And, in order to keep in shape, a little physical education:

- long jump range (in some units).

Even the master of sports cannot predict her :)

However, your hypothesis?

2) Continuous random variable - takes all numerical values ​​from some finite or infinite range.

Note : in the educational literature, the abbreviations DSV and NSV are popular

First, let's analyze a discrete random variable, then - continuous.

Distribution law of a discrete random variable

- This correspondence between the possible values ​​of this quantity and their probabilities. Most often, the law is written in a table:

Quite often the term row distribution but it sounds ambiguous in some situations, and so I will stick to the "law."

And now very important point: since the random variable necessarily will accept one of the meanings, then the corresponding events form full group and the sum of the probabilities of their occurrence is equal to one:

or, if written collapsed:

So, for example, the law of distribution of probabilities of points dropped on a die is as follows:

No comments.

You might be under the impression that a discrete random variable can only take on "good" integer values. Let's dispel the illusion - they can be anything:

Example 1

Some game has the following winning distribution law:

... you've probably dreamed of such tasks for a long time :) I'll tell you a secret - me too. Especially after finishing work on field theory.

Solution: since a random variable can take only one of three values, the corresponding events form full group, which means that the sum of their probabilities is equal to one:

We will expose the "partisan":

- thus, the probability of winning conventional units is 0.4.

Control: what was required to be convinced.

Answer:

It is not uncommon when the distribution law is required to be drawn up independently. To do this, use classical definition of probability, multiplication / addition theorems for event probabilities and other chips tervera:

Example 2

The box contains 50 lottery tickets, among which 12 are winning, with 2 of them winning 1,000 rubles each, and the rest - 100 rubles each. Draw up the distribution law of a random variable - the size of the payoff, if one ticket is taken at random from the box.

Solution: as you noticed, it is customary to arrange the values ​​of a random variable in ascending order... Therefore, we start with the smallest winnings, namely rubles.

There are 50 - 12 = 38 such tickets in total, and classical definition:
- the probability that a ticket drawn at random turns out to be a losing one.

The rest of the cases are simple. The probability of winning rubles is:

Check: - and this is a particularly pleasant moment of such tasks!

Answer: the required distribution of the payoff:

The next task for independent solution:

Example 3

The probability that the shooter will hit the target is. Draw up the distribution law of a random variable - the number of hits after 2 shots.

... I knew that you missed him :) Remember multiplication and addition theorems... Solution and answer at the end of the lesson.

The distribution law completely describes a random variable, but in practice it is useful (and sometimes more useful) to know only some of it. numerical characteristics .

The mathematical expectation of a discrete random variable

In simple terms, it is average expected value with multiple repetition of tests. Let a random variable take values ​​with probabilities respectively. Then the mathematical expectation of a given random variable is sum of products of all its values ​​to the corresponding probabilities:

or collapsed:

Let's calculate, for example, the mathematical expectation of a random variable - the number of points dropped on a dice:

Now let's remember our hypothetical game:

The question arises: is it profitable to play this game at all? … Who has what impressions? So after all "offhand" and you will not say! But this question can be easily answered by calculating the expected value, in fact - weighted average by the probabilities of winning:

Thus, the mathematical expectation of this game losing.

Don't trust the impressions - trust the numbers!

Yes, here you can win 10 or even 20-30 times in a row, but in the long run we will inevitably ruin. And I would not advise you to play such games :) Well, maybe just for fun.

From all of the above, it follows that the mathematical expectation is no longer a RANDOM value.

Creative assignment for self-study:

Example 4

Mr. X plays European roulette according to the following system: constantly bets 100 rubles on "red". Draw up the law of distribution of a random variable - its gain. Calculate the mathematical expectation of a win and round it to the nearest kopeck. How many average the player loses with every hundred bet?

reference : European roulette contains 18 red, 18 black and 1 green sectors ("zero"). In the event of a "red" hit, the player is paid a doubled bet, otherwise it goes to the casino's income

There are many other roulette systems for which you can create your own probability tables. But this is the case when we do not need any distribution laws and tables, for it has been established for certain that the mathematical expectation of the player will be exactly the same. From system to system only changes

Share with your friends or save for yourself:

Loading...