Waiting schedule. Expectation of a continuous random variable

The mathematical expectation is the average value of a random variable.

The mathematical expectation of a discrete random variable is the sum of the products of all its possible values ​​and their probabilities:

Example.

X -4 6 10
р 0.2 0.3 0.5


Solution: The mathematical expectation is equal to the sum of the products of all possible values ​​of X and their probabilities:

M (X) = 4*0.2 + 6*0.3 +10*0.5 = 6.


To calculate the mathematical expectation, it is convenient to carry out calculations in Excel (especially when there is a lot of data), we suggest using a ready-made template ().

An example for solving it yourself (you can use a calculator).
Find the mathematical expectation of a discrete random variable X specified by the distribution law:

X 0.21 0.54 0.61
р 0.1 0.5 0.4

The mathematical expectation has the following properties.

Property 1. The mathematical expectation of a constant value is equal to the constant itself: M(C)=C.

Property 2. The constant factor can be taken out as a sign of the mathematical expectation: M(CX)=CM(X).

Property 3. The mathematical expectation of the product of mutually independent random variables is equal to the product of the mathematical expectations of the factors: M (X1X2 ...Xn) = M (X1) M (X2)*. ..*M (Xn)

Property 4. The mathematical expectation of the sum of random variables is equal to the sum of the mathematical expectations of the terms: M(Xg + X2+...+Xn) = M(Xg)+M(X2)+...+M(Xn).

Problem 189. Find the mathematical expectation of the random variable Z if the mathematical expectations of X and Y are known: Z = X+2Y, M(X) = 5, M(Y) = 3;

Solution: Using the properties of the mathematical expectation (the mathematical expectation of the sum is equal to the sum of the mathematical expectations of the terms; the constant factor can be taken out of the sign of the mathematical expectation), we obtain M(Z)=M(X + 2Y)=M(X) + M(2Y)=M (X) + 2M(Y)= 5 + 2*3 = 11.

190. Using the properties of mathematical expectation, prove that: a) M(X - Y) = M(X) - M (Y); b) the mathematical expectation of the deviation X-M(X) is equal to zero.

191. A discrete random variable X takes three possible values: x1= 4 With probability p1 = 0.5; xЗ = 6 With probability P2 = 0.3 and x3 with probability p3. Find: x3 and p3, knowing that M(X)=8.

192. A list of possible values ​​of a discrete random variable X is given: x1 = -1, x2 = 0, x3= 1; the mathematical expectations of this value and its square are also known: M(X) = 0.1, M(X^2) = 0 ,9. Find the probabilities p1, p2, p3 corresponding to the possible values ​​of xi

194. A batch of 10 parts contains three non-standard parts. Two parts were selected at random. Find the mathematical expectation of a discrete random variable X - the number of non-standard parts among two selected ones.

196. Find the mathematical expectation of a discrete random variable X-number of such throws of five dice, in each of which one point will appear on two dice, if the total number of throws is twenty.



The mathematical expectation of a binomial distribution is equal to the number of trials multiplied by the probability of an event occurring in one trial:

That is, if sl. the quantity has a distribution law, then

called its mathematical expectation. If sl. the quantity has an infinite number of values, then the mathematical expectation is determined by the sum of the infinite series , provided that this series is absolutely convergent (otherwise they say that the mathematical expectation does not exist) .

For continuous sl. value specified by the probability density function f(x), the mathematical expectation is defined as an integral

provided that this integral exists (if the integral diverges, then they say that the mathematical expectation does not exist).

Example 1. Let us determine the mathematical expectation of a random variable distributed over Poisson's law. A-priory

or let's denote

,

So the parameter , the defining law of distribution of a Poisson random variable is equal to the average value of this variable.

Example 2. For a random variable having an exponential distribution law, the mathematical expectation is equal to

():

(take the limits in the integral, taking into account the fact that f (x) is nonzero only for positive x).

Example 3. Random variable distributed according to the distribution law Cauchy, has no mean value. Really

Properties of mathematical expectation.

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

The constant C takes this value with probability one and, by definition, M(C)=C×1=C

Property 2. The mathematical expectation of an algebraic sum of random variables is equal to the algebraic sum of their mathematical expectations.

We limit ourselves to proving this property only for the sum of two discrete random variables, i.e. let's prove that

Under the sum of two discrete words. The quantities are understood as follows. A quantity that takes values ​​with probabilities

A-priory

where is the probability of the event calculated under the condition that . The right side of the last equality lists all cases of occurrence of the event, therefore it is equal to the total probability of occurrence of the event, i.e. . Likewise . Finally we have

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

