Dependence and independence of random variables. Independent random variables

from which we conclude that m1, m2 are the mathematical expectations of the components X, Y of a two-dimensional normal random variable (X, Y), σ1, σ2 are the standard deviations of their components.

The graph of a two-dimensional normal density in space is a hill-shaped surface located above the entire xOy plane, asymptotically approaching it when removed to infinity, symmetrical about the vertical axis passing through the center (m1, m2), and with the vertex at this point. Any section of the surface of a normal density graph by a plane perpendicular to xOy is a Gaussian curve.

6.5 Dependence and independence of two random variables

Definition. Random variables X, Y are called independent if events X are independent< x и Y < y для любых вещественных x, y. В противном случае случайные величины (X, Y) называются зависимыми.

Theorem. General necessary and sufficient condition for the independence of two random variables:

FXY (x, y) = FX (x) FY (y)

for any real x and y.

This condition is a differently written necessary and sufficient condition for the independence of two events: P (AB) = P (A)P (B) for the case of events A = (X< x), B = (Y < y).

Theorem. A necessary and sufficient condition for the independence of two continuous random variables:

fXY (x, y) = fX (x) fY (y), x, y.

Theorem. Necessary and sufficient condition for the independence of two discrete random variables:

p ik= p i · p k

for any i = 1, 2, . . . , m; k = 1, 2, . . . , n.

Comment. The equality of the correlation coefficient ρ to zero is a necessary and sufficient condition for the independence of the components X, Y of a two-dimensional normal random variable (X, Y).

6.6 Conditional laws of distribution. Numerical characteristics of a two-dimensional random variable. Relationship between random variables

6.6.1 Conditional laws of distribution

Definition. Conditional distribution law one of the one-dimensional components of a two-dimensional random variable (X, Y) is called its distribution law, calculated under the condition that the other component took a certain value (or fell into some interval).

In the case of discrete random variables, the formulas for finding conditional probabilities have the form:

pj(xi) =

P [(X = xi )(Y = yj )]

Pi(yj) =

P [(X = xi )(Y = yj )]

P(Y=yj)

P (X = xi)

In the case of continuous random variables, these formulas take the form

fY (x) =

fXY(x, y)

FX(y)=

fXY(x, y)

fY(y)

fX(x)

those. the conditional probability density of one of the one-dimensional components of a two-dimensional random variable is equal to the ratio of its joint density to the probability density of its other component.

These ratios, written in the form

fXY (x, y) = fX (x)fX (y) = fX (y)fY (x),

are called the theorem (rule) for multiplying distribution densities.

Using formulas for obtaining one-dimensional components of a continuous random variable, we write formulas for conditional components:

fY (x) =

fXY(x, y)

FX(y)=

fXY(x, y)

fXY (x, y)dx

fXY (x, y)dy

6.6.2 Numerical characteristics

Consider the random variable ϕ(X, Y), which is a function of the components X, Y of the two-dimensional random variable (X, Y). The general formulas are valid:

for a discrete case.

Here fXY (x, y) is the probability density of the random variable (X, Y), and pik = P (X = xi, Y = yk) (i = 1, . . . , m; k = 1, . . . , n) - law of distribution of a discrete two-dimensional random variable

Using these formulas, you can write formulas for the mathematical expectation and dispersion of one-dimensional components of a discrete random variable.

The formulas for finding the mathematical expectation are:

M(X) = Z Z

xfXY (x, y)dxdy;

M(Y) = yfXY (x, y)dxdy

for continuous random variables;

M(X) = xi pik ;

M(Y) = yk pik

for a discrete case.

Formulas for calculating the variance of one-dimensional components of a two-dimensional random variable have the form:

D(Y) = M[(Y − M(Y))2 ] = (yk − M(Y))pik

for a discrete case.

6.6.3 Correlation moment and correlation coefficient

The functional characteristics of the dependence of two random variables were formulated above. Let us now consider the numerical characteristics of the relationship between random variables.

Definition. Correlation moment K XY, otherwise - covariance , two random variables X, Y is called the mathematical expectation of the product of deviations of these random variables from their mathematical expectations:

KXY = M[(X − mX )(Y − mY )].

Obviously, KXY = KY X.

