0

P=\begin{pmatrix} 0.25 & 0.25 & 0.50 \\ 0.10 & 0.30 & 0.60\\ 0.05 & 0.15 & 0.80\\ \end{pmatrix} I know that $\vec{u}= P\vec{u}$ and we are trying to get:

$(I-P)\vec{u}=\vec{0}$

I know that $(I-P)$= \begin{pmatrix} 0.75 & -0.25 &- 0.50 \\ -0.10 & 0.70 & -0.60\\ -0.05 & -0.15 & 0.20\\ \end{pmatrix}

So know I need to find $\vec{u}$ such that :

$ \begin{pmatrix} 0.75 & -0.25 &- 0.50 \\ -0.10 & 0.70 & -0.60\\ -0.05 & -0.15 & 0.20\\ \end{pmatrix} * \begin{pmatrix} x_1 \\ x_2\\ x_3\\ \end{pmatrix} = \begin{pmatrix} 0 \\ 0\\0\\ \end{pmatrix} $

Can I make $(I-P)$ into this: \begin{pmatrix} 0.75 & -0.25 &- 0.50 &0 \\ -0.10 & 0.70 & -0.60&0\\ 1 & 1 & 1 &1\\ \end{pmatrix} and apply the gauss jordan ? I just need guidance on how to calculate the $\vec{u}$.

Thank you,

If I do the gauss-jordan on $(I-P)$ I get $\vec{u}$ = \begin{pmatrix} 1/3 \\ 1/3\\ 1/3\\ \end{pmatrix} then $(I-P)\vec{u}=\vec{0}$ so I do get 0 as a result, but I don't know if the solution is correct.

Killercamin
  • 801
  • 4
  • 17
  • 39
  • 1
    If you work with a transition matrix $P$ such that each row has sum $1$ but not the columns, you must work with line vectors. So in order to find the stationnary distribution (I guess that is what you are asked to do), you must solve $u=uP$ instead. To do it, you can recall that if $P$ is a positive matrix, then, for all $\mu$, $\mu P^n$ converges to the stationnary distribution as $n \to \infty$. – nicomezi Mar 08 '19 at 19:29
  • Using R, ( and researching about stationary distribution), I was able to get a code that went like this. solve(matrix(c(-.25, .10, .05, .25, -.3, .15, 1, 1, 1), nrow=3, byrow =T), c(0,0,1)). Which gave me that $x_1=0.2307692, x_2 =0.3846154, x_3= 0.3846154$. I don't know if this is right, if it's I still want to learn how to do computation. – Killercamin Mar 08 '19 at 19:45
  • If you want an approximation of the solution using R, you can just compute $P^n$ for large $n$ and multiply the vector $(1,0,0)$ by $P^n$. – nicomezi Mar 08 '19 at 19:50
  • For some reason i'm not getting the same solution as in R, by any chance can you set up one matrix so I can see the process? – Killercamin Mar 08 '19 at 19:56

1 Answers1

1

Assume that the transition matrix shows the percent of customers of $A,B,C$ visiting next time. $$P=\begin{pmatrix} P_{AA} & P_{AB} & P_{AC} \\ P_{BA} & P_{BB} & P_{BC}\\ P_{CA} & P_{CB} & P_{CC}\\ \end{pmatrix}=\begin{pmatrix} 0.25 & 0.25 & 0.50 \\ 0.10 & 0.30 & 0.60\\ 0.05 & 0.15 & 0.80\\ \end{pmatrix}.$$ Now you want to find the steady state: $$x_n=x_{n-1}P \Rightarrow x=xP \Rightarrow x(I-P)=0 \Rightarrow \\ \begin{pmatrix}x_1&x_2&x_3\end{pmatrix}\begin{pmatrix} \ \ \ 0.75 & -0.25 & -0.50 \\ -0.10 & \ \ \ 0.70 & -0.60\\ -0.05 & -0.15 & \ \ \ 0.20\\ \end{pmatrix}=0\\ \begin{cases} 0.75x_1-0.1x_2-0.05x_3=0\\ -0.25x_1+0.7x_2-0.15x_3=0\\ x_1+x_2+x_3=1\end{cases} \Rightarrow \\ \begin{pmatrix}x_1&x_2&x_3\end{pmatrix}=\begin{pmatrix}\frac2{27}&\frac5{27}&\frac{20}{27}\end{pmatrix}.$$

farruhota
  • 31,482