Skip to content

Commit f49798c

Browse files
committed
update indices for stochastic matrices
1 parent 84af3f8 commit f49798c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/reference-manual/transforms.qmd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -682,30 +682,30 @@ constrained to have non-negative entries that sum to one.
682682
### Definition of a Stochastic Matrix {-}
683683

684684
A column stochastic matrix \(X \in \mathbb{R}^{N \times M}\) is defined such
685-
that each column is a simplex. For column \(j\) (where \(1 \leq j \leq M\)):
685+
that each column is a simplex. For column \(m\) (where \(1 \leq m \leq M\)):
686686

687687
$$
688-
X_{i, j} \geq 0 \quad \text{for } 1 \leq i \leq N,
688+
X_{n, m} \geq 0 \quad \text{for } 1 \leq n \leq N,
689689
$$
690690

691691
and
692692

693693
$$
694-
\sum_{i=1}^N X_{i, j} = 1.
694+
\sum_{n=1}^N X_{n, m} = 1.
695695
$$
696696

697697
A row stochastic matrix is any matrix whose transpose is a column stochastic matrix
698698
(i.e. the rows of the matrix are simplexes)
699699

700700

701701
$$
702-
X_{i, j} \geq 0 \quad \text{for } 1 \leq j \leq N,
702+
X_{n, m} \geq 0 \quad \text{for } 1 \leq n \leq N,
703703
$$
704704

705705
and
706706

707707
$$
708-
\sum_{j=1}^N X_{i, j} = 1.
708+
\sum_{m=1}^N X_{n, m} = 1.
709709
$$
710710

711711
This definition ensures that each column (row) of the matrix \(X\) lies on the
@@ -719,19 +719,19 @@ as simplex, but applied to each column (row).
719719

720720
### Absolute Jacobian Determinant for the Inverse Transform {-}
721721

722-
The Jacobian determinant of the inverse transform for each column \(j\) in
723-
the matrix is given by the product of the diagonal entries \(J_{i,i,j}\) of
722+
The Jacobian determinant of the inverse transform for each column \(m\) in
723+
the matrix is given by the product of the diagonal entries \(J_{n, m}\) of
724724
the lower-triangular Jacobian matrix. This determinant is calculated as:
725725

726726
$$
727-
\left| \det J_j \right| = \prod_{i=1}^{N-1} \left( z_{i, j} (1 - z_{i, j}) \left( 1 - \sum_{i'=1}^{i-1} X_{i'j} \right) \right).
727+
\left| \det J_m \right| = \prod_{n=1}^{N-1} \left( z_{n, m} (1 - z_{n, m}) \left( 1 - \sum_{n'=1}^{n-1} X_{n', m} \right) \right).
728728
$$
729729

730730
Thus, the overall Jacobian determinant for the entire `column_stochastic_matrix` and `row_stochastic_matrix`
731731
is the product of the determinants for each column (row):
732732

733733
$$
734-
\left| \det J \right| = \prod_{j=1}^{M} \left| \det J_j \right|.
734+
\left| \det J \right| = \prod_{m=1}^{M} \left| \det J_m \right|.
735735
$$
736736

737737
### Transform for Stochastic Matrix {-}

src/reference-manual/types.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ priors for some parameters.
675675

676676
### Stochastic Matrices {-}
677677

678-
A stochastic matrix is a matrix where each column, row, or both is a
678+
A stochastic matrix is a matrix where each column or row is a
679679
unit simplex, meaning that each column (row) vector has non-negative
680680
values that sum to 1. The following example is a \(3 \times 4\)
681681
column-stochastic matrix.

0 commit comments

Comments
 (0)