Formulas for calculating KXY are:

KXY =Z Z

(x − mX )(y − mY )fXY (x, y)dxdyXY = ρY X .

The correlation moment and correlation coefficient are numerical characteristics of a two-dimensional random variable, and ρXY is a dimensionless characteristic. From their properties it follows that they characterize the relationship between random variables.

Properties of the correlation moment and correlation coefficient. Property 1.

KXY = M − mX mY .

This formula is convenient to use to calculate covariance.

Property 2.

−1 ≤ ρ ≤ 1.

This property means that the correlation coefficient is a normalized characteristic. Property 3. For independent random variables X, Y their correlation moment,

and, consequently, the correlation coefficient is equal to zero.

Comment. The converse proposition is generally incorrect, i.e. there are independent random variables (X, Y) for which KXY = 0.

Definition. Two random variables X, Y are called uncorrelated, if their correlation moment is zero. If KXY 6= 0, then they say that X, Y correlate with each other.

Comment. If KXY 6= 0, then the random variables X, Y are dependent.

Property 4. For random variables X, Y = aX + b, related by a linear dependence, the correlation coefficient is equal to 1 if a > 0, and −1 if a< 0.

Property 5. If |ρXY | = 1, then the random variables X, Y are related by a linear dependence with probability one.

Comment. The quantity M = α 1.1 is called the second mixed initial moment two-dimensional random variable (X, Y), and its correlation moment K XY-

second mixed central moment.

The concepts of dependence and independence of random events. Conditional probability. Formulas for adding and multiplying probabilities for dependent and independent random events. Total probability formula and Bayes formula.

Probability addition theorems

Let us find the probability of the sum of events A and B (assuming their compatibility or incompatibility).

Theorem 2.1. The probability of the sum of a finite number of incompatible events is equal to the sum of their probabilities:

P\(A+B+\ldots+N\)=P\(A\)+P\(B\)+\ldots+P\(N\).

Example 1. The probability that a store will sell a pair of size 44 men's shoes is 0.12; 45th - 0.04; 46th and above - 0.01. Find the probability that a pair of men's shoes of at least size 44 will be sold.

Solution. The required event D will occur if a pair of shoes of size 44 (event A) or size 45 (event B) or at least size 46 (event C) is sold, i.e. event D is the sum of events A, B ,C. Events A, B and C are incompatible. Therefore, according to the sum of probabilities theorem, we obtain

P\(D\)=P\(A+B+C\)=P\(A\)+P\(B\)+P\(C\)=0,\!12+0,\!04 +0,\!01 =0,\!17.

Example 2. Under the conditions of Example 1, find the probability that the next pair of shoes smaller than size 44 will be sold.

Solution. The events “the next pair of shoes smaller than size 44 will be sold” and “a pair of shoes no smaller than size 44 will be sold” are opposite. Therefore, according to formula (1.2), the probability of the occurrence of the desired event

P\(\overline(D)\)=1-P\(D\)=1-0,\!17=0,\!83.

since P\(D\)=0,\!17 as was found in example 1.

Theorem 2.1 of addition of probabilities is valid only for incompatible events. Using it to find the probability of joint events can lead to incorrect and sometimes absurd conclusions, as is clearly seen in the following example. Let the execution of an order on time by Electra Ltd be estimated with a probability of 0.7. What is the probability that out of three orders the company will complete at least one on time? We denote the events that the company will complete the first, second, and third orders on time as A, B, C, respectively. If we apply Theorem 2.1 of addition of probabilities to find the desired probability, we obtain P\(A+B+C\)=0,\!7+0,\!7+0,\!7=2,\!1. The probability of the event turned out to be greater than one, which is impossible. This is explained by the fact that events A, B, C are joint. Indeed, fulfilling the first order on time does not exclude the fulfillment of the other two on time.

Let us formulate a theorem for adding probabilities in the case of two joint events (the probability of their joint occurrence will be taken into account).

Theorem 2.2. The probability of the sum of two joint events is equal to the sum of the probabilities of these two events without the probability of their joint occurrence:

P\(A+B\)=P\(A\)+P\(B\)-P\(AB\).

Dependent and independent events. Conditional probability

