Solve linear system of equations by RREF.
$begingroup$
Consider a Markov chain with transition matrix
$$P=begin{bmatrix}1-a&a&0\0&1-b&b\c&0&1-cend{bmatrix},$$
where $0<a,b,c<1.$ Find the stationary distribution.
This is embarassing but somehow I struggle solving a linear system of equations. I am supposed to solve the system $vec{pi} P=vec{pi}$ for $vec{pi}.$
I get the equations
$$begin{align}(1-a)pi_1+cpi_3&=pi_1\
api_1+(1-b)pi_2 &= pi_2\
bpi_2+(1-c)pi_3&=pi_3\
pi_1+pi_2+pi_3&=1end{align}$$
ofcourse adding the last equation since the elements in a probability vector must sum to $1$. Rearranging a bit I get
begin{align}-api_1+cpi_3&=0\api_1-bpi_2&=0\bpi_2-cpi_3&=0\pi_1+pi_2+pi_3&=1,end{align}
adding (2) to (1) and then (3) to (1) leaves me with only the last equation. I'm confused. I also tried using the RREF algorithm, to no success.
linear-algebra
$endgroup$
add a comment |
$begingroup$
Consider a Markov chain with transition matrix
$$P=begin{bmatrix}1-a&a&0\0&1-b&b\c&0&1-cend{bmatrix},$$
where $0<a,b,c<1.$ Find the stationary distribution.
This is embarassing but somehow I struggle solving a linear system of equations. I am supposed to solve the system $vec{pi} P=vec{pi}$ for $vec{pi}.$
I get the equations
$$begin{align}(1-a)pi_1+cpi_3&=pi_1\
api_1+(1-b)pi_2 &= pi_2\
bpi_2+(1-c)pi_3&=pi_3\
pi_1+pi_2+pi_3&=1end{align}$$
ofcourse adding the last equation since the elements in a probability vector must sum to $1$. Rearranging a bit I get
begin{align}-api_1+cpi_3&=0\api_1-bpi_2&=0\bpi_2-cpi_3&=0\pi_1+pi_2+pi_3&=1,end{align}
adding (2) to (1) and then (3) to (1) leaves me with only the last equation. I'm confused. I also tried using the RREF algorithm, to no success.
linear-algebra
$endgroup$
add a comment |
$begingroup$
Consider a Markov chain with transition matrix
$$P=begin{bmatrix}1-a&a&0\0&1-b&b\c&0&1-cend{bmatrix},$$
where $0<a,b,c<1.$ Find the stationary distribution.
This is embarassing but somehow I struggle solving a linear system of equations. I am supposed to solve the system $vec{pi} P=vec{pi}$ for $vec{pi}.$
I get the equations
$$begin{align}(1-a)pi_1+cpi_3&=pi_1\
api_1+(1-b)pi_2 &= pi_2\
bpi_2+(1-c)pi_3&=pi_3\
pi_1+pi_2+pi_3&=1end{align}$$
ofcourse adding the last equation since the elements in a probability vector must sum to $1$. Rearranging a bit I get
begin{align}-api_1+cpi_3&=0\api_1-bpi_2&=0\bpi_2-cpi_3&=0\pi_1+pi_2+pi_3&=1,end{align}
adding (2) to (1) and then (3) to (1) leaves me with only the last equation. I'm confused. I also tried using the RREF algorithm, to no success.
linear-algebra
$endgroup$
Consider a Markov chain with transition matrix
$$P=begin{bmatrix}1-a&a&0\0&1-b&b\c&0&1-cend{bmatrix},$$
where $0<a,b,c<1.$ Find the stationary distribution.
This is embarassing but somehow I struggle solving a linear system of equations. I am supposed to solve the system $vec{pi} P=vec{pi}$ for $vec{pi}.$
I get the equations
$$begin{align}(1-a)pi_1+cpi_3&=pi_1\
api_1+(1-b)pi_2 &= pi_2\
bpi_2+(1-c)pi_3&=pi_3\
pi_1+pi_2+pi_3&=1end{align}$$
ofcourse adding the last equation since the elements in a probability vector must sum to $1$. Rearranging a bit I get
begin{align}-api_1+cpi_3&=0\api_1-bpi_2&=0\bpi_2-cpi_3&=0\pi_1+pi_2+pi_3&=1,end{align}
adding (2) to (1) and then (3) to (1) leaves me with only the last equation. I'm confused. I also tried using the RREF algorithm, to no success.
linear-algebra
linear-algebra
asked Jan 13 at 22:05
ParsevalParseval
2,9171719
2,9171719
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
Notice that $vec{pi}P = vec{pi} iff vec{pi}left(P - Iright)= vec{0}$ and evaluate $vec{pi}P$:
$
begin{bmatrix}
pi_1 & pi_2 & pi_3
end{bmatrix}
begin{bmatrix}
-a & a & 0\
0 & -b & b\
c & 0 & -c
end{bmatrix}
=
begin{bmatrix}
-api_1 + cpi_3 & api_1 - bpi_2 & bpi_2 - cpi_3
end{bmatrix}
$.
Now use that $$vec{pi}left(P - Iright)= vec{0} iff
begin{bmatrix}
-api_1 + cpi_3\ api_1 - bpi_2\ bpi_2 - cpi_3
end{bmatrix} =
begin{bmatrix}
0\ 0\ 0
end{bmatrix}.$$
Adding the first equation to the second we get the third and we can thus eliminate it:
$$vec{pi}left(P - Iright)= vec{0} iff
begin{bmatrix}
-api_1 + cpi_3\ api_1 - bpi_2
end{bmatrix} =
begin{bmatrix}
0\ 0
end{bmatrix}.$$
Next let's replace $pi_3$, our free variable, with the more neutral variable $x$:
$$begin{bmatrix}
-api_1 + cx\ api_1 - bpi_2
end{bmatrix} =
begin{bmatrix}
0\ 0
end{bmatrix}.$$
Lastly, solve: $pi_1 = frac{c}{a}x$ and $pi_2 = frac{a}{b}pi_1 = frac{c}{b}x$. Thus, your general solution is
$$vec{pi} = xbegin{bmatrix}c/a & c/b & 1end{bmatrix}.$$
$endgroup$
add a comment |
$begingroup$
Stationary distributions are left eigenvectors of $1$. Thus, they are elements of the null space of $$P^T-I = begin{bmatrix}-a&0&c \ a&-b&0 \ 0&b&-c end{bmatrix}.$$ Row-reducing this matrix results in $$begin{bmatrix}1&0&-frac ca\0&1&-frac cb \ 0&0&0end{bmatrix}$$ from which we can read that the null space is spanned by $(c/a,c/b,1)$. To get the stationary distribution $vecpi$, normalize this vector by dividing by the sum of its elements.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3072579%2fsolve-linear-system-of-equations-by-rref%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Notice that $vec{pi}P = vec{pi} iff vec{pi}left(P - Iright)= vec{0}$ and evaluate $vec{pi}P$:
$
begin{bmatrix}
pi_1 & pi_2 & pi_3
end{bmatrix}
begin{bmatrix}
-a & a & 0\
0 & -b & b\
c & 0 & -c
end{bmatrix}
=
begin{bmatrix}
-api_1 + cpi_3 & api_1 - bpi_2 & bpi_2 - cpi_3
end{bmatrix}
$.
Now use that $$vec{pi}left(P - Iright)= vec{0} iff
begin{bmatrix}
-api_1 + cpi_3\ api_1 - bpi_2\ bpi_2 - cpi_3
end{bmatrix} =
begin{bmatrix}
0\ 0\ 0
end{bmatrix}.$$
Adding the first equation to the second we get the third and we can thus eliminate it:
$$vec{pi}left(P - Iright)= vec{0} iff
begin{bmatrix}
-api_1 + cpi_3\ api_1 - bpi_2
end{bmatrix} =
begin{bmatrix}
0\ 0
end{bmatrix}.$$
Next let's replace $pi_3$, our free variable, with the more neutral variable $x$:
$$begin{bmatrix}
-api_1 + cx\ api_1 - bpi_2
end{bmatrix} =
begin{bmatrix}
0\ 0
end{bmatrix}.$$
Lastly, solve: $pi_1 = frac{c}{a}x$ and $pi_2 = frac{a}{b}pi_1 = frac{c}{b}x$. Thus, your general solution is
$$vec{pi} = xbegin{bmatrix}c/a & c/b & 1end{bmatrix}.$$
$endgroup$
add a comment |
$begingroup$
Notice that $vec{pi}P = vec{pi} iff vec{pi}left(P - Iright)= vec{0}$ and evaluate $vec{pi}P$:
$
begin{bmatrix}
pi_1 & pi_2 & pi_3
end{bmatrix}
begin{bmatrix}
-a & a & 0\
0 & -b & b\
c & 0 & -c
end{bmatrix}
=
begin{bmatrix}
-api_1 + cpi_3 & api_1 - bpi_2 & bpi_2 - cpi_3
end{bmatrix}
$.
Now use that $$vec{pi}left(P - Iright)= vec{0} iff
begin{bmatrix}
-api_1 + cpi_3\ api_1 - bpi_2\ bpi_2 - cpi_3
end{bmatrix} =
begin{bmatrix}
0\ 0\ 0
end{bmatrix}.$$
Adding the first equation to the second we get the third and we can thus eliminate it:
$$vec{pi}left(P - Iright)= vec{0} iff
begin{bmatrix}
-api_1 + cpi_3\ api_1 - bpi_2
end{bmatrix} =
begin{bmatrix}
0\ 0
end{bmatrix}.$$
Next let's replace $pi_3$, our free variable, with the more neutral variable $x$:
$$begin{bmatrix}
-api_1 + cx\ api_1 - bpi_2
end{bmatrix} =
begin{bmatrix}
0\ 0
end{bmatrix}.$$
Lastly, solve: $pi_1 = frac{c}{a}x$ and $pi_2 = frac{a}{b}pi_1 = frac{c}{b}x$. Thus, your general solution is
$$vec{pi} = xbegin{bmatrix}c/a & c/b & 1end{bmatrix}.$$
$endgroup$
add a comment |
$begingroup$
Notice that $vec{pi}P = vec{pi} iff vec{pi}left(P - Iright)= vec{0}$ and evaluate $vec{pi}P$:
$
begin{bmatrix}
pi_1 & pi_2 & pi_3
end{bmatrix}
begin{bmatrix}
-a & a & 0\
0 & -b & b\
c & 0 & -c
end{bmatrix}
=
begin{bmatrix}
-api_1 + cpi_3 & api_1 - bpi_2 & bpi_2 - cpi_3
end{bmatrix}
$.
Now use that $$vec{pi}left(P - Iright)= vec{0} iff
begin{bmatrix}
-api_1 + cpi_3\ api_1 - bpi_2\ bpi_2 - cpi_3
end{bmatrix} =
begin{bmatrix}
0\ 0\ 0
end{bmatrix}.$$
Adding the first equation to the second we get the third and we can thus eliminate it:
$$vec{pi}left(P - Iright)= vec{0} iff
begin{bmatrix}
-api_1 + cpi_3\ api_1 - bpi_2
end{bmatrix} =
begin{bmatrix}
0\ 0
end{bmatrix}.$$
Next let's replace $pi_3$, our free variable, with the more neutral variable $x$:
$$begin{bmatrix}
-api_1 + cx\ api_1 - bpi_2
end{bmatrix} =
begin{bmatrix}
0\ 0
end{bmatrix}.$$
Lastly, solve: $pi_1 = frac{c}{a}x$ and $pi_2 = frac{a}{b}pi_1 = frac{c}{b}x$. Thus, your general solution is
$$vec{pi} = xbegin{bmatrix}c/a & c/b & 1end{bmatrix}.$$
$endgroup$
Notice that $vec{pi}P = vec{pi} iff vec{pi}left(P - Iright)= vec{0}$ and evaluate $vec{pi}P$:
$
begin{bmatrix}
pi_1 & pi_2 & pi_3
end{bmatrix}
begin{bmatrix}
-a & a & 0\
0 & -b & b\
c & 0 & -c
end{bmatrix}
=
begin{bmatrix}
-api_1 + cpi_3 & api_1 - bpi_2 & bpi_2 - cpi_3
end{bmatrix}
$.
Now use that $$vec{pi}left(P - Iright)= vec{0} iff
begin{bmatrix}
-api_1 + cpi_3\ api_1 - bpi_2\ bpi_2 - cpi_3
end{bmatrix} =
begin{bmatrix}
0\ 0\ 0
end{bmatrix}.$$
Adding the first equation to the second we get the third and we can thus eliminate it:
$$vec{pi}left(P - Iright)= vec{0} iff
begin{bmatrix}
-api_1 + cpi_3\ api_1 - bpi_2
end{bmatrix} =
begin{bmatrix}
0\ 0
end{bmatrix}.$$
Next let's replace $pi_3$, our free variable, with the more neutral variable $x$:
$$begin{bmatrix}
-api_1 + cx\ api_1 - bpi_2
end{bmatrix} =
begin{bmatrix}
0\ 0
end{bmatrix}.$$
Lastly, solve: $pi_1 = frac{c}{a}x$ and $pi_2 = frac{a}{b}pi_1 = frac{c}{b}x$. Thus, your general solution is
$$vec{pi} = xbegin{bmatrix}c/a & c/b & 1end{bmatrix}.$$
answered Jan 13 at 23:49
PiKindOfGuyPiKindOfGuy
18611
18611
add a comment |
add a comment |
$begingroup$
Stationary distributions are left eigenvectors of $1$. Thus, they are elements of the null space of $$P^T-I = begin{bmatrix}-a&0&c \ a&-b&0 \ 0&b&-c end{bmatrix}.$$ Row-reducing this matrix results in $$begin{bmatrix}1&0&-frac ca\0&1&-frac cb \ 0&0&0end{bmatrix}$$ from which we can read that the null space is spanned by $(c/a,c/b,1)$. To get the stationary distribution $vecpi$, normalize this vector by dividing by the sum of its elements.
$endgroup$
add a comment |
$begingroup$
Stationary distributions are left eigenvectors of $1$. Thus, they are elements of the null space of $$P^T-I = begin{bmatrix}-a&0&c \ a&-b&0 \ 0&b&-c end{bmatrix}.$$ Row-reducing this matrix results in $$begin{bmatrix}1&0&-frac ca\0&1&-frac cb \ 0&0&0end{bmatrix}$$ from which we can read that the null space is spanned by $(c/a,c/b,1)$. To get the stationary distribution $vecpi$, normalize this vector by dividing by the sum of its elements.
$endgroup$
add a comment |
$begingroup$
Stationary distributions are left eigenvectors of $1$. Thus, they are elements of the null space of $$P^T-I = begin{bmatrix}-a&0&c \ a&-b&0 \ 0&b&-c end{bmatrix}.$$ Row-reducing this matrix results in $$begin{bmatrix}1&0&-frac ca\0&1&-frac cb \ 0&0&0end{bmatrix}$$ from which we can read that the null space is spanned by $(c/a,c/b,1)$. To get the stationary distribution $vecpi$, normalize this vector by dividing by the sum of its elements.
$endgroup$
Stationary distributions are left eigenvectors of $1$. Thus, they are elements of the null space of $$P^T-I = begin{bmatrix}-a&0&c \ a&-b&0 \ 0&b&-c end{bmatrix}.$$ Row-reducing this matrix results in $$begin{bmatrix}1&0&-frac ca\0&1&-frac cb \ 0&0&0end{bmatrix}$$ from which we can read that the null space is spanned by $(c/a,c/b,1)$. To get the stationary distribution $vecpi$, normalize this vector by dividing by the sum of its elements.
answered Jan 14 at 1:03
amdamd
30.2k21050
30.2k21050
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3072579%2fsolve-linear-system-of-equations-by-rref%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown