Arithmetic means of discrete random variables. Characteristics of a random discrete variable average value of a random variable

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.

Purpose of the service. Using the online service mathematical expectation, variance and standard deviation are calculated(see 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 value is equal to itself: M[C]=C, C – 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 a constant value is zero: D(c)=0.
  2. The constant factor can be taken out from under the dispersion 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 the variances: D(X+Y)=D(X)+D(Y).
  4. If random variables X and Y are dependent: D(X+Y)=DX+DY+2(X-M[X])(Y-M[Y])
  5. The following computational formula is valid for dispersion:
    D(X)=M(X 2)-(M(X)) 2

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 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 properties of dispersion: 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 mathematical expectation

Properties of discrete random variables: all their values ​​can be renumbered by natural numbers; Assign each value a non-zero probability.
  1. We multiply the pairs one by one: x i by p i .
  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 whose probabilities are positive.

Example No. 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 using the formula m = ∑x i p i .
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 using the formula d = ∑x 2 i p i - M[x] 2 .
Variance 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 No. 2. A discrete random variable has the following distribution series:

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

Solution. The value of a is found 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 , from where 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 you need to create 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 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, we need to find the roots of the equation, and there will be two of them.
x 3 =8, x 3 =12
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

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 the 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:

Let for a 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

Be patient and read this..

Positive expectation gaming is a vital concept for all speculators, it is a concept on which a system of faith is built, but the concept itself cannot be built on faith. Casinos don't operate on faith. The casino operates by managing its business based on pure mathematics. The casino knows that eventually the laws of roulette and craps will prevail. Therefore, the casino does not allow the game to stop. The casino does not mind waiting, but the casino does not stop and plays around the clock, because the longer you play its game of negative mathematical expectation, the more the casino organizers are confident that they will receive your money.

A trader needs to have an understanding of mathematical expectation. Depending on who has a mathematical advantage in the game, it is called either a player's advantage - positive expectation, or a gambling house advantage - negative expectation. Let's say we're playing heads-or-tails with you. Neither you nor I have the advantage of each having a 50% chance of winning. But if we take this game to a casino that takes 10% off every bet, you only win 90 cents for every dollar you lose. This advantage of the gambling house turns into a strong negative mathematical expectation for you as a player. And no system of control over capital, no strategy can overcome a game with negative expectations.

In negative expected value games there is no money management scheme (strategy) that will make you a winner.

Roulette is an interesting thing, the leader of all gambling games, let’s take it as a basis. So, casino, screams, noise, emotions and luxurious display, but we will focus on roulette. Let's calculate the mathematical expectation of playing roulette if you play only red-black (in trading, by the way, this is long or short). So, there are only 38 playing fields on the roulette wheel - 36 numbers (18 red and 18 black fields), as well as two zeros (let’s take a reelette with two zeros). Thus, the probability of winning when betting on red or black is approximately 0.45 (18/38). If the bet is successful, we double our bet, and if it fails, we lose everything we bet. Oh yes, if we get a zero, we also lose our money. Hence we have a negative mathematical expectation. This game can be called unprofitable due to the presence of two zeros among the playing fields, when they fall out, the casino takes our bet in its favor. One cell is approximately 2.6% of the roulette wheel, two cells are more than 5%, this is exactly the percentage that casino owners put in their pockets on average from each transaction, so the casino is slowly pumping money out of clients, earning money for many decades.

Of course, for a casino this game has a positive mathematical expectation; with two zeros, the casino will receive the player’s money in twenty cases out of 38. And the longer the game continues, the more profit the casino will receive.

What is the mathematical expectation of financial games? Betting on financial instruments has all the external attributes of gambling; financial games on the stock exchange scatter zero roulette into a large number of probability components - spread, exchange commissions, broker commissions, subscription fees for using the exchange terminal, fees for transferring funds to accounts, and essentially 13% taxes on future profits in the aggregate are a kind of analogues of zero roulette. This gives grounds to talk about a negative, initially unfavorable mathematical expectation for the player (trader).

I want you to understand - No money management method, no strategy, can turn a negative expectation into a positive one. This is an absolutely correct remark. There is no mathematical proof for this statement. However, this does not mean that this cannot happen. Of course, in gambling, a participant can enter a streak of winnings, coincidences and simply stop playing, as a result of which such a person will essentially be a winner. But how long will he give up the game?...

So the only time you have a chance to win in the long run is if you play with positive expected value. I think you can usually win by using the same bet multiple times and only if there is no upper absorption barrier. A gambler who starts with $100 will stop playing if his account grows to $101. This upper target ($101) is called the absorption barrier. Let's say a player always bets 1 dollar on the red color of a roulette wheel where 18 stripes are red, 18 stripes are black, 2 stripes are zero, and if there is zero, the money goes to the casino. Thus, the game is played with a small negative mathematical expectation. A player has a better chance of seeing his account go to $101 and the player stop playing than to see his account go to zero and the player having nothing to play for. If a player plays roulette over and over again, he will become a victim of negative mathematical expectation. If you play such a game only once, then the axiom of inevitable bankruptcy, of course, does not apply; if you play it once, then let’s say the power of negative checkmate. expectations will be as low as possible. The difference between negative expectation and positive expectation is the difference between the life and death of your deposit.

When you realize that the game has a negative expected value, the best bet is to not bet. remember, that There is no money management strategy that can turn a losing game into a winning one.. Let's say you still have to bet in a game with negative expectation, then the best strategy would be " maximum courage strategy » . In other words, you want to bet as little as possible (as opposed to a positive expectation game, where you should bet as often as possible, preferably not leaving the game at all). So the more times you try, the more likely it is that you will lose if you have a negative expectation. Therefore, with negative expectation, there is less opportunity to lose if the length of the game is shortened (that is, when the number of trials approaches 1). If you're playing a game where you have a 49% chance of winning $1 and a 51% chance of losing $1, then your best bet is to only give it one try. The more bets you make, the greater the likelihood that you will lose (with the probability of losing approaching 100% certainty as the game approaches infinity with negative expected value).

The organizers of the game, the casino, will not tell the trader about the mathematical expectation, “they” will tell the trader about the opportunity to win and will find various reasons for the trader to place a bet. Listening to the organizers of the game and a huge number of people around the market who receive a commission without risking their money, the trader believes that for a successful game it is important to analyze the chart, news, draw lines on the pseudoscience of technical analysis and thereby find the right moment to open positions and thereby supposedly increase the reliability of your system - strategy (if you have one) and beat the market. But the truth is that at least 97% of people trying to invent trading strategy systems are simply trying to find ideal input signal. This input signal is powerless against the initial mathematically negative expectation. In fact, traders almost always report their systems as having a reliability rate of at least 60%. But at the same time they wonder why they are not making money; in the long run, traders lose money! Understand that even a system with a high percentage of winnings with a negative mathematical expectation is a road to nowhere; the best thing a trader can do is to stop on a winning streak and not enter the market again.

Another interesting detail: let’s say you start the game with one dollar, win on the first roll and earn a dollar. On the next roll you bet the entire count ($2), but this time you lose and lose it. You lost the initial amount of 1 dollar and 1 dollar in profit. The fact is that if you use 100% of the account, you will exit the game as soon as you encounter a loss, which is an inevitable event. An important rule follows from this: if you still start the game, then play with the same bets and take the profit for yourself. Do not enter the market with large bets when the math is negative.

Short-term traders constantly say things like: I am a successful day trader. I enter and exit the market several times a day. And I make money almost every day. But in one day yesterday I lost almost a year’s worth of profit and I’m very upset about it. Such mistakes occur as a result of changing bets, falling into the leverage trap, and emotional trading. Selecting an entry, earning money for some time and losing the account in the end, this is the fate of the vast majority of traders who play but the field is negative checkmate. expectations.

How do traders deal with the market? Attempts to reverse the negative mathematical expectation are identical series of bets on identical “events”. This is a classic example of a game of chance where participants try to take advantage of streaks. The only case that leads them to lose with this approach is when there are many identical hits in a row in a series. Series, the smaller the better - are more effective than blind play, however, series do not provide a positive mathematical expectation.

You've all probably heard about Martingale, it's an improved series strategy. Here the player starts with a minimum bet, usually $1, and after each loss he doubles the bet. Theoretically, he should win sooner or later and then get back everything he lost plus one dollar. After this, he can again make the minimum bet and start over. The basic concept of the Martingale method is based on the fact that as the amount resulting from losses decreases, the possibility of compensating for losses either increases or remains the same. This is a popular type of money management for gamblers. The doubling system looks like a win-win until you realize that a long losing streak will ruin any player, no matter how rich he is. A player who started with $1 and lost 46 times must place his 47th bet of $70 trillion, which is more than the value of the entire world (approximately 50 trillion). It is clear that much sooner he will run out of money or run into restrictions on his deposit or casino. I believe that the doubling system is useless if you have a negative mathematical expectation and is too risky to use this system with your own money.

In an infinite continuation, a game with a negative mathematical expectation is hopeless. But with a limited number of episodes, there is a chance to emerge victorious. Or you need to look for a mat. a positive game where the possible profit will be greater than the possible loss per 1 bet.

Most traders die from one of two bullets: ignorance and emotions. Laymen play on a whim, getting involved in transactions that, due to negative mathematical expectation, they should have missed. If they survive, then, having learned, they begin to develop smarter systems. Then, confident in themselves, they stick their heads out of the trench - and fall under the second bullet. Out of overconfidence, they bet too much on one trade and crash out of the game after a short string of losses. Emotionality has the most direct impact on the financial result obtained by the investor - to a greater extent by the player - from financial speculation. And the more emotional a person’s behavior is, the more significant the deviation of the mathematical expectation of the financial results of his trading from reality will be. For gambling games with a negative mathematical expectation, financial results obtained under the influence of emotions are the death of a deposit.

As a rule, any games with monetary winnings, be it a lottery, bets at the racetrack and in bookmakers, slot machines, etc., are games with a negative mathematical expectation for the player. Casinos organize these games for you for a reason. The peculiarity of the average trader is that he is not able to calculate all the little things that await him in the future, and therefore the future of his game is predetermined.

I want you to understand that participation in any game with a negative mathematical expectation cannot be regarded as a source of stable income.

What to do? Everyone decides for himself, I found a mathematically positive expectation on stock options, but even there, constant changes in the rules of the game by brokers and exchanges lead to a strong decrease in the final income. The smeared roulette zero on spreads, fees, brokers and other little things severely reduces the final profit, but it is only with the use of options that you can build a checkmate+ system in this “casino of the 21st century”.

Look for a mathematically positive expectation by any means necessary!

I think so, the key to making money in the financial market is to have a system with a high positive mathematical expectation, using this system it is extremely important to use the initially established position size, work strictly according to the rules and repeatedly and for as long as possible continue the game and earn money by fighting with the antics of the organizers of this “casino”.

Average values ​​of random variables

Let's pretend that X– discrete random variable, which as a result of the experiment took on the values x 1 , x 2 ,…, x n with probabilities p 1 , p 2 ,…, p n, . Then the average value or mathematical expectation of the value X called the amount , i.e. weighted average value of X, where the weights are probabilities p i.

Example. Determine the average value of the regulation error e if, based on a large number of experiments, it is established that the probability of error p i is equal to:

e, % 0,1 0,15 0,2 0,25 0,3
p i 0,2 0,2 0,3 0,15 0,15

1. M[e] = 0.1×0.2 + 0.15×0.2 + 0.2×0.3 + 0.25×0.15 + 0.3×0.15 =

In the event that g( X) is a function X(and the probability that X = x i equal to p i), then the average value of the function is defined as

Let's pretend that X is a random variable with a continuous distribution and is characterized by the probability density j( x). Then the probability that X is between x And x+D X:

The value of X in this case approximately takes the value x. In the limit at D x® 0, we can assume that the increment D x numerically equal to differential d x.

By replacing D x=d X, we get the exact formula for calculating the average value X :

Similarly for g( X):

As a rule, it is not enough to know only the average value (mathematical expectation) of a random variable. To assess the measure of randomness of a quantity (to assess the spread of specific values X relative to mathematical expectation M[X]) the concept of dispersion of a random variable is introduced. Dispersion is the average value of the squared deviation of each specific value of X from the mathematical expectation. The greater the dispersion, the greater the randomness of the spread of the value from the mathematical expectation. If the random variable is discrete, then

For a continuous random variable, the variance can be written similarly:

The dispersion describes the spread of the value well, but there is one drawback: the dimension does not correspond to the dimension X. To get rid of this drawback, often in specific applications they consider not but a positive value, which is called standard deviation.

1.3.2.1. Properties of mathematical expectation

1. The mathematical expectation of a non-random value is equal to this value itself M[C] = C.

2. Non-random multiplier WITH can be taken as a sign of mathematical expectation M[CX] = C.M.[X].

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

4. The mathematical expectation of the product of independent random variables is equal to the product of the mathematical expectations of these variables (the condition of independence of random variables).

1.3.2.2. Dispersion properties

1. Dispersion of a non-random quantity WITH equal to zero: D[C]=0.

2. Variance of the product of a non-random multiplier WITH by a random variable is equal to the product WITH 2 for the variance of the random variable.

3. Variance of the sum of independent random variables X 1 and X 2 is equal to the sum of the variances of the terms

1.3.3. Moments of a random variable

Let X– continuous random variable. If n is a positive integer and the function x n is integrable on the interval (–¥; +¥), then the average value

n = 0, 1,…, n

called starting moment order n random variable X.

It is obvious that the zero-order moment

,

Did you like the article? Share with your friends!