跳到主要内容

東京大学 新領域創成科学研究科 メディカル情報生命専攻 2018年8月実施 問題11

Author

zephyr

Description

Suppose that a sequence x=x1x2xn\mathbf{x} = x_1 x_2 \cdots x_n is generated from a first-order stationary Markov model that has initial probabilities {πk}\{\pi_k\} and transition probabilities {aij}\{a_{ij}\} as follows.

Initial probabilities:

P(x1=k)=πk,for k{0,1}P(x_1 = k) = \pi_k, \quad \text{for } k \in \{0, 1\}

Transition probabilities:

P(xt=jxt1=i)=aij,for i,j{0,1},t=2,,nP(x_t = j \mid x_{t-1} = i) = a_{ij}, \quad \text{for } i, j \in \{0, 1\}, \quad t = 2, \ldots, n

Note that P(X)P(X) is the probability that XX is true, and P(XY)P(X \mid Y) is the conditional probability that XX is true when YY is true.

Answer the following questions:

(1) Assume n=4n = 4. Show the probability that 101101 is included as a continuous substring in x\mathbf{x}. Show also the probability that 111111 is included as a continuous substring in x\mathbf{x}.

(2) Assume n=4n = 4. Show the expected number of 1s in x\mathbf{x} when 101101 is included as a continuous substring in x\mathbf{x}.

In the following questions, use the following transition probabilities.

a00=0.8,a01=0.2,a10=0.3,a11=0.7a_{00} = 0.8, \quad a_{01} = 0.2, \quad a_{10} = 0.3, \quad a_{11} = 0.7

(3) Calculate the expected proportion of 1s in x\mathbf{x} when nn \to \infty.

(4) Suppose that n=2mn = 2m (mm is a positive integer). When every two letters of x=x1x2x2m\mathbf{x} = x_1 x_2 \cdots x_{2m} is converted to a letter of y=y1ym\mathbf{y} = y_1 \cdots y_m using the following rule, calculate the expected proportions of a,c,g,ta, c, g, t in y\mathbf{y} when mm \to \infty.

