Formula for calculating the mathematical expectation of a discrete random variable. Population mean is

- 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 stay 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 interval.

Note : v educational literature popular abbreviations DSV and NSV

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

Distribution law of a discrete random variable

- this is 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 needs 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 decision:

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

Speaking simple language, this 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

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, some random event happens, some 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 to study 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 a 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 an 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.

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 carried out 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 obtained value, as well as the result of calculating the variance, is obtained only once for the whole problem, 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 oneself. 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 by 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 right, then after adding all you 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, on average, the values ​​deviate from the central feature. To find its value, you need to calculate the square root of the variance.

If you plot the 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 a 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 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 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 mathematical 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 , therefore

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 what possible values ​​the other quantities have assumed.

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 - the date of the event A v 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, the mathematical expectation of the binomial distribution with parameters n and p is equal to the product of np.

Example. Probability of hitting the target when firing from 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

The mathematical expectation (average value) of a random variable X, given on a discrete probability space, is the number m = M [X] = ∑x i p i, if the series converges absolutely.

Service purpose... Using the service online the mathematical expectation, variance and standard deviation are calculated(cm. example). In addition, a graph of the distribution function F (X) is plotted.

Properties of the mathematical expectation of a random variable

  1. The mathematical expectation of a constant is equal to itself: M [C] = C, C is a constant;
  2. M = C M [X]
  3. The mathematical expectation of the sum of random variables is equal to the sum of their mathematical expectations: M = M [X] + M [Y]
  4. The mathematical expectation of the product of independent random variables is equal to the product of their mathematical expectations: M = M [X] M [Y], if X and Y are independent.

Dispersion properties

  1. The variance of the constant is zero: D (c) = 0.
  2. The constant factor can be taken out of the variance sign by squaring it: D (k * X) = k 2 D (X).
  3. If the random variables X and Y are independent, then the variance of the sum is equal to the sum of variances: D (X + Y) = D (X) + D (Y).
  4. If the random variables X and Y are dependent: D (X + Y) = DX + DY + 2 (X-M [X]) (Y-M [Y])
  5. The calculation formula is valid for the variance:
    D (X) = M (X 2) - (M (X)) 2

An example. The mathematical expectations and variances of two independent random variables X and Y are known: M (x) = 8, M (Y) = 7, D (X) = 9, D (Y) = 6. Find the mathematical expectation and variance of the random variable Z = 9X-8Y + 7.
Solution. Based on the properties of the mathematical expectation: M (Z) = M (9X-8Y + 7) = 9 * M (X) - 8 * M (Y) + M (7) = 9 * 8 - 8 * 7 + 7 = 23 ...
Based on the dispersion properties: D (Z) = D (9X-8Y + 7) = D (9X) - D (8Y) + D (7) = 9 ^ 2D (X) - 8 ^ 2D (Y) + 0 = 81 * 9 - 64 * 6 = 345

Algorithm for calculating the expected value

Properties of discrete random variables: all their values ​​can be renumbered with natural numbers; assign a nonzero probability to each value.
  1. We multiply the pairs: x i by p i in turn.
  2. Add the product of each pair x i p i.
    For example, for n = 4: m = ∑x i p i = x 1 p 1 + x 2 p 2 + x 3 p 3 + x 4 p 4
Distribution function of a discrete random variable stepwise, it increases abruptly at those points, the probabilities of which are positive.

Example # 1.

x i 1 3 4 7 9
p i 0.1 0.2 0.1 0.3 0.3

We find the mathematical expectation by the formula m = ∑x i p i.
Mathematical expectation M [X].
M [x] = 1 * 0.1 + 3 * 0.2 + 4 * 0.1 + 7 * 0.3 + 9 * 0.3 = 5.9
We find the variance by the formula d = ∑x 2 i p i - M [x] 2.
Dispersion D [X].
D [X] = 1 2 * 0.1 + 3 2 * 0.2 + 4 2 * 0.1 + 7 2 * 0.3 + 9 2 * 0.3 - 5.9 2 = 7.69
Standard deviation σ (x).
σ = sqrt (D [X]) = sqrt (7.69) = 2.78

Example # 2. A discrete random variable has the following distribution series:

NS -10 -5 0 5 10
R a 0,32 2a 0,41 0,03
Find the value a, mathematical expectation and standard deviation of this random variable.

Solution. We find the value a from the relation: Σp i = 1
Σp i = a + 0.32 + 2 a + 0.41 + 0.03 = 0.76 + 3 a = 1
0.76 + 3 a = 1 or 0.24 = 3 a, whence a = 0.08

Example No. 3. Determine the distribution law of a discrete random variable, if its variance is known, and x 1 x 1 = 6; x 2 = 9; x 3 = x; x 4 = 15
p 1 = 0.3; p 2 = 0.3; p 3 = 0.1; p 4 = 0.3
d (x) = 12.96

Solution.
Here it is necessary to compose a formula for finding the variance d (x):
d (x) = x 1 2 p 1 + x 2 2 p 2 + x 3 2 p 3 + x 4 2 p 4 -m (x) 2
where the expectation m (x) = x 1 p 1 + x 2 p 2 + x 3 p 3 + x 4 p 4
For our data
m (x) = 6 * 0.3 + 9 * 0.3 + x 3 * 0.1 + 15 * 0.3 = 9 + 0.1x 3
12.96 = 6 2 0.3 + 9 2 0.3 + x 3 2 0.1 + 15 2 0.3- (9 + 0.1x 3) 2
or -9/100 (x 2 -20x + 96) = 0
Accordingly, it is necessary to find the roots of the equation, and there will be two of them.
x 3 = 8, x 3 = 12
We choose the one that satisfies the condition x 1 x 3 = 12

Distribution law of a discrete random variable
x 1 = 6; x 2 = 9; x 3 = 12; x 4 = 15
p 1 = 0.3; p 2 = 0.3; p 3 = 0.1; p 4 = 0.3

Did you like the article? Share it
Up