U
Q
X
R

We present proofs of this property only for discrete quantities. For continuous random variables it is proved in a similar way.


Let X and Y be independent and have distribution laws

The product of these random variables will be a random variable that takes values ​​with equal probabilities, due to the independence of the random variables, . Then

Consequence. The constant factor can be taken out as a sign of mathematical expectation. So the century constant C does not depend on what value the word takes. value X, then by property 3. we have

M(CX)=M(C)×M(X)=C×M(X)

Example. If a and b are constants, then M(ax+b)=aM(x)+b.

Mathematical expectation of the number of occurrences of an event in a design of independent trials.

Let n independent experiments be carried out, the probability of the occurrence of an event in each of which is equal to P. The number of occurrences of an event in these n experiments is a random variable X distributed according to the binomial law. However, directly calculating its average value is cumbersome. To simplify, we will use the expansion, which we will use more than once in the future: The number of occurrences of an event in n experiments consists of the number of occurrences of the event in individual experiments, i.e.

where has a distribution law (takes the value 1 if the event occurred in a given experiment, and the value 0 if the event did not appear in a given experiment).

R 1st R

That's why

those. the average number of occurrences of an event in n independent experiments is equal to the product of the number of experiments and the probability of the occurrence of an event in one experiment.

For example, if the probability of hitting the target with one shot is 0.1, then the average number of hits in 20 shots is 20x0.1=2.

Task 1. The probability of germination of wheat seeds is 0.9. What is the probability that out of four seeds sown, at least three will sprout?

Solution. Let the event A– from 4 seeds at least 3 seeds will sprout; event IN– from 4 seeds 3 seeds will sprout; event WITH– from 4 seeds 4 seeds will sprout. By the theorem of addition of probabilities

Probabilities
And
we determine by Bernoulli's formula, applied in the following case. Let the series be held P independent tests, during each of which the probability of the event occurring is constant and equal to R, and the probability of this event not occurring is equal to
. Then the probability that the event A V P tests will appear exactly times, calculated using Bernoulli's formula

,

Where
– number of combinations of P elements by . Then

Required probability

Task 2. The probability of germination of wheat seeds is 0.9. Find the probability that out of 400 seeds sown, 350 seeds will sprout.

Solution. Calculate the required probability
using Bernoulli's formula is difficult due to the cumbersomeness of the calculations. Therefore, we apply an approximate formula expressing Laplace’s local theorem:

,

Where
And
.

From the problem conditions. Then

.

From table 1 of the appendices we find. The required probability is equal to

Task 3. Wheat seeds contain 0.02% weeds. What is the probability that if 10,000 seeds are randomly selected, 6 weed seeds will be found?

Solution. Application of Laplace's local theorem due to low probability
leads to a significant deviation of the probability from the exact value
. Therefore, at small values R to calculate
apply the asymptotic Poisson formula

, Where .

This formula is used when
, and the less R and more P, the more accurate the result.

According to the conditions of the problem
;
. Then

Task 4. The germination rate of wheat seeds is 90%. Find the probability that out of 500 seeds sown, from 400 to 440 seeds will sprout.

Solution. If the probability of an event occurring A in each P tests is constant and equal R, then the probability
that the event A in such tests there will be no less once and no more times determined by Laplace’s integral theorem by the following formula:

, Where

,
.

Function
called the Laplace function. The appendices (Table 2) give the values ​​of this function for
. At
function
. For negative values X due to the oddness of the Laplace function
. Using the Laplace function, we have:

According to the conditions of the task. Using the above formulas we find
And :

Task 5. The law of distribution of a discrete random variable is given X:

    1. Find: 1) mathematical expectation; 2) dispersion; 3) standard deviation.

Solution. 1) If the distribution law of a discrete random variable is given by the table

    1. Where the first line contains the values ​​of the random variable x, and the second line contains the probabilities of these values, then the mathematical expectation is calculated using the formula

2) Variance
discrete random variable X is called the mathematical expectation of the squared deviation of a random variable from its mathematical expectation, i.e.

This value characterizes the average expected value of the squared deviation X from
. From the last formula we have

Variance
can be found in another way, based on its following property: dispersion
equal to the difference between the mathematical expectation of the square of the random variable X and the square of its mathematical expectation
, that is

To calculate
let's draw up the following law of distribution of the quantity
:

3) To characterize the scattering of possible values ​​of a random variable around its average value, the standard deviation is introduced
random variable X, equal to the square root of the variance
, that is

.

From this formula we have:

Task 6. Continuous random variable X given by the cumulative distribution function

