Andy Lange, President of the University of South Wisconsin, is concerned with de
ID: 3109880 • Letter: A
Question
Andy Lange, President of the University of South Wisconsin, is concerned with declining business at the University Book Store. The students tell him that the prices are simply too high, and thus they are switching to private bookstore options (Bill's, College, Battle's). Andy, however, has decided not to lower the prices. If the same condition exist, what long-run market shares can Andy expect for the four bookstores based on the matrix of transition probabilities?
University Bill's College Battle's University 0.6 .2 .1 .1 Bill's 0 .7 .2 .1 College 0.1 .1 .8 0 Battle's .05 .05 .1 .8Explanation / Answer
n mathematical terms we want to solve a system of the form:
(P - I) x = 0
subject to the constraint:
x1 + x2 + ... + xn = 1
This last simply adds an additional row to our "matrix equation", so
an appropriate Matlab expression can be constructed using the ""
operator to request the solution of a matrix.
Let's assume that P is a square matrix and already has the
coefficients (transition probabilities) for the given Markov chain.
Then we can run:
> [P - eye(size(P)); ones(1,columns(P))] [zeros(rows(P),1); 1]
which will solve the system of equations above and provide the
components of x as a "column" result.
A brief explanation of this command is as follows:
eye(size(P)) is an identity matrix of the same "shape" as P. After
subtracting off those diagonal entries from P, we have (within the
limits of numerical rounding) a singular matrix P - I.
The "" operator solves a linear system. For example:
> A b
would ask for the solution x of a matrix equation Ax = b. The
solution is obtained without "inverting" the matrix A, so it can
applied (as we did above) to cases in which the matrix is not
invertible.
Here the matrix equation we are solving can be described in block form
as:
[ x_1 ] [ 0 ]
[ (P - I) ] [ x_2 ] = [ 0 ]
[ 1 1 ... 1 ] [ ... ] [...]
[ x_n ] [ 0 ]
[ 1 ]
and the "matrix construction" expression given above reproduces this
faithfully with the use of utility functions zeros(j,k) and ones(j,k)
for submatrices of j rows and k columns that contain all zero or all
one entries, respectively.
If rounding errors are a problem, then a slightly fancier matrix
formulation can be tried. Add a "slack variable" y to the "solution"
vector x, and consider:
[ (P - I) | U' ] [ x ] = [ 0 ]
[ U | 0 ] [ y ] [ 1 ]
where U = [1,1,...,1] is a row of all ones, the same length as rows of
P, and U' is written for transpose of U. We would construct the
"bordered" matrix shown here as follows:
> Q = [P - eye(size(P)), ones(rows(P),1); ones(1,columns(P)), 0]
Solve the new system like this:
> Q [zeros(rows(P),1); 1]
Ideally the extra value y turns out to be exactly zero, but in
practice for larger systems the value y will only be "nearly zero" and
gives a sense of the influence of rounding errors on the solution x.