SchoolWork-LaTeX/随机过程/平时作业/第十二周作业.tex
423A35C7 5906ac1efc 重构目录层次
0-课程笔记
1-平时作业
2-实验报告
3-期末大作业
2024-09-02 18:32:58 +08:00

175 lines
7.1 KiB
TeX
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

\documentclass[全部作业]{subfiles}
\input{mysubpreamble}
\begin{document}
\setcounter{chapter}{4}
\setcounter{section}{1}
\section{练习题\thesection}
\begin{enumerate}
\questionandanswerProof[1]{
$\{ (X_n,Y_n)\ ;\ n\geqslant 0 \}$是隐马氏链,其中$\{ X_n\ ;\ n\geqslant 0 \}$, $\{ Y_n\ ;\ n\geqslant 0 \}$分别是状态序列和观察序列,证明对任意$n\geqslant 0 m\geqslant 1$
$$
\begin{aligned}
&P\left( Y_{n+k}=j_{n+k}, 1\leqslant k\leqslant m|X_n=i, Y_l=j_l , 0\leqslant l\leqslant n \right) \\
=&P\left( Y_{n+k}=j_{n+k}, 1\leqslant k\leqslant m | X_n=i \right) \\
\end{aligned}
$$
}{
设状态空间为$S$,转移概率矩阵为$(p_{ij})$,观测概率矩阵为$(q_{jk})$,则
$$
\begin{aligned}
&P\left( Y_{n+k}=j_{n+k}, 1\leqslant k\leqslant m|X_n=i, Y_l=j_l , 0\leqslant l\leqslant n \right) \\
=&\sum_{x \in S} p_{i, x}^{(k)} q_{x, j_{n+k}} \\
=&P\left( Y_{n+k}=j_{n+k}, 1\leqslant k\leqslant m | X_n=i \right) \\
\end{aligned}
$$
}
\questionandanswerSolution[2]{
假设例4.2.1中产品的质量分为1合格和0不合格。在机器状态为1时产品质量为0,1的概率分别为0.05,0.95而在机器状态为2时产品质量为0,1的概率分别为0.5,0.5。假设在产品检测的间隔时间内机器状态转移概率为
$$
p_{1,1} = 0.9, \ p_{1,2}=0.1,\ p_{2,1} =0, p_{2,2}=1
$$
若初始机器状态为1求第4次检测才首次检测到不合格产品的概率并在此条件下计算第5次抽到合格品的概率。
}{
设状态序列为$X$,观测序列为$Y$,则$Z=(X,Y)$构成隐马尔科夫过程,初始状态$X_0=1$。由题意可得
$$
\begin{tabular}{c|cc}
P & 1 & 2 \\
\hline
1 & 0.9 & 0.1 \\
2 & 0 & 1 \\
\end{tabular}
\qquad
\begin{tabular}{c|cc}
Q & 0 & 1 \\
\hline
1 & 0.05 & 0.95 \\
2 & 0.5 & 0.5 \\
\end{tabular}
\qquad
\begin{tabular}{c|cc}
\pi & 1 & 2 \\
\hline
P & 0.9 & 0.1 \\
\end{tabular}
$$
第4次检测才首次检测到不合格产品即观测序列为1110。由于$p_{2,1}=0$所以可以直接不考虑状态序列的2后跟着1的情况。所以计算的概率如下表所示
$$
\begin{tabular}{cc}
\toprule
\diagbox{X}{Y} & 1110 \\
\midrule
1111 & 0.9\times 0.95\times 0.9\times 0.95\times 0.9\times 0.95\times 0.9\times 0.05 = 0.028126186875 \\
1112 & 0.9\times 0.95\times 0.9\times 0.95\times 0.9\times 0.95\times 0.1\times 0.5 = 0.03125131875\\
1122 & 0.9\times 0.95\times 0.9\times 0.95\times 0.1\times 0.5\times 1\times 0.5 = 0.018275625\\
1222 & 0.9\times 0.95\times 0.1\times 0.5\times 1\times 0.5\times 1\times 0.5 = 0.0106875\\
2222 & 0.1\times 0.5\times 1\times 0.5\times 1\times 0.5\times 1\times 0.5 = 0.00625\\
\midrule
\sum & 0.028126186875+0.03125131875+0.018275625+0.0106875+0.00625 = 0.094590630625 \\
\bottomrule
\end{tabular}
$$
所以第4次检测才首次检测到不合格产品的概率为$\mathbf{0.094590630625}$
在此条件下计算第5次抽到合格品的概率则根据马氏链的性质先计算
$$
P(X_4=1) = 0.028126186875
$$
$$
P(X_4=2) = 0.03125131875+0.018275625+0.0106875+0.00625 = 0.06646444375
$$
则从第4次开始计算初始分布变为
$$
\begin{tabular}{c|cc}
\pi & 1 & 2 \\
\hline
P & 0.028126186875 & 0.06646444375 \\
\end{tabular}
$$
所以可以继续计算第4和第5步的概率由于已经确定了$Y_4=0$,所以不需要乘$q_{1,0}$$q_{2,0}$
$$
\begin{tabular}{cc}
\toprule
\diagbox{X}{Y} & 01 \\
\midrule
11 & 0.028126186875\times 0.9\times 0.95 = 0.024047889778125 \\
12 & 0.028126186875\times 0.1\times 0.5 = 0.00140630934375 \\
22 & 0.06646444375\times 1\times 0.5 = 0.033232221875 \\
\midrule
\sum & 0.024047889778125 + 0.00140630934375 + 0.033232221875 = 0.058686420996875 \\
\bottomrule
\end{tabular}
$$
所以在此条件下第5次抽到合格品的概率为$\mathbf{0.058686420996875}$
}
\questionandanswerSolution[4]{
在例4.2.5设定下若前3天价格波动恰为$Y_0=1, Y_1=0, Y_2=-1$,求$X_2$的分布,并预测$X_3$最可能的取值。
}{
已知$Z_n=(X_n,Y_n)$为隐马氏链,
$$
\begin{tabular}{c|cc}
P & -1 & 1 \\
\hline
-1 & 0.75 & 0.25 \\
1 & 0.2 & 0.8 \\
\end{tabular}
\qquad
\begin{tabular}{c|ccc}
Q & -1 & 0 & 1 \\
\hline
-1 & 0.6 & 0.2 & 0.2 \\
1 & 0.2 & 0.3 & 0.5 \\
\end{tabular}
\qquad
\begin{tabular}{c|cc}
\pi & -1 & 1 \\
\hline
P & 0.2 & 0.1 \\
\end{tabular}
$$
$X_0,X_1,X_2$的取值分情况讨论,得下表:
$$
\begin{tabular}{c|c}
(a,b,c) & P(X_0=a,Y_0=1,X_1=b,Y_1=0,X_2=c,Y_2=-1) \\
\hline
(1,1,1) & 0.8\times 0.5\times 0.8\times 0.3\times 0.8\times 0.2 = 0.01536 \\
(1,1,-1) & 0.8\times 0.5\times 0.8\times 0.3\times 0.2\times 0.6 = 0.01152 \\
(1,-1,1) & 0.8\times 0.5\times 0.2\times 0.2\times 0.25\times 0.2 = 0.0008 \\
(1,-1,-1) & 0.8\times 0.5\times 0.2\times 0.2\times 0.75\times 0.6 = 0.0072 \\
(-1,1,1) & 0.2\times 0.2\times 0.25\times 0.3\times 0.8\times 0.2 = 0.00048 \\
(-1,1,-1) & 0.2\times 0.2\times 0.25\times 0.3\times 0.2\times 0.6 = 0.00036 \\
(-1,-1,1) & 0.2\times 0.2\times 0.75\times 0.2\times 0.25\times 0.2 = 0.0003 \\
(-1,-1,-1) & 0.2\times 0.2\times 0.75\times 0.2\times 0.75\times 0.6 = 0.0027 \\
\end{tabular}
$$
$X_2$的情况提取出来可以计算得
$$
P(Y_0=1,Y_1=0,X_2=1,Y_2=-1)=0.01536+0.0008+0.00048+0.0003 = 0.01694
$$
$$
P(Y_0=1,Y_1=0,X_2=-1,Y_2=-1)=0.01152+0.0072+0.00036+0.0027 = 0.02178
$$
所以
$$
\begin{aligned}
&P(\mathbf{X_2=1}|Y_0=-1,Y_1=0,Y_2=-1) = \frac{P(Y_0=1,Y_1=0,X_2=1,Y_2=-1)}{P(Y_0=-1,Y_1=0,Y_2=-1)} \\
&=\frac{0.01694}{0.01694+0.02178} = \mathbf{0.4375} \\
\end{aligned}
$$
所以$P(\mathbf{X_2=-1}|Y_0=1,Y_1=0,Y_2=-1)=1-0.4375 = \mathbf{0.5625}$\\
即为$X_2$的分布。
$P'(\cdot )=P(\cdot |Y_0=1,Y_1=0,Y_2=-1)$,则由于$X_n$是马氏链,可得
$$
P'(X_3=1)=P'(X_2=1)p_{1,1}+P'(X_2=-1)p_{-1,1} = 0.4375\times 0.8+0.5625\times 0.25 = 0.490625
$$
$$
P'(X_3=-1)=P'(X_2=1)p_{1,-1}P'(X_2=-1)p_{-1,-1}=0.4375\times 0.2+0.5625\times 0.75 = 0.509375
$$
所以$X_3$最可能的取值为$\mathbf{-1}$
}
\end{enumerate}
\end{document}