Find: 1) differential distribution function
; 2) mathematical expectation
; 3) variance
.

Solution. 1) Differential distribution function
continuous random variable X is called the derivative of the cumulative distribution function
, that is

.

The sought differential function has the following form:

2) If a continuous random variable X given by the function
, then its mathematical expectation is determined by the formula

Since the function
at
and at
is equal to zero, then from the last formula we have

.

3) Variance
we will determine by the formula

Task 7. The length of the part is a normally distributed random variable with a mathematical expectation of 40 mm and a standard deviation of 3 mm. Find: 1) the probability that the length of an arbitrarily taken part will be more than 34 mm and less than 43 mm; 2) the probability that the length of the part will deviate from its mathematical expectation by no more than 1.5 mm.

Solution. 1) Let X– length of the part. If the random variable X given by a differential function
, then the probability that X will take values ​​belonging to the segment
, is determined by the formula

.

Probability of strict inequalities
is determined by the same formula. If the random variable X is distributed according to the normal law, then

, (1)

Where
– Laplace function,
.

In the problem. Then

2) According to the conditions of the problem, where
. Substituting into (1), we have

. (2)

From formula (2) we have.

Random variables, in addition to distribution laws, 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 using the formula

Where random variable values, p i - their probabilities.

Let's consider the properties of mathematical expectation:

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

2. If a random variable is multiplied by a certain 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 specified accordingly by the distribution laws:

x 1 Table 2

x 2 Table 3

Let's 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 occur, both smaller and larger. So, with the same average annual precipitation in two areas, it cannot be said that these areas are equally favorable for agricultural work. Similarly, based on the average salary indicator, it is not possible to judge the share 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 average value:

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

Dispersion is the mathematical expectation of the squared deviation of a random variable from the mathematical expectation. For a discrete random variable, the variance is calculated using the formula:

D(x)= = (3)

From the definition of dispersion it follows that D (x) 0.

Dispersion properties:

1. The variance of the constant is zero

