Anatomy of the Kalman family from scratch-(01) Preliminary knowledge points

Explaining the summary link of a series of articles about slam:The most comprehensive slam in history starts from scratch, for the Kalman family explained in this column Zero anatomy link:The Kalman family’s anatomy from scratch - (00) catalog latest explanation without blind spots: https://blog.csdn.net/weixin_43013761/article/details/133846882
 
The center directly below the end of the article provides my contact information. Click on my photo to display W X → Official certification {\color{blue}{The center directly below the end} provides my \color{red} contact information, \color {blue}Click on your photo to display WX→official certification} The center directly below the end of the articleprovides mycontact information,click on my photo to display a>XWOfficial certification

Solemnly declare: This series of blogs are exclusively owned by me (W e n h a i Z h u). Reprinting and plagiarism are prohibited. Thank you for reporting for the first time! \color{red} Solemnly declare: This series of blogs are exclusively owned by me (WenhaiZhu). Reprinting and plagiarism are prohibited. , thank you for the first report!Zheng heavy statement: 该 SERIES EXPO CUSTOMER HIMSELF(WenhaiZhu)Single private ownership,Prohibited abuse,Thank you for your first report!
 

I. Introduction

In the subsequent process, various fragmentary knowledge points will inevitably be involved, such as the recording or derivation of some formulas in probability theory. If a large amount of space is spent on explaining each time, there will be too many blogs. , and the knowledge points will be relatively messy, so this blog is mainly used to record the conclusions of some important formulas. Each formula will have a corresponding number, but it should be noted that the numbers may not be in order\ color{red} numbers may not be in orderThe numbers may not be in order. Some may have a derivation process, some may only have reference links, and of course some may only have formulas, which means it should be relatively simple. You can easily find the corresponding derivation process on Baidu or Google.

1. Probability related

(1) Random variable: \color{blue}(1) Random variable:(1)Change amount: Large copy X X X , Y Y Y Z Z Z … represents a random variable (event); lowercase x x x , y y y z z z represents the specific value of the random variable, usually a specific numerical value; such as X X X represents a random event whether it will rain tomorrow, X = 1 X=1 X=1 Display below rain, X = 0 X=0 X=0 It's raining all the time.

(2) Discrete probability: \color{blue}(2) Discrete probability:(2)Rough dispersion: for jogao P P P represents discrete probability probability, here used Y Y Y represents a random event of rolling the dice, then P ( Y = 1 ) P(Y=1) P(Y=1) represents the probability that the die is 1, such as P ( Y = 1 ) = 1 6 P(Y=1)=\frac{1}{6} P(Y=1)=61, then the probability that the die is 1 is 1 6 \frac{1}{6} 61, of course it can also be expressed using mathematical formulas. Such as P ( Y = y ) = e − λ λ k k ! P(Y=y)=e^{-\lambda} \frac{\lambda^{k}}{k ! } P(Y=y)=It isλk!lk

(3) Continuous probability: \color{blue}(3) Continuous probability:(3)Connection approximation: The discrete probability can be understood as a histogram distribution, then the continuous probability is the ratio of the area enclosed by an interval to the entire area, such as P ( 1 < Y < 5 ) = 3 6 P(1<Y<5)=\frac{3}{6} P(1<AND<5)=63 can represent the probability of rolling a die and getting 2, 3 or 4. Since it is an area, you can use integrals. Another example: P ( 2 < + ∞ ) = ∫ 2 − ∞ 1 2 π e − x 2 2 d x P(2<+∞)=\int_{2}^{- \infty} \frac{1}{\sqrt{2 \pi}} e^{-\frac{x^{2}}{2}} \mathrm dx P(2<+)=22π 1It is2x2dx