There are dependent and independent events. Two events are called independent if the occurrence of one of them does not change the probability of the occurrence of the other. For example, if there are two automatic lines operating in a workshop, which are not interconnected due to production conditions, then stops of these lines are independent events.

Example 3. The coin is tossed twice. The probability of the "coat of arms" appearing in the first trial (event A) does not depend on the appearance or non-appearance of the "coat of arms" in the second trial (event B). In turn, the probability of the “coat of arms” appearing in the second test does not depend on the result of the first test. Thus, events A and B are independent.

Several events are called collectively independent, if any of them does not depend on any other event and on any combination of the others.

The events are called dependent, if one of them affects the probability of the other. For example, two production plants are connected by a single technological cycle. Then the probability of failure of one of them depends on the state of the other. The probability of one event B, calculated on the assumption of the occurrence of another event A, is called conditional probability event B and is denoted by P\(B|A\) .

The condition for the independence of event B from event A is written in the form P\(B|A\)=P\(B\) , and the condition for its dependence - in the form P\(B|A\)\ne(P\(B\)). Let's consider an example of calculating the conditional probability of an event.

Example 4. The box contains 5 cutters: two worn and three new. Two sequential extractions of the incisors are performed. Determine the conditional probability of a worn cutter appearing during the second extraction, provided that the cutter removed the first time is not returned to the box.

Solution. Let us denote by A the extraction of a worn-out cutter in the first case, and \overline(A) by the extraction of a new one. Then P\(A\)=\frac(2)(5),~P\(\overline(A)\)=1-\frac(2)(5)=\frac(3)(5). Since the removed cutter is not returned to the box, the ratio between the quantities of worn and new cutters changes. Consequently, the probability of removing a worn cutter in the second case depends on what event took place before.

Let us denote by B the event meaning the removal of the worn cutter in the second case. The probabilities of this event could be:

P\(B|A\)=\frac(1)(4),~~~P\(B|\overline(A)\)=\frac(2)(4)=\frac(1)(2 ).

Therefore, the probability of event B depends on whether event A occurs or not.

Probability multiplication formulas

Let events A and B be independent, and the probabilities of these events are known. Let's find the probability of combining events A and B.

Theorem 2.3. The probability of the joint occurrence of two independent events is equal to the product of the probabilities of these events:

P\(AB\)=P\(A\)\cdot P\(B\).

Corollary 2.1. The probability of the joint occurrence of several events that are independent in the aggregate is equal to the product of the probabilities of these events:

P\(A_1A_2\ldots(A_n)\)=P\(A_1\)P\(A_2\)\ldots(P\(A_n\)).

Example 5. Three boxes contain 10 parts. The first box contains 8 standard parts, the second – 7, and the third – 9. One part is taken out at random from each box. Find the probability that all three parts taken out will be standard.

Solution. The probability that a standard part is taken from the first box (event A), P\(A\)=\frac(8)(10)=\frac(4)(5). The probability that a standard part is taken from the second box (event B), P\(B\)=\frac(7)(10). The probability that a standard part is taken from the third box (event C), P\(C\)=\frac(9)(10). Since events A, B and C are independent in the aggregate, then the desired probability (by the multiplication theorem)

P\(ABC\)=P\(A\)P\(B\)P\(C\)=\frac(4)(5)\frac(7)(10)\frac(9)(10) =0,\!504.

Let events A and B be dependent, and the probabilities P\(A\) and P\(B|A\) are known. Let us find the probability of the product of these events, that is, the probability that both event A and event B will appear.

Theorem 2.4. The probability of the joint occurrence of two dependent events is equal to the product of the probability of one of them by the conditional probability of the other, calculated under the assumption that the first event has already occurred:

P\(AB\)=P\(A\)\cdot P\(B|A\);\qquad P\(AB\)=P\(B\)\cdot P\(A|B\)

Corollary 2.2. The probability of the joint occurrence of several dependent events is equal to the product of the probability of one of them and the conditional probabilities of all the others, and the probability of each subsequent event is calculated under the assumption that all previous events have already occurred.

Example 6. The urn contains 5 white balls, 4 black and 3 blue. Each test consists of drawing one ball at random without returning it to the urn. Find the probability that a white ball will appear on the first trial (event A), a black ball on the second (event B) and a blue ball on the third (event C).

