0
$\begingroup$

Let us have an expression for example, this:

2 (-1 + p) (3 - 4 p + 2 p^2) Boole[\[FormalX] == 1] - 9 (1 - 2 p + p^2) Boole[\[FormalX] == 2] ... 

For the whole context, it is a product of function dist = StationaryDistribution[DiscreteMarkovProcess[1, P]] // First

Now I would like to manipulate with the expression when X == 1, X == 2, etc.

Maybe it is not Mathematica idiomatical way. The result I would like to achieve in my case is a standard stationary matrix for the Markov process, so something like this.

{{dist_when_X==1, dist_when_X==2, ...}}

The solution with Simplify[dist, x==1] does not work (but not sure if it should work anyway).

$\endgroup$
  • $\begingroup$ this?P = DiscreteMarkovProcess[{1, 0, 0}, {{0, 1/2, 1/2}, {1/2, 0, 1/2}, {1/2, 1/2, 0}}]; PDF[P[t], x] // First $\endgroup$ – Xminer Oct 17 at 7:04
1
$\begingroup$

Thank you Xminer for a hint. The solution is this:

{{PDF[ DiscreteMarkovProcess[1, P][Infinity], 1],PDF[ DiscreteMarkovProcess[1,P][Infinity], 2], ...}} // MatrixForm

where P is Markov transition matrix and the second PDF argument is the value of Boole.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.