(4) Joint probability: \color{blue}(4)Joint probability:(4)Union probability: Two random events can be expressed jointly, such as P ( X = x , Y = y ) P(X=x, Y =y) P(X=x,AND=y), display incident X X X appearance x x x Same time incident Y Y Y 出现 y and The probability of y. For example, if two dice are thrown, then P ( X = 1 , Y = 5 ) P(X=1, Y=5) P(X=1,AND=5) means the probability that the result of the first dice is 1 and the result of the second dice is 5.

(5) Conditional probability: \color{blue}(5)Conditional probability:(5)Conditional approximation: First of all, we understand it from the naming point of view, that is, under the premise (condition) of the occurrence of an event, the probability of another event occurring. Here is an example P ( Y = 1 ∣ X = 5 ) P(Y=1|X=5) P(Y=1∣X=5) represents the probability that the result of the second die is 1 under the premise that the result of the first die is 5.

(5) Probability density ( P D F ): \color{blue}(5)Probability density (PDF):(5)approximate density()FDP: Let’s talk about probability density function here. We write the [(3) continuous probability] expression mentioned above as a general expression as follows: P(aXb)=abf(x)d xPrimary name X X X is a continuous random variable, f ( x ) f(x) f(x) X X The probability density function of X is referred to as probability density or density. f ( x ) Δ x f(x) \Delta{x} < /span>f(x)Δx 表示 Δ x \Delta{x} Δx The probability of this interval. Probability density can be viewed as probability about x x x Target number, attention to demand x x x f ( x ) f(x) f(x) The city is connected.

(6) Edge probability: \color{blue}(6) Edge probability:(6)Performance rate: For one-dimensional marginal probability (Marginal Probability), it is the probability of a certain event occurring, regardless of other events, such as in the dice example P ( X = 1 ) P(X=1) P(X=1) P ( X = 2 ) P(X=2) P(X=2). Multi-dimensional edge probabilities will be more complicated, and there are differences between discrete and continuous edge probabilities, and they also involve joint probability and total probability formulas, etc., so they will be explained separately later. In addition, although the one-dimensional edge probability can be passed f ( x ) Δ x f(x) \Delta{x} f(x)Δ x Indication, however, there is no actual meaning, usually unforeseen.

(7) Prior and posterior: \color{blue}(7) Prior and posterior:(7)First and second meal: To be compatible with most books or bloggers, use a ˇ \check {a} aˇ or a − a^- a Display destination, a ^ \hat {a} a^ or a + a^+ a+ After display, as shown x ˇ \check {x} xˇ given x − x^- x represents the prior state, f X + ( x ) f^+_X(x) fX+(x) f ^ X ( x ) \hat f_X(x) f^X(x) represents the posterior probability density function. There is no difference between them. The way of writing is just different.

2.Matrix correlation

(1) Variable: \color{blue}(1)Variable:(1)change amount: Afterwards, a small copy a a a b b b c c c represents a scalar value, the lowercase letters after bolding a \mathbf a a b \mathbf b b c \mathbf c c Equal display direction, then large photographic A \mathbf A A and bold indicates the matrix.

(2) Matrix: \color{blue}(2)Matrix:(2)square: In addition, some special explanations are needed about the matrix, such as A a b \mathbf A_a^b Aab, which means that it is a transformation matrix, and its meaning represents the coordinate transformation from system a to system b.

2. Conditional probability (multidimensional)

(1) Conditional probability (discrete): \color{blue}(1) Conditional probability (discrete):(1)conditional approximation()dispersal: If random event X X X, Y Y Y is a discrete event, then the following formula can be derived:
P ( X = x ∣ Y = y ) = P ( X = x , Y = y ) P ( Y = y ) (01) \color{Green} \tag{01} P(X=x \mid Y=y)=\frac{P(X=x, Y=y) }{P(Y=y)} P(X=xAND=y)=P(Y=y)P(X=x,AND=y)(01)This is quite easy to understand, just change itP(X=xAND=y)P(Y=y)=P(X=x,AND=y). It can be understood by drawing, two events X , Y X, Y X,Y are represented by ellipses respectively, then their intersection is P ( X = x , Y = y ) P ( Y = y ) {P(X=x, Y=y)}{P(Y=y)} P(X=x,AND=y)P(Y=y)

