0 votes

What is the stationary distribution for the following conditional probability table?

in Informed Search by AlgoMeister (1.9k points)

14 Answers

0 votes

From table, we can observe weather changes probability. In first column, we have today's weather, while in other columns tomorrow's weather probabilities given today one. For example:
If today is Sun, then tomorrow is:

  • Sun with probability 0.6
  • Cloudy with probability 0.3
  • Rain with probability 0.1  

A stationary distribution tells us the long-run probabilities of being in each weather state. But first, let's find out what happens the next day, that is:

  • P(Sun tomorrow)
  • P(Cloudy tomorrow)
  • P(Rainy tomorrow)

Let's look at P(Sun tomorrow). Tomorrow can be sunny in 3 ways:

  • if today is Sun and stays Sun (with probability 0.6)
  • if today is Cloudy and changes to Sun (with probability 0.4)
  • if today is Rain and changes to Sun (with probability 0.1)

Then we can find P(Sun tomorrow) like in below equation:

P(Sun tomorrow) = P(Sun today) * 0.6 + P(Cloud today) * 0.4 + P(Rain today) * 0.1       (1)

Now for other two conditions it becomes:

P(Cloud tomorrow) = P(Sun today) * 0.3 + P(Cloud today) * 0.2 + P(Rain today) * 0.4    (2)

P(Rainy tomorrow) = P(Sun today) * 0.1 + P(Cloud today) * 0.4 + P(Rain today) * 0.5    (3)

Now we return to the idea of a stationary distribution. It represents a situation where, after one transition, the overall probabilities do not change. In simple words, the long-run percentages of sunny, cloudy, and rainy days stay the same. Mathematically we can show stationary distribution v:

                                                               v = (x, y, z)

where, 

  • x = probability of Sun 
  • y = probability of Cloudy 
  • z = probability of Rain

From above definition of stationary distribution, mathematically we can show it as:

                                                                 vP=v

which satisfies the claim "after one transition, the distribution stays unchanged."

Now let's simplify equations (1), (2), and (3) with simplier variables x, y, z. Then equation becomes:

  • x=0.6 * x+0.4 * y+0.1 * z  --> 0.4x−0.4y−0.1z=0    (4)
  • y=0.3 * x+0.2 * y+0.4 * z --> −0.3x+0.8y−0.4z=0   (5)
  • z=0.1 * x+0.4 * y+0.5 * z --> −0.1x−0.4y+0.5z=0    (6) 

where x + y + z = 1, as all probabilities must add up to 1.

Subsituting equation:

0.4x−0.4y−0.1z=0 --> 0.4x−0.4y=0.1z --> z=4x−4y

Replace z in equation (5):

−0.3x+0.8y−0.4(4x−4y)=0 --> −1.9x+2.4y=0 --> y= (19/24)x

Replace y in z = 4x - 4y:

z=4x−4((19/24) * x) --> z=4x−(76/24)​x --> z=5/6 * ​x

Now recall that, x + y + z = 1, by probability definition. Then:

x+ (19/24) * x+(5/6) * ​x=1 --> x = 8 / 21 ~ 0.381

Now find ​y and z, by plugging x in them:

y=19/24​ * x = 19 / 63 ~ 0.302

z=5/6 * x = 20 / 63 ~ 0.317

Thus, v = (0.381, 0.302, 0.317)

ago by (188 points)
0 votes
Hi professor,

We denote the stationary distribution as:

pi = (s, c, r)

where s, c, and r represent the long-term probabilities of being in Sun, Cloudy, and Rain states.

For a stationary distribution, the probabilities remain unchanged after a transition, so we have:

pi = piP

This leads to the system:

s = 0.6s + 0.4c + 0.1r

c = 0.3s + 0.2c + 0.4r

r = 0.1s + 0.4c + 0.5r

In addition, the probabilities must sum to 1:

s + c + r = 1

We solve this system of equations to find the values of s, c, and r. After simplifying and solving, we obtain:

s = 8/21

c = 19/63

r = 20/63

Therefore, the stationary distribution is:

pi = (8/21, 19/63, 20/63)

If we express these as decimal approximations:

pi ≈ (0.3810, 0.3016, 0.3175)

So it is in Sun about 38.10 percent of the time, Cloudy about 30.16 percent, and Rain about 31.75 percent.
ago by (176 points)
0 votes

Let

π = (π_Sun, π_Cloudy, π_Rain) be the stationary distribution

We need

πP = π

π_Sun + π_Cloudy + π_Rain = 1

From the transition table

π_Sun = 0.6·π_Sun + 0.4·π_Cloudy + 0.1·π_Rain

π_Cloudy = 0.3·π_Sun + 0.2·π_Cloudy + 0.4·π_Rain

So we rewrite

0.4·π_Sun - 0.4·π_Cloudy - 0.1·π_Rain = 0

-0.3·π_Sun + 0.8·π_Cloudy - 0.4·π_Rain = 0

π_Sun + π_Cloudy + π_Rain = 1

Solve step by step

From the equations

π_Cloudy = (19/24)·π_Sun

π_Rain = (5/6)·π_Sun

Substitute into the sum

π_Sun + (19/24)π_Sun + (5/6)π_Sun = 1 = (24/24 + 19/24 + 20/24)π_Sun = 63/24 · π_Sun

So:

π_Sun = 8/21

Then

π_Cloudy = 19/63

π_Rain = 20/63

Final Answer

π = (8/21, 19/63, 20/63)

ago by (188 points)
0 votes

Let

P =
[ 0.6 0.3 0.1
0.4 0.2 0.4
0.1 0.4 0.5 ]

and let the stationary distribution be

π = (a, b, c)

for S = Sun, C = Cloudy, R = Rain.

A stationary distribution satisfies:

πP = π
a + b + c = 1

So:

a = 0.6a + 0.4b + 0.1c
b = 0.3a + 0.2b + 0.4c
c = 0.1a + 0.4b + 0.5c

Using the first two equations:

0.4a − 0.4b − 0.1c = 0 ⇒ 4a − 4b − c = 0
−0.3a + 0.8b − 0.4c = 0 ⇒ −3a + 8b − 4c = 0

Solving these gives:

b = (19/24)a
c = (5/6)a

Now use a + b + c = 1:

a + (19/24)a + (5/6)a = 1

a(1 + 19/24 + 20/24) = 1

a * (63/24) = 1 ⇒ a = 8/21

Then:

b = (19/24) * (8/21) = 19/63
c = (5/6) * (8/21) = 20/63

So the stationary distribution is:

π = (8/21, 19/63, 20/63)

Approximately:

π = (0.381, 0.302, 0.317)

So in the long run:

Sun: 38.1%
Cloudy: 30.2%
Rain: 31.7%

ago by (164 points)

Related questions

0 votes
1 answer
asked Feb 23, 2021 in MDP by amrinderarora AlgoMeister (1.9k points)
0 votes
13 answers
0 votes
1 answer
0 votes
1 answer
asked Mar 30, 2021 in MDP by amrinderarora AlgoMeister (1.9k points)
0 votes
0 answers
asked May 6, 2025 in Informed Search by amrinderarora AlgoMeister (1.9k points)
...