2. If a random variable is multiplied by a certain number k, then the variance will be 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 the 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 M (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 variance if you use property 3:

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

Let's calculate the variances for the random variables x 1 , x 2 from Example 12 using this formula. The mathematical expectations of both random variables are 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 spread of the random variable relative to the mean value.

The quantity is called standard deviation. Random variable mode x discrete type Md The value of a random variable that has the highest probability is called.

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

Median of a random variable x continuous type Mn is a real number that satisfies the equation

The next most important property of a random variable after the mathematical expectation is its dispersion, defined as the mean square deviation from the mean:

If denoted by then, the variance VX will be the expected value. This is a characteristic of the “scatter” of the distribution of X.

As a simple example of calculating variance, let's say we've just been given an offer we can't refuse: someone gave us two certificates for the same lottery. The lottery organizers sell 100 tickets every week, participating in a separate draw. The drawing selects one of these tickets through a uniform random process - each ticket has an equal chance of being selected - and the owner of that lucky ticket receives one hundred million dollars. The remaining 99 lottery ticket holders win nothing.

We can use the gift in two ways: buy either two tickets in one lottery, or one each to participate in two different lotteries. Which strategy is better? Let's try to analyze it. To do this, let us denote by random variables representing the size of our winnings on the first and second tickets. The expected value in millions is

and the same is true for Expected values ​​are additive, so our average total payoff will be

regardless of the adopted strategy.

However, the two strategies appear different. Let's go beyond the expected values ​​and study the full probability distribution

If we buy two tickets in one lottery, then our chances of winning nothing will be 98% and 2% - the chances of winning 100 million. If we buy tickets for different draws, the numbers will be as follows: 98.01% - the chance of not winning anything, which is slightly higher than before; 0.01% - chance to win 200 million, also slightly more than before; and the chance of winning 100 million is now 1.98%. Thus, in the second case, the magnitude distribution is somewhat more scattered; the middle value, $100 million, is slightly less likely, while the extremes are more likely.

It is this concept of the spread of a random variable that dispersion is intended to reflect. We measure the spread through the square of the deviation of a random variable from its mathematical expectation. Thus, in case 1 the variance will be

in case 2 the variance is

As we expected, the latter value is slightly larger, since the distribution in case 2 is somewhat more spread out.

When we work with variances, everything is squared, so the result can be quite large numbers. (The multiplier is one trillion, that should be impressive

even players accustomed to large bets.) To convert values ​​into a more meaningful original scale, the square root of the variance is often taken. The resulting number is called the standard deviation and is usually denoted by the Greek letter a:

The standard deviations of magnitude for our two lottery strategies are . In some ways, the second option is about $71,247 riskier.

How does variance help in choosing a strategy? It's not clear. A strategy with higher variance is riskier; but what is better for our wallet - risk or safe play? Let us have the opportunity to buy not two tickets, but all one hundred. Then we could guarantee winning one lottery (and the variance would be zero); or you could play in a hundred different draws, getting nothing with a probability, but having a non-zero chance of winning up to dollars. Choosing one of these alternatives is beyond the scope of this book; all we can do here is explain how to do the calculations.

In fact, there is a simpler way to calculate variance than directly using definition (8.13). (There is every reason to suspect some kind of hidden mathematics here; otherwise, why would the variance in the lottery examples turn out to be an integer multiple? We have

since - constant; hence,

“Variance is the mean of the square minus the square of the mean.”

For example, in the lottery problem, the average value turns out to be or Subtraction (the square of the average) gives results that we have already obtained earlier in a more difficult way.

There is, however, an even simpler formula that is applicable when we calculate for independent X and Y. We have

since, as we know, for independent random variables Therefore,

“The variance of the sum of independent random variables equals the sum of their variances.” So, for example, the variance of the amount that can be won with one lottery ticket is equal to

Therefore, the dispersion of the total winnings for two lottery tickets in two different (independent) lotteries will be The corresponding dispersion value for independent lottery tickets will be

The variance of the sum of points rolled on two dice can be obtained using the same formula, since it is the sum of two independent random variables. We have

for the correct cube; therefore, in the case of a displaced center of mass

therefore, if both cubes have a displaced center of mass. Note that in the latter case the variance is larger, although it takes a mean value of 7 more often than in the case of regular dice. If our goal is to roll more lucky sevens, then variance is not the best indicator of success.

Okay, we've established how to calculate variance. But we have not yet given an answer to the question of why it is necessary to calculate the variance. Everyone does it, but why? The main reason is Chebyshev's inequality, which establishes an important property of dispersion:

(This inequality differs from the Chebyshev inequalities for sums that we encountered in Chapter 2.) At a qualitative level, (8.17) states that the random variable X rarely takes values ​​far from its mean if its variance VX is small. Proof

management is extraordinarily simple. Really,

division by completes the proof.

If we denote the mathematical expectation by a and the standard deviation by a and replace in (8.17) by then the condition turns into therefore, we obtain from (8.17)

Thus, X will lie within - times the standard deviation of its mean except in cases where the probability does not exceed The random variable will lie within 2a of at least 75% of the trials; ranging from to - at least for 99%. These are cases of Chebyshev's inequality.

If you throw a couple of dice once, then the total sum of points in all throws will almost always be close to. The reason for this is the following: the variance of independent throws will be The variance in means the standard deviation of everything

Therefore, from Chebyshev’s inequality we obtain that the sum of points will lie between

at least for 99% of all rolls of correct dice. For example, the result of a million tosses with a probability of more than 99% will be between 6.976 million and 7.024 million.

In general, let X be any random variable on the probability space Π having a finite mathematical expectation and a finite standard deviation a. Then we can introduce into consideration the probability space Pn, the elementary events of which are -sequences where each , and the probability is defined as

If we now define random variables by the formula

then the value

will be the sum of independent random variables, which corresponds to the process of summing independent realizations of the value X on P. The mathematical expectation will be equal to and the standard deviation - ; therefore, the average value of realizations,

will range from to in at least 99% of the time period. In other words, if you choose a large enough one, the arithmetic mean of independent tests will almost always be very close to the expected value (In probability theory textbooks, an even stronger theorem is proven, called the strong law of large numbers; but for us the simple corollary of Chebyshev’s inequality, which we just taken out.)

Sometimes we do not know the characteristics of the probability space, but we need to estimate the mathematical expectation of a random variable X using repeated observations of its value. (For example, we might want the average January noon temperature in San Francisco; or we might want to know the life expectancy on which insurance agents should base their calculations.) If we have independent empirical observations at our disposal, we can assume that the true mathematical expectation is approximately equal

You can also estimate the variance using the formula

Looking at this formula, you might think that there is a typographical error in it; It would seem that it should be there as in (8.19), since the true value of the dispersion is determined in (8.15) through the expected values. However, replacing here with allows us to obtain a better estimate, since it follows from definition (8.20) that

Here's the proof:

(In this calculation we rely on the independence of observations when we replace with )

In practice, to evaluate the results of an experiment with a random variable X, one usually calculates the empirical mean and the empirical standard deviation and then writes the answer in the form Here, for example, are the results of throwing a pair of dice, presumably correct.