(2) Conditional probability (continuous): \color{blue}(2) Conditional probability (continuous):(2)conditional approximation()连续: If it is continuous, it cannot be expressed in a similar discrete way. The one-dimensional continuous edge probability was mentioned earlier, as in the above formula P ( Y = y ) P(Y=y) P(Y=y) is meaningless, so we should express it through probability density. Here we use f X ( x ) f_X(x) fX(x) f Y ( y ) f_Y(y) fY(y) Display connection amount X , Y X, YX,The probability density function of Y. Then f Y X ( y ∣ x ) f_{YX}(y|x) fYX(yx) Approximate display condition P ( Y ∣ X ) P(Y|X) P(YX ) density function. Arisuishi formula below:
f Y X ( y ∣ x ) = f ( X = x , Y = y ) f X ( x ) (02) \color{Green} \tag{02} f_{YX}(y|x)=\frac{f(X=x, Y=y)}{f_X(x)} fYX(yx)=fX(x)f(X=x,AND=y)(02) So what does this probability density do? Like the previous one-dimensional one, the conditional probability can be obtained by integration P ( Y ∣ X ) P(Y|X) P(YX ). Backward progress analysis.

3. Total probability formula-marginal probability-multidimensional

(1) Total probability (discrete): \color{blue}(1) Total probability (discrete):(1)Total approximation()dispersal: Suppose there are random events (variables) X , Y X, Y X,Y,Washido X X X Approximate probability P ( X i ) P(X_i) P(Xi);Hereafter, conditional probability P ( Y ∣ X i ) P(Y|X_i) P(YXi),Owned by X X X 情况 [ X 0 , X 1 , . . . . X i ] [X_0,X_1,....X_i] [X0,X1,....Xi] occurs, its Y Y Y The probability that the event also occurs. Here we only consider two dimensions, that is, the events are only X , Y X, Y X,Y, let’s put all P ( Y ∣ X i ) P(Y|X_i) P(YXi) P ( Y ) P(Y) P(Y) Official formula: P ( Y ) = ∑ i P ( X i ) P ( Y ∣ X i ) (03) \color{Green} \tag{03} P(Y) =\sum_iP(X_i)P(Y|X_i) P(Y)=iP(Xi)P(YXi)(03)The above formula is relatively easy to understand. For example, there are five in the box To find the color (red, yellow, blue, green, cyan), now take two balls in a row and record them as events X , Y X, Y X,Y, use (red|yellow) to represent the first time you take out yellow and the second time you take out red, and so on, if you know P (红∣红) P(红|红) P(redred ), P (red ∣ yellow ) P(red|yellow) P(redyellow ), P (红 ∣ 蓝 ) P(红|蓝) P(red), P (red ∣ green ) P(red|green) P(redgreen ), P (red ∣ blue ) P(red|blue) P(redblue ) Approximate probability, same time and distance P ( X i ) = 1 5 P(X_i)=\frac{1}{5 } P(Xi)=51, then according to the above formula we can solve the probability that the ball is red when we take it out once, and the marginal probability P ( Y ) = red P (Y) = red P(Y)=Marginal probability of red. Of course, it can also be obtained similarly
P ( Y ) = yellow P(Y)=yellow P(Y)=Yellow P ( Y ) = 蓝 P(Y)=蓝 P(Y)=The marginal probability of blue and so on. The principle is to combine all X i X_i Xi occurs simultaneously Y j Y_j ANDjThe probabilities of are accumulated, and then the marginal probability Y j Y_j ANDj(The above formula is derived for simplicity, omitting Y Y Y的下标 j j j)。