Solution. Probability of a white ball appearing on the first trial P\(A\)=\frac(5)(12). The probability of a black ball appearing on the second trial, calculated under the assumption that a white ball appeared on the first trial, i.e. conditional probability P\(B|A\)=\frac(4)(11). The probability of a blue ball appearing on the third trial, calculated under the assumption that a white ball appeared on the first trial and a black ball on the second, P\(C|AB\)=\frac(3)(10). Required probability

P\(ABC\)=P\(A\)P\(B|A\)P\(C|AB\)=\frac(5)(12)\frac(4)(11)\frac(3 )(10).

Total Probability Formula

Theorem 2.5. If event A occurs only under the condition of the occurrence of one of the events forming a complete group of incompatible events, then the probability of event A is equal to the sum of the products of the probabilities of each of the events B_1,B_2,\ldots(B_n) to the corresponding conditional probability of the event B_1,B_2,\ldots(B_n):

P\(A\)=\sum\limits_(i=1)^(n)P\(B_i\)P\(A|B_i\).

In this case, the events B_i,~i=1,\ldots,n are called hypotheses, and the probabilities P\(B_i\) are called a priori. This formula is called the total probability formula.

Example 7. The assembly line receives parts from three machines. The productivity of the machines is not the same. The first machine produces 50% of all parts, the second - 30%, and the third - 20%. The probability of a high-quality assembly when using a part manufactured on the first, second and third machine is 0.98, 0.95 and 0.8, respectively. Determine the probability that the assembly coming off the assembly line is of high quality.

Solution. Let us denote by A the event indicating the validity of the assembled node; B_1, B_2 and B_3 - events meaning that the parts were made on the first, second and third machine, respectively. Then

P\(B_1\)=0,\!5;~~~~~P\(B_2\)=0,\!3;~~~~~P\(B_3\)=0,\!2;
P\(A|B_1\)=0,\!98;~~~P\(A|B_2\)=0,\!95;~~~P\(A|B_3\)=0,\!8 .

Required probability

Bayes formula

This formula is used when solving practical problems when event A, appearing together with any of the events B_1,B_2,\ldots(B_n), forming a complete group of events, has occurred and it is necessary to carry out a quantitative reassessment of the probabilities of the hypotheses B_1,B_2,\ldots(B_n). Priori (before experience) probabilities P\(B_1\),P\(B_2\),\ldots(P\(B_n\)) known. It is required to calculate posterior (after experiment) probabilities, i.e., essentially, you need to find conditional probabilities P\(B_1|A\),P\(B_2|A\),\ldots(P\(B_n|A\)). For hypothesis B_j, Bayes' formula looks like this:

P\(B_j|A\)=\frac(P\(B_j\) P\(A|B_j\))(P\(A\)).

Expanding P\(A\) in this equality using the total probability formula (2.1), we obtain

P\(B_j|A\)=\dfrac(P\(B_j\)P\(A|B_j\))(\sum\limits_(i=1)^(n)P\(B_i\)P\( A|B_i\)).

Example 8. Under the conditions of example 7, calculate the probabilities that the assembly includes a part manufactured on the first, second and third machine, respectively, if the assembly coming off the assembly line is of high quality.

Source

Conditional laws of distribution. Regression.

Definition. The conditional distribution law of one of the one-dimensional components of a two-dimensional random variable (X, Y) is its distribution law, calculated under the condition that the other component took a certain value (or fell into some interval). In the previous lecture, we looked at finding conditional distributions for discrete random variables. Formulas for conditional probabilities are also given there:

In the case of continuous random variables, it is necessary to determine the probability densities of the conditional distributions j y (x) and j X (y). For this purpose, in the given formulas, we replace the probabilities of events with their “elements of probability”!

after reduction by dx and dy we get:

those. the conditional probability density of one of the one-dimensional components of a two-dimensional random variable is equal to the ratio of its joint density to the probability density of the other component. These relations are written in the form

are called the theorem (rule) for multiplying distribution densities.

Conditional densities j y (x) and j X (y). have all the properties of “unconditional” density.

When studying two-dimensional random variables, the numerical characteristics of the one-dimensional components X and Y are considered - mathematical expectations and variances. For a continuous random variable (X, Y), they are determined by the formulas:

