You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now let's verify the claims of the Perron-Frobenius Theorem for the primitive matrix B:
259
251
@@ -298,7 +290,7 @@ def check_convergence(M):
298
290
n_list = [1, 10, 100, 1000, 10000]
299
291
300
292
for n in n_list:
301
-
293
+
302
294
# Compute (A/r)^n
303
295
M_n = np.linalg.matrix_power(M/r, n)
304
296
@@ -313,8 +305,8 @@ def check_convergence(M):
313
305
A1 = np.array([[1, 2],
314
306
[1, 4]])
315
307
316
-
A2 = np.array([[0, 1, 1],
317
-
[1, 0, 1],
308
+
A2 = np.array([[0, 1, 1],
309
+
[1, 0, 1],
318
310
[1, 1, 0]])
319
311
320
312
A3 = np.array([[0.971, 0.029, 0.1, 1],
@@ -336,8 +328,8 @@ The convergence is not observed in cases of non-primitive matrices.
336
328
Let's go through an example
337
329
338
330
```{code-cell} ipython3
339
-
B = np.array([[0, 1, 1],
340
-
[1, 0, 0],
331
+
B = np.array([[0, 1, 1],
332
+
[1, 0, 0],
341
333
[1, 0, 0]])
342
334
343
335
# This shows that the matrix is not primitive
@@ -358,7 +350,7 @@ In fact we have already seen the theorem in action before in {ref}`the markov ch
358
350
(spec_markov)=
359
351
#### Example 3: Connection to Markov chains
360
352
361
-
We are now prepared to bridge the languages spoken in the two lectures.
353
+
We are now prepared to bridge the languages spoken in the two lectures.
362
354
363
355
A primitive matrix is both irreducible (or strongly connected in the language of graph) and aperiodic.
364
356
@@ -410,22 +402,22 @@ $$
410
402
411
403
This is proven in {cite}`sargent2023economic` and a nice discussion can be found [here](https://math.stackexchange.com/questions/2433997/can-all-matrices-be-decomposed-as-product-of-right-and-left-eigenvector).
412
404
413
-
In the formula $\lambda_i$ is an eigenvalue of $P$ and $v_i$ and $w_i$ are the right and left eigenvectors corresponding to $\lambda_i$.
405
+
In the formula $\lambda_i$ is an eigenvalue of $P$ and $v_i$ and $w_i$ are the right and left eigenvectors corresponding to $\lambda_i$.
414
406
415
407
Premultiplying $P^t$ by arbitrary $\psi \in \mathscr{D}(S)$ and rearranging now gives
Recall that eigenvalues are ordered from smallest to largest from $i = 1 ... n$.
413
+
Recall that eigenvalues are ordered from smallest to largest from $i = 1 ... n$.
422
414
423
415
As we have seen, the largest eigenvalue for a primitive stochastic matrix is one.
424
416
425
-
This can be proven using [Gershgorin Circle Theorem](https://en.wikipedia.org/wiki/Gershgorin_circle_theorem),
417
+
This can be proven using [Gershgorin Circle Theorem](https://en.wikipedia.org/wiki/Gershgorin_circle_theorem),
426
418
but it is out of the scope of this lecture.
427
419
428
-
So by the statement (6) of Perron-Frobenius Theorem, $\lambda_i<1$ for all $i<n$, and $\lambda_n=1$ when $P$ is primitive (strongly connected and aperiodic).
420
+
So by the statement (6) of Perron-Frobenius Theorem, $\lambda_i<1$ for all $i<n$, and $\lambda_n=1$ when $P$ is primitive (strongly connected and aperiodic).
429
421
430
422
431
423
Hence, after taking the Euclidean norm deviation, we obtain
@@ -438,7 +430,7 @@ Thus, the rate of convergence is governed by the modulus of the second largest e
438
430
439
431
440
432
(la_neumann)=
441
-
## The Neumann Series Lemma
433
+
## The Neumann Series Lemma
442
434
443
435
```{index} single: Neumann's Lemma
444
436
```
@@ -450,12 +442,12 @@ many applications in economics.
450
442
451
443
Here's a fundamental result about series that you surely know:
0 commit comments