(2) Full probability (continuous): \color{blue}(2) Full probability (continuous):(2)Total approximation()连续: The continuous situation is much more complicated, unlike discrete, which can be directly accumulated. It is relatively complicated, mainly because in the discrete case P ( Y j ) P(Y_j) P(Yj) is meaningless. However, the density function mentioned earlier is meaningful and useful. For this use Newton-Leibniz's previous probability density P ( a ≤ X ≤ b ) = ∫ a b f ( x ) d x P(a≤X≤b)=\int_{a }^{b}f(x)\mathrm dx P(aXb)=abf(x)d x Reprinted, possible F X ( − ∞ ≤ x ) = ∫ − ∞ x f X ( x ) d t F_X(-\ infty≤x)=\int_{-\infty}^{x}f_X(x)dt FX(x)=xfX(x)dt。设密度函数 f Y X ( y , x ) f_{YX}(y,x) fYX(y,x) f X ( x ) f_X(x) fX(x) f Y ( y ) f_Y(y) fY(y) ,也就是说 ( F X ( x ) ) ′ = f X ( x ) (F_X(x))^{'}=f_{X}(x) (FX(x))=fX(x) ( F Y ( y ) ) ′ = f Y ( y ) (F_Y(y))^{'}=f_{Y}(y) (FY(y))=fY(y). Then the following formula can be derived further:
F X ( x ) = F ) \color{Green} \tag{04} F_X(x)=F_X(-\infty≤x)=\int_{-\infty}^{x}[\int_{-\infty}^{\infty}f (x,y)\mathrm dy]\mathrm dx FX(x)=FX(x)=x[f(x,y)dy]dx(04)首先 f ( x , y ) f(x,y) f(x,y) 时关于 x , y x,y x,Density function of y, aligned variables y y y的积分 ∫ − ∞ ∞ f ( x , y ) d y = f ( x ) \int_{-\infty}^{\infty}f(x,y)\mathrm dy=f(x) f(x,y)dy=f(x), here from infinity to The integral of positive infinity, that is, y y All possibilities for y are considered. About y y Integration of y, integration result y y y Of course not, as follows: f X ( x ) = ∫ − ∞ ∞ f ( x , y ) d y (05 ) \color{Green} \tag{05} f_X(x)=\int_{-\infty}^{\infty}f(x,y)\mathrm dy fX(x)=f(x,y)dy(05)It's just the same as below x x x density function f ( x ) f(x) f(x), after doing By integrating twice, we get F X ( x ) = F X ( − ∞ ≤ x ) F_X(x)=F_X(-\infty≤x) FX(x)=FX(x). Of course you can hold it x , y x,y x,By exchanging the integrals of y, we can get: F Y ( y ) = F y ( − ∞ ≤ y ) = ∫ − ∞ y [ ∫ − ∞ ∞ f ( y , x ) d x ] d y (06) \color{Green} \tag{06} F_Y(y)=F_y(-\infty≤y)=\int_{-\infty} ^{y}[\int_{-\infty}^{\infty}f(y,x)\mathrm dx]\mathrm dy FY(y)=Fy(y)=y[f(y,x)dx]dy(06) 注意 : \color{red}注意: Notice: According to the calculated F X ( x ) = F X ( − ∞ ≤ x ) F_X(x)=F_X(-\infty ≤x) FX(x)=FX(x) F Y ( y ) = F y ( − ∞ ≤ y ) F_Y( y)=F_y(-\infty≤y) FY(y)=Fy(y) We can calculate any edge probability, such as F X i j ( x ∈ [ x i , x j ] ) = FFXij(x[xi,xj])=FX(Xi)FX(Xj)

4. Bayes’ formula

1. Discrete derivation