Along with them, the numerical characteristics of conditional distributions are also considered: conditional mathematical expectations M x (Y) and M y (X) and conditional variances D x (Y) and D Y (X). These characteristics are found using the usual formulas of mathematical expectation and variance, in which conditional probabilities or conditional probability densities are used instead of event probabilities or probability densities.

Conditional mathematical expectation of a random variable Y at X = x, i.e. M x (Y) is a function of x, called a regression function or simply a regression of Y on X. Similarly, M Y (X) is called a regression function or simply a regression of X on Y. The graphs of these functions are called regression lines (or regression curves) Y respectively by X or X by Y.

Dependent and independent random variables.

Definition. Random variables X and Y are called independent if their joint distribution function F(x,y) is represented as a product of the distribution functions F 1 (x) and F 2 (y) of these random variables, i.e.

Otherwise, the random variables X and Y are called dependent.

Differentiating the equality twice with respect to the arguments x and y, we obtain

those. for independent continuous random variables X and Y, their joint density j(x,y) is equal to the product of the probability densities j 1 (x) and j 2 (y) of these random variables.

Until now, we have encountered the concept of a functional relationship between the variables X and Y, when each value x of one variable corresponded to a strictly defined value of the other. For example, the relationship between two random variables - the number of failed pieces of equipment over a certain period of time and their cost - is functional.

In general, they are faced with a different type of dependence, less severe than the functional one.

Definition. The relationship between two random variables is called probabilistic (stochastic or statistical) if each value of one of them corresponds to a certain (conditional) distribution of the other.

In the case of a probabilistic (stochastic) dependence, it is impossible, knowing the value of one of them, to accurately determine the value of the other, but you can only indicate the distribution of the other quantity. For example, the relationship between the number of equipment failures and the cost of its preventive repairs, a person’s weight and height, a schoolchild’s time spent watching television programs and reading books, etc. are probabilistic (stochastic).

In Fig. Figure 5.10 shows examples of dependent and independent random variables X and Y.

Two random variables $X$ and $Y$ are called independent if the distribution law of one random variable does not change depending on what possible values ​​the other random variable takes. That is, for any $x$ and $y$ the events $X=x$ and $Y=y$ are independent. Since the events $X=x$ and $Y=y$ are independent, then by the theorem of the product of probabilities of independent events $P\left(\left(X=x\right)\left(Y=y\right)\right)=P \left(X=x\right)P\left(Y=y\right)$.

Example 1 . Let the random variable $X$ express the cash winnings from tickets of one lottery “Russian Lotto”, and the random variable $Y$ express the cash winnings from tickets of another lottery “Golden Key”. It is obvious that the random variables $X,\Y$ will be independent, since the winnings from tickets of one lottery do not depend on the law of distribution of winnings from tickets of another lottery. In the case where the random variables $X,\Y$ would express the winnings of the same lottery, then, obviously, these random variables would be dependent.

Example 2 . Two workers work in different workshops and produce various products that are unrelated to each other by manufacturing technologies and the raw materials used. The distribution law for the number of defective products manufactured by the first worker per shift has the following form:

$\begin(array)(|c|c|)
\hline
Number of \ defective \ products \ x & 0 & 1 \\
\hline
Probability & 0.8 & 0.2 \\
\hline
\end(array)$

The number of defective products produced by the second worker per shift obeys the following distribution law.

$\begin(array)(|c|c|)
\hline
Number of \ defective \ products \ y & 0 & 1 \\
\hline
Probability & 0.7 & 0.3 \\
\hline
\end(array)$

Let us find the distribution law for the number of defective products produced by two workers per shift.

Let the random variable $X$ be the number of defective products produced by the first worker per shift, and $Y$ the number of defective products produced by the second worker per shift. By condition, the random variables $X,\Y$ are independent.

The number of defective products produced by two workers per shift is a random variable $X+Y$. Its possible values ​​are $0,\ 1$ and $2$. Let us find the probabilities with which the random variable $X+Y$ takes its values.

$P\left(X+Y=0\right)=P\left(X=0,\ Y=0\right)=P\left(X=0\right)P\left(Y=0\right) =0.8\cdot 0.7=0.56.$

$P\left(X+Y=1\right)=P\left(X=0,\ Y=1\ or\ X=1,\ Y=0\right)=P\left(X=0\right )P\left(Y=1\right)+P\left(X=1\right)P\left(Y=0\right)=0.8\cdot 0.3+0.2\cdot 0.7 =0.38.$

$P\left(X+Y=2\right)=P\left(X=1,\ Y=1\right)=P\left(X=1\right)P\left(Y=1\right) =0.2\cdot 0.3=0.06.$

Then the law of distribution of the number of defective products manufactured by two workers per shift:

$\begin(array)(|c|c|)
\hline
Number of \ defective \ products & 0 & 1 & 2 \\
\hline
Probability & 0.56 & 0.38 & 0.06\\
\hline
\end(array)$

In the previous example, we performed an operation on random variables $X,\Y$, namely, we found their sum $X+Y$. Let us now give a more rigorous definition of operations (addition, difference, multiplication) over random variables and give examples of solutions.

Definition 1. The product $kX$ of a random variable $X$ by a constant variable $k$ is a random variable that takes values ​​$kx_i$ with the same probabilities $p_i$ $\left(i=1,\ 2,\ \dots ,\ n\ right)$.

Definition 2. The sum (difference or product) of random variables $X$ and $Y$ is a random variable that takes all possible values ​​of the form $x_i+y_j$ ($x_i-y_i$ or $x_i\cdot y_i$), where $i=1 ,\ 2,\dots ,\ n$, with probabilities $p_(ij)$ that the random variable $X$ will take the value $x_i$, and $Y$ the value $y_j$:

$$p_(ij)=P\left[\left(X=x_i\right)\left(Y=y_j\right)\right].$$

Since the random variables $X,\Y$ are independent, then according to the probability multiplication theorem for independent events: $p_(ij)=P\left(X=x_i\right)\cdot P\left(Y=y_j\right)= p_i\cdot p_j$.

Example 3 . Independent random variables $X,\ Y$ are specified by their probability distribution laws.

$\begin(array)(|c|c|)
\hline
x_i & -8 & 2 & 3 \\
\hline
p_i & 0.4 & 0.1 & 0.5 \\
\hline
\end(array)$

$\begin(array)(|c|c|)
\hline
y_i & 2 & 8 \\
\hline
p_i & 0.3 & 0.7 \\
\hline
\end(array)$

Let's formulate the law of distribution of the random variable $Z=2X+Y$. The sum of random variables $X$ and $Y$, that is, $X+Y$, is a random variable that takes all possible values ​​of the form $x_i+y_j$, where $i=1,\ 2,\dots ,\ n$ , with probabilities $p_(ij)$ that the random variable $X$ will take the value $x_i$, and $Y$ the value $y_j$: $p_(ij)=P\left[\left(X=x_i\right )\left(Y=y_j\right)\right]$. Since the random variables $X,\Y$ are independent, then according to the probability multiplication theorem for independent events: $p_(ij)=P\left(X=x_i\right)\cdot P\left(Y=y_j\right)= p_i\cdot p_j$.

So, it has distribution laws for the random variables $2X$ and $Y$, respectively.

$\begin(array)(|c|c|)
\hline
x_i & -16 & 4 & 6 \\
\hline
p_i & 0.4 & 0.1 & 0.5 \\
\hline
\end(array)$

$\begin(array)(|c|c|)
\hline
y_i & 2 & 8 \\
\hline
p_i & 0.3 & 0.7 \\
\hline
\end(array)$

For the convenience of finding all values ​​of the sum $Z=2X+Y$ and their probabilities, we will compose an auxiliary table, in each cell of which we will place in the left corner the values ​​of the sum $Z=2X+Y$, and in the right corner - the probabilities of these values ​​obtained as a result multiplying the probabilities of the corresponding values ​​of random variables $2X$ and $Y$.

As a result, we obtain the distribution $Z=2X+Y$:

$\begin(array)(|c|c|)
\hline
z_i & -14 & -8 & 6 & 12 & 10 & 16 \\
\hline
p_i & 0.12 & 0.28 & 0.03 & 0.07 & 0.15 & 0.35 \\
\hline
\end(array)$