yi={a,if x2i1=0 and x2i=0,c,if x2i1=0 and x2i=1,g,if x2i1=1 and x2i=0,t,if x2i1=1 and x2i=1,for i=1,,my_i = \begin{cases} a, & \text{if } x_{2i-1} = 0 \text{ and } x_{2i} = 0, \\ c, & \text{if } x_{2i-1} = 0 \text{ and } x_{2i} = 1, \\ g, & \text{if } x_{2i-1} = 1 \text{ and } x_{2i} = 0, \\ t, & \text{if } x_{2i-1} = 1 \text{ and } x_{2i} = 1, \\ \end{cases} \quad \text{for } i = 1, \ldots, m

假设序列 x=x1x2xn\mathbf{x} = x_1 x_2 \cdots x_n 是从一个一阶平稳马尔可夫模型生成的,该模型具有如下初始概率 {πk}\{\pi_k\} 和转移概率 {aij}\{a_{ij}\}

初始概率:

P(x1=k)=πk,对于 k{0,1}P(x_1 = k) = \pi_k, \quad \text{对于 } k \in \{0, 1\}

转移概率:

P(xt=jxt1=i)=aij,对于 i,j{0,1},t=2,,nP(x_t = j \mid x_{t-1} = i) = a_{ij}, \quad \text{对于 } i, j \in \{0, 1\}, \quad t = 2, \ldots, n

注意 P(X)P(X)XX 为真的概率,P(XY)P(X \mid Y)XXYY 为真时的条件概率。

回答以下问题:

(1) 假设 n=4n = 4。证明在 x\mathbf{x} 中包含 101101 作为连续子串的概率。也证明在 x\mathbf{x} 中包含 111111 作为连续子串的概率。

(2) 假设 n=4n = 4。证明在 x\mathbf{x} 中包含 101101 作为连续子串时 x\mathbf{x} 中 1 的期望数量。

在以下问题中,使用以下转移概率。

a00=0.8,a01=0.2,a10=0.3,a11=0.7a_{00} = 0.8, \quad a_{01} = 0.2, \quad a_{10} = 0.3, \quad a_{11} = 0.7

(3) 计算当 nn \to \inftyx\mathbf{x} 中 1 的期望比例。

(4) 假设 n=2mn = 2m (mm 是一个正整数)。当 x=x1x2x2m\mathbf{x} = x_1 x_2 \cdots x_{2m} 的每两个字母转换为 y=y1ym\mathbf{y} = y_1 \cdots y_m 的一个字母时,使用以下规则,计算 y\mathbf{y}a,c,g,ta, c, g, t 的期望比例,当 mm \to \infty 时。

yi={a,如果 x2i1=0 且 x2i=0,c,如果 x2i1=0 且 x2i=1,g,如果 x2i1=1 且 x2i=0,t,如果 x2i1=1 且 x2i=1,对于 i=1,,my_i = \begin{cases} a, & \text{如果 } x_{2i-1} = 0 \text{ 且 } x_{2i} = 0, \\ c, & \text{如果 } x_{2i-1} = 0 \text{ 且 } x_{2i} = 1, \\ g, & \text{如果 } x_{2i-1} = 1 \text{ 且 } x_{2i} = 0, \\ t, & \text{如果 } x_{2i-1} = 1 \text{ 且 } x_{2i} = 1, \\ \end{cases} \quad \text{对于 } i = 1, \ldots, m

Kai

(1)

To determine the probability of specific substrings occurring within a Markov sequence, we need to calculate the joint probabilities of these substrings appearing in the sequence.

Probability of 101101 being included

We consider all possible sequences of length 4 that include 101101 as a continuous substring:

  • 01010101
  • 10101010
  • 10111011
  • 11011101

Calculate the probabilities of these sequences:

  1. For 01010101:
P(0101)=π0a01a10a01 P(0101) = \pi_0 \cdot a_{01} \cdot a_{10} \cdot a_{01}
  1. For 10101010:
P(1010)=π1a10a01a10 P(1010) = \pi_1 \cdot a_{10} \cdot a_{01} \cdot a_{10}
  1. For 10111011:
P(1011)=π1a10a01a11 P(1011) = \pi_1 \cdot a_{10} \cdot a_{01} \cdot a_{11}
  1. For 11011101:
P(1101)=π1a11a10a01 P(1101) = \pi_1 \cdot a_{11} \cdot a_{10} \cdot a_{01}

The probability of 101101 being included is the sum of these probabilities:

P(101)=P(0101)+P(1010)+P(1011)+P(1101)=π0a01a10a01+π1a10a01a10+π1a10a01a11+π1a11a10a01P(101) = P(0101) + P(1010) + P(1011) + P(1101) = \pi_0 \cdot a_{01} \cdot a_{10} \cdot a_{01} + \pi_1 \cdot a_{10} \cdot a_{01} \cdot a_{10} + \pi_1 \cdot a_{10} \cdot a_{01} \cdot a_{11} + \pi_1 \cdot a_{11} \cdot a_{10} \cdot a_{01}
=π0a01a10a01+π1(a10a01+a11a10a01)= \pi_0 \cdot a_{01} \cdot a_{10} \cdot a_{01} + \pi_1 \cdot (a_{10} \cdot a_{01} + a_{11} \cdot a_{10} \cdot a_{01})

Probability of 111111 being included

We consider the sequences of length 4 that include 111111 as a continuous substring:

  • 01110111
  • 11101110
  • 11111111

Calculate the probabilities of these sequences:

  1. For 01110111:
P(0111)=π0a01a11a11 P(0111) = \pi_0 \cdot a_{01} \cdot a_{11} \cdot a_{11}
  1. For 11101110:
P(1110)=π1a11a11a10 P(1110) = \pi_1 \cdot a_{11} \cdot a_{11} \cdot a_{10}
  1. For 11111111:
P(1111)=π1a11a11a11 P(1111) = \pi_1 \cdot a_{11} \cdot a_{11} \cdot a_{11}

The probability of 111111 being included is the sum of these probabilities:

P(111)=P(0111)+P(1110)+P(1111)=π0a01a11a11+π1(a11a11a10+a11a11a11)P(111) = P(0111) + P(1110) + P(1111) = \pi_0 \cdot a_{01} \cdot a_{11} \cdot a_{11} + \pi_1 \cdot (a_{11} \cdot a_{11} \cdot a_{10} + a_{11} \cdot a_{11} \cdot a_{11})
=π0a01a11a11+π1a11a11= \pi_0 \cdot a_{01} \cdot a_{11} \cdot a_{11} + \pi_1 \cdot a_{11} \cdot a_{11}

(2)

Given that we need to find the expected number of 1s in the sequence x=x1x2x3x4\mathbf{x} = x_1 x_2 x_3 x_4 when the substring 101101 is included, we need to consider the sequences that include 101101.

The sequences of length 4 that include 101101 as a continuous substring are:

  • 01010101
  • 10101010
  • 10111011
  • 11011101

Let P(0101)P(0101), P(1010)P(1010), P(1011)P(1011), and P(1101)P(1101) be the probabilities of these sequences, respectively.

We will calculate the expected number of 1s by averaging the number of 1s in these sequences, weighted by their probabilities.

  1. For 01010101:
Number of 1s=2 \text{Number of 1s} = 2
  1. For 10101010:
Number of 1s=2 \text{Number of 1s} = 2
  1. For 10111011:
Number of 1s=3 \text{Number of 1s} = 3
  1. For 11011101:
Number of 1s=3 \text{Number of 1s} = 3

The expected number of 1s, E[#1s]E[\#1s], is given by:

E[#1s]=2P(0101)+2P(1010)+3P(1011)+3P(1101)P(101)E[\#1s] = \frac{2 \cdot P(0101) + 2 \cdot P(1010) + 3 \cdot P(1011) + 3 \cdot P(1101)}{P(101)}

Where P(101)P(101) is the total probability of having the substring 101101:

P(101)=P(0101)+P(1010)+P(1011)+P(1101)P(101) = P(0101) + P(1010) + P(1011) + P(1101)

Thus, the expected number of 1s is:

E[#1s]=2P(0101)+2P(1010)+3P(1011)+3P(1101)P(0101)+P(1010)+P(1011)+P(1101)E[\#1s] = \frac{2 \cdot P(0101) + 2 \cdot P(1010) + 3 \cdot P(1011) + 3 \cdot P(1101)}{P(0101) + P(1010) + P(1011) + P(1101)}

Using the given probabilities:

P(0101)=π0a01a10a01P(0101) = \pi_0 \cdot a_{01} \cdot a_{10} \cdot a_{01}
P(1010)=π1a10a01a10P(1010) = \pi_1 \cdot a_{10} \cdot a_{01} \cdot a_{10}
P(1011)=π1a10a01a11P(1011) = \pi_1 \cdot a_{10} \cdot a_{01} \cdot a_{11}
P(1101)=π1a11a10a01P(1101) = \pi_1 \cdot a_{11} \cdot a_{10} \cdot a_{01}

Substitute these probabilities into the expression for the expected number of 1s:

E[#1s]=2(π0a01a10a01)+2(π1a10a01a10)+3(π1a10a01a11)+3(π1a11a10a01)(π0a01a10a01)+(π1a10a01a10)+(π1a10a01a11)+(π1a11a10a01)E[\#1s] = \frac{2 (\pi_0 \cdot a_{01} \cdot a_{10} \cdot a_{01}) + 2 (\pi_1 \cdot a_{10} \cdot a_{01} \cdot a_{10}) + 3 (\pi_1 \cdot a_{10} \cdot a_{01} \cdot a_{11}) + 3 (\pi_1 \cdot a_{11} \cdot a_{10} \cdot a_{01})}{(\pi_0 \cdot a_{01} \cdot a_{10} \cdot a_{01}) + (\pi_1 \cdot a_{10} \cdot a_{01} \cdot a_{10}) + (\pi_1 \cdot a_{10} \cdot a_{01} \cdot a_{11}) + (\pi_1 \cdot a_{11} \cdot a_{10} \cdot a_{01})}

(3)

To find the steady-state probabilities π0\pi_0 and π1\pi_1, we solve the following system:

π0=π0a00+π1a10\pi_0 = \pi_0 a_{00} + \pi_1 a_{10}
π1=π0a01+π1a11\pi_1 = \pi_0 a_{01} + \pi_1 a_{11}
π0+π1=1\pi_0 + \pi_1 = 1

Substitute the given values:

π0=π00.8+π10.3\pi_0 = \pi_0 \cdot 0.8 + \pi_1 \cdot 0.3
π1=π00.2+π10.7\pi_1 = \pi_0 \cdot 0.2 + \pi_1 \cdot 0.7
π0+π1=1\pi_0 + \pi_1 = 1

Solving the system:

π0=35,π1=25\pi_0 = \frac{3}{5}, \quad \pi_1 = \frac{2}{5}

The expected proportion of 1s is:

π1=25=0.4\pi_1 = \frac{2}{5} = 0.4

(4)

Given the rules for yiy_i:

  • aa: x2i1=0x_{2i-1} = 0 and x2i=0x_{2i} = 0
  • cc: x2i1=0x_{2i-1} = 0 and x2i=1x_{2i} = 1
  • gg: x2i1=1x_{2i-1} = 1 and x2i=0x_{2i} = 0
  • tt: x2i1=1x_{2i-1} = 1 and x2i=1x_{2i} = 1

Calculate the steady-state probabilities for pairs:

P(00)=π0a00=350.8=0.48P(00) = \pi_0 \cdot a_{00} = \frac{3}{5} \cdot 0.8 = 0.48
P(01)=π0a01=350.2=0.12P(01) = \pi_0 \cdot a_{01} = \frac{3}{5} \cdot 0.2 = 0.12
P(10)=π1a10=250.3=0.12P(10) = \pi_1 \cdot a_{10} = \frac{2}{5} \cdot 0.3 = 0.12
P(11)=π1a11=250.7=0.28P(11) = \pi_1 \cdot a_{11} = \frac{2}{5} \cdot 0.7 = 0.28

The expected proportions are:

  • aa: P(00)=0.48P(00) = 0.48
  • cc: P(01)=0.12P(01) = 0.12
  • gg: P(10)=0.12P(10) = 0.12
  • tt: P(11)=0.28P(11) = 0.28

Knowledge

概率计算 马尔可夫链 转移概率 随机过程

重点词汇

  • Markov Model 马尔可夫模型
  • Transition Probability 转移概率
  • Steady-State 稳态

参考资料

  1. "Markov Chains: From Theory to Implementation and Experimentation" by Paul A. Gagniuc
  2. "Introduction to Probability Models" by Sheldon M. Ross