根据【条件概率(离散)】(01) 式 与 【全概率(离散)】(03)式子,可以推导出:
P ( X i ∣ Y ) = P ( Y ∣ X i ) P ( X i ) P ( Y ) = P ( Y ∣ X i ) P ( X i ) ∑ i = 1 n P ( Y ∣ X i ) P ( X i ) = c a u s a l k n o w l e d g e − p r i o r k n o w l e d g e p r i o r k n o w l e d g e (07) \color{Green} \tag{07} P\left(X_{i} \mid Y\right)=\frac{P\left(Y \mid X_{i}\right) P\left(X_{i}\right)}{P(Y)}=\frac{P\left(Y \mid X_{i}\right) P\left(X_{i}\right)}{\sum_{i=1}^{n} P\left(Y \mid X_{i}\right) P\left(X_{i}\right)}=\frac{causal knowledge-prior knowledge}{prior knowledge} P(XiY)=P(Y)P(YXi)P(Xi)=i=1nP(YXi)P(Xi)P(YXi)P(Xi)=priorknowledgecausalknowledgepriorknowledge(07)This is a good understanding of the expressed intention, which is the result Y Y Y occurs because of the cause X i X_i XiWhat is the probability of , that is, the probability inference of [effect → cause] (solving a crime is such a process). P ( Y ) P(Y) P(Y) is a marginal probability comparison It is easy to understand that it is the probability of such an effect. If it is in two dimensions, according to the total probability formula, that is, (03) P ( Y ) = ∑ i P ( X i ) P ( Y ∣ X i ) P(Y)=\sum_iP(X_i)P(Y|X_i) P(Y)=iP(Xi)P(YXi)。另外 P ( Y ∣ X i ) P ( X i ) P\left(Y \mid X_{i}\right) P\left(X_{i}\right) P(YXi)P(Xi), the meaning is relatively simple, it is based on Y Y Y On the basis of event occurrence, at the same time X i X_i XiThe event also occurs. P ( X i ) P( X_{i}) P(Xi) Approximate probability of first choice, P ( Y ∣ X i ) P(Y \mid X_{i}) P(YXi) is called the likelihood probability. The prior probability is understood as the initial value, and the likelihood probability represents the modification of the prior, and then P ( X i ∣ Y ) P(X_i|Y) P(XiY) is called the posterior probability density. In addition, we usually record the denominator as
η = 1 ∑ i = 1 n P ( Y ∣ X i ) P ( X i ) (08) \color{Green} \tag{08} \eta=\frac{1}{\sum_{i=1}^{n} P\left(Y \mid X_{i}\right) P\left(X_{i}\right)} the=i=1nP(YXi)P(Xi)1(08)那么(07)式也会被写成 P ( X i ∣ Y ) = P ( Y ∣ X i ) P ( X i ) P ( Y ) = η P ( Y ∣ X i ) P ( X i ) (09) \color{Green} \tag{09} P\left(X_{i} \mid Y\right)=\frac{P\left(Y \mid X_{i}\right) P\left(X_{i}\right)}{P(Y)}=\eta P\left(Y \mid X_{i}\right) P\left(X_{i}\right) P(XiY)=P(Y)P(YXi)P(Xi)=ηP(YXi)P(Xi)(09)

2. Continuous derivation

is back to the continuous derivation. It doesn’t take much, and of course it will be relatively complicated. In the derivation process, the integration to infinite series (discrete) process is used, that is, continuous to discretization. Here is the first Derivation results, let’s discuss the derivation process: f X ∣ Y ( x ∣ y ) = f X , Y ( x , y ) f Y ( y ) = f Y ∣ X ( y ∣ x ) f X ( x ) ∫ − ∞ + ∞ f Y ∣ y)=\frac{f_{X, Y}(x, y)}{f_{Y}(y)}=\frac{f_{Y \mid X}(y \mid x) f_{X}(x )}{\int_{-\infty}^{+\infty} f_{Y \mid X}(y \mid x) f_{X}(x) \mathrm{d} x} fXY(xy)=fY(y)fX,Y(x,y)=+fYX(yx)fX(x)dxfYX(yx)fX(x)(10) 根据前面知识,可以知道 F X ∣ Y ( x ∣ y ) = P ( X ≤ x ∣ Y = y ) = ∫ − ∞ x f X ∣ Y ( x ∣ y ) d x = ∑ u = − ∞ x P ( X = u ∣ Y = y ) (11) \color{Green} \tag{11} F_{X \mid Y}(x \mid y)=P(X \leq x \mid Y=y)=\int_{-\infty}^{x} f_{X \mid Y}(x \mid y) d x=\sum_{u=-\infty}^{x} P(X=u \mid Y=y) FXY(xy)=P(XxAND=y)=xfXY(xy)dx=u=xP(X=inAND=y)(11) The above is a core step, which is f X ∣ Y ( x ∣ y ) d x f_{X \mid Y}(x \mid y) d x fXY(xy)dx as an infinitesimal quantity Treat, according to [Full Probability (Continuous)] (05) derivation, treat it as the area of ​​a small interval, that is, Y = y Y=y AND=y 条件下,对 X = u X=u X=u Progress ( − ∞ , x ) (-\infty,x) (,The accumulation of x). Now that it is discretized, of course we can apply the discrete formula (07), that is: ∑ u = − ∞ x P ( X = u ∣ Y = y ) = ∑ u = − ∞ x P ( Y = y ∣ X = u ) P ( X = u ) P ( Y = y ) (12) \color{Green} \tag{12} \sum_{u=-\infty}^{ x} P(X=u \mid Y=y)=\sum_{u=-\infty}^{x} \frac{P(Y=y \mid X=u) P(X=u)}{P (Y=y)} u=xP(X=inAND=y)=u=xP(Y=y)P(Y=andX=u)P(X=u)(12) If you want to do something else, you can use the graphic graph to generate the graph :
= lim ⁡ ε → 0 ∑ u = − ∞ x P ( y ≤ Y ≤ y + ε ∣ X = u ) P ( u ≤ X ≤ u + ε ) P ( y ≤ Y ≤ y + ε ) (13) \color{Green} \tag{13} =\lim _{\varepsilon\rightarrow 0} \sum_{u=-\infty}^{x} \frac{P(y\ leq Y \leq y+\varepsilon \mid X=u) P(u \leq X \leq u+\varepsilon)}{P(y \leq Y \leq y+\varepsilon)} =ε0limu=xP(yANDand+ε)P(yANDand+eX=u)P(uXin+ε)(13) Why can equation (10) be converted into equation (11)? Yes Because when using discrete substitution, X , Y X,Y X,Y all have a range, and now this range is considered to be infinite. Then apply Lagrange's mean value theorem: = lim ⁡ ε → 0 ∑ u = − ∞ x f Y ∣ X ( ξ 1 ∣ u ) ε ⋅ f X ( ξ 2 ) ε f Y ( ξ 3 ) ε , (14) \color{Green} \tag{14} = \lim _{\varepsilon \rightarrow 0} \sum_{u=-\infty}^{x} \frac{f_{Y \mid X}\left(\xi_{1} \mid u\right) \varepsilon \cdot f_{X}\left(\xi_{2}\right) \varepsilon}{f_{Y}\left(\xi_ {3}\right) \varepsilon} , =ε0limu=xfY(ξ3)efYX(ξ1u)efX(ξ2)ε(14)The main basis for the above is, as mentioned earlier, probability about random variables The reciprocal of is the probability density function. In the above formula ξ 1 ∈ ( y , y + ε ) \xi_{1} \in(y, y+\varepsilon) X1(y,and+ε),、 ξ 2 ∈ ( u , u + ε ) \xi_{2 } \in(u, u+\varepsilon) X2(u,in+ε) ξ 3 ∈ ( y , y + ε ) \xi_{3} \in(y, y+\varepsilon) X3(y,and+ε)。 会 ε \varepsilon ε 趶向于无穷小, ξ 1 = u \xi_{1}=u X1=u ξ 2 = u \xi_{2}=u X2=u ξ 3 = y \xi_{3}=y X3=y; At the same time, the numerator and denominator are reduced by one ε \varepsilon ε,电影化简可得,:
= lim ⁡ ε → 0 ∑ u = − ∞ x f Y ∣ X ( y ∣ u ) f X ( u ) f Y ( y ) ε = ∫ − ∞ x f Y ∣ X ( y ∣ u ) f X ( u ) f Y ( y ) d u (15) \color{Green} \tag{15} =\lim _{\varepsilon \rightarrow 0} \sum_{u=-\infty}^{x} \frac{f_{Y \mid X}(y \mid u) f_{X}(u)}{f_ {Y}(y)} \varepsilon=\int_{-\infty}^{x} \frac{f_{Y \mid X}(y \mid u) f_{X}(u)}{f_{Y} (y)} \mathrm d u =ε0limu=xfY(y)fYX(yu)fX(u)e=xfY(y)fYX(yu)fX(u)du(15) cause ε \varepsilon ε is a small amount, d u \mathrm du du is also an infinitesimal quantity, so the symbol above has changed. At the same time, u u u conversion x x x means, then we can get, then to summarize, it has been derived so far: F X ∣ Y ( x ∣ y ) = P ( X ≤ x ∣ Y = y ) = ∫ − ∞ x f Y ∣ X ( y ∣ x ) f mid Y}(x \mid y)=P(X \leq x \mid Y=y)=\int_{-\infty}^{x} \frac{f_{Y \mid X}(y \mid x) f_{X}(x)}{f_{Y}(y)} \mathrm d x FXY(xy)=P(XxAND=y)=xfY(y)fYX(yx)fX(x)dx(16)According to the properties of the continuous random probability density function, we can get: F X ∣ Y ( x ∣ y ) = P ( X ≤ x ∣ Y = y ) = ∫ − ∞ x f } F_{X \mid Y}(x \mid y)=P(X \leq x \mid Y=y)=\int_{-\infty}^{x} f_{X \mid Y}(x \mid y) \mathrm d x FXY(xy)=P(XxAND=y)=xfXY(xy)dx(17) Then according to (14) (15), we can get the continuous random variable Bayesian formula: f X ∣ Y ( x ∣ y ) = f Y ∣ X ( y ∣ x ) f y ∣ x ) f X ( x ) (18) \color{Green} \tag{18} f_{X \mid Y}(x \mid y)=\frac{f_{Y \mid X}(y \mid x) f_{X}(x)}{f_{Y}(y)}=\eta f_{Y \mid X}(y \mid x) f_{X}(x) fXY(xy)=fY(y)fYX(yx)fX(x)=ηfYX(yx)fX(x)(18)此处, f Y ( y ) f_{Y}(y) fY(y) satisfies (defined by the conditional probability density): fY(y)=+f(y,x)dx=+fYX(yx)fX(x)dx(20)所以 η = 1 ∫ − ∞ + ∞ f Y ∣ X ( y ∣ x ) f X ( x ) d x (21) \color{Green} \tag{21} \eta=\frac{1}{\int_{\mathbb{-\infty}}^{+\infty} f_{Y \mid X}(y \mid x) f_{X}(x) d x} the=+fYX(yx)fX(x)dx1(21) is similar to discrete, f X ( x ) f_X(x) fX(x) Name first approximate probability density, f Y ∣ X ( y ∣ x ) f_{Y|X}(y|x) fYX(yx) nominal approximate probability density, f X ∣ Y ( x ∣ y ) f_{X|Y}(x|y) fXY(xy) is called the posterior probability density function. The likelihood probability density function can modify the prior probability density function to obtain the posterior probability density function.

4. Formula record

1. Normal distribution density function:

f ( x ) = 1 σ 2 π e − ( x − μ ) 2 2 σ 2 X ∼ N ( μ , σ 2 ) (22) \color{Green} \tag{22} f(x)=\frac{ 1}{\sigma\sqrt{2\pi}}e^{-\frac{(x-\mu)^{2}}{2\sigma^{2}}}~~~~~~~~~ ~~X \sim N\left(\mu, \sigma^{2}\right)f(x)=p2π 1It is2σ2(xμ)2           XN(μ,p2)(22)onwards μ \mu μ Display uniformity, σ \sigma σ Display standard difference.

2. Bayesian formula of normal distribution:

Prior probability density function: f \tag{23} Prior probability density function: ~f_X(x)=X \sim N\left(\mu_1, \sigma_1^{2}\right)=\frac{1}{ \sigma_1 \sqrt{2 \ pi}} e^{-\frac{(x-\mu_1)^{2}}{2 \sigma_1^{2}}}Prior probability density function:f X(x)=XN(μ1,p12)=p12π 1It is2σ12(xμ1)2(23) Find the function of a function: f Y ∣ X ( y ∣ x ) = X ∼ N ( μ 2 , σ 2 2 ) = 1 σ 2 2 π and − ( x − μ 2 ) 2 2 σ 2 2 (24) ~f_{Y|X}(y|x)=X \sim N\left(\mu_2, \sigma_2^{2}\right)=\frac{1}{\sigma_2\sqrt{2\pi}} e ^{-\frac{(x-\mu_2)^{2}}{2\sigma_2^{2}}} Likelihood probability density function:f YX(yx)=XN(μ2,p22)=p22π 1It is2σ22(xμ2)2(24) f X ∣ Y ( x ∣ y ) = f X , Y ( x , y ) f Y ( y ) = f Y ∣ X ( y ∣ x ) f X ( x ) ∫ − ∞ + ∞ f Y ∣ X ( y ∣ x ) f X ( x ) d x = η f Y ∣ X ( y ∣ x ) f X ( x ) (25) \color{Green} \tag{25} f_{X \mid Y}(x \mid y)=\frac{f_{X, Y}(x, y)}{f_{Y}(y)}=\frac{f_{Y \mid X}(y \mid x) f_{X}(x)}{\int_{-\infty}^{+\infty} f_{Y \mid X}(y \mid x) f_{X}(x) \mathrm{d} x}=\eta f_{Y \mid X}(y \mid x) f_{X}(x) fXY(xy)=fY(y)fX,Y(x,y)=+fYX(yx)fX(x)dxfYX(yx)fX(x)=ηfYX(yx)fX(x)(25) Infinitesimal function : f X ∣ Y ( x ∣ y ) = N ( σ 1 2 σ 1 2 + σ 2 2 µ 2 + σ 2 2 σ 1 2 + σ 2 2 µ 1 , σ 1 2 σ 2 2 σ 1 2 + σ 2 2 ) (26) \color{Green } \tag{26} also define the boundary value:~f_{X|Y}(x|y)=N\left(\frac{\sigma_{1}^{2}}{\sigma_{1}^2 +\sigma_{2}^{2}} \mu_{2}+\frac{\sigma_{2}^{2}}{\sigma_{1}^{2}+\sigma_{2}^{2} } \mu_{1} , \frac{\sigma_{1}^{2} \sigma_{2}^{2}}{\sigma_{1}^{2}+\sigma_{2}^{2}} \right) posterior probability density function: fXY(xy)=N(p12+p22p12m2+p12+p22p22m1p12+p22p12p22)(26)From this formula, it can be clearly known that after the likelihood probability density function After correction, the standard deviation (error) of the prior probability density function can be reduced. Because σ 1 2 σ 2 2 σ 1 2 + σ 2 2 \frac{\sigma_{1}^{2} \sigma_{2}^{2}}{\sigma_{1 }^{2}+\sigma_{2}^{2}} p12+σ22p12p22 must be less than σ 1 2 \sigma_{1}^{2} p12 σ 2 2 \sigma_{2}^{2} p22

 
 

Guess you like

Origin blog.csdn.net/weixin_43013761/article/details/133847178