This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Connecting Tables with Allowing Negative Cell Counts

Ruriko Yoshida    David Barnhill
Abstract

It is well-known that computing a Markov basis for a discrete loglinear model is very hard in general. Thus, we focus on connecting tables in a fiber via a subset of a Markov basis and in this paper, we consider connecting tables if we allow cell counts in each tale to be 1-1. In this paper we show that if a subset of a Markov basis connects all tables in the fiber which contains a table with all ones, then moves in this subset connect tables in the fiber if we allow cell counts to be 1-1. In addition, we show that in some cases under the no-three-way interaction model, we can connect tables by all basic moves of 2×2×22\times 2\times 2 minors with allowing Xijk1X_{ijk}\geq-1. We then apply this Markov Chain Monte Carlo (MCMC) scheme to an empirical data on Naval officer and enlisted population. Our computational experiments show it works well and we end with the conjecture on the no-three-way interaction model.

1 Introduction

Conducting the goodness of fit test for discrete exponential family models with sparse contingency tables is a challenging task since we cannot use asymptotic methods, especially when we have large tables. To do so, one applies sampling procedures, such as Markov Chain Monte Carlo (MCMC) procedures, from the state space [BC89, CDHL05, DE85, GT92].

Even though Besag and Clifford argued that irreducibility of a Markov chain is not essential in [BC89], that view is not conventional since it is very difficult to understand a chain over sparse tables in high dimensions. To understand the irreducibility of a Markov chain over the set of all possible contingency tables with given constraints, Diaconis and Sturmfels introduced a notion of a Markov basis [DS98]. Diaconis and Sturmfels showed that a Markov basis, a generating set of a toric ideal associated with the design matrix for a discrete exponential family model, is the set of moves which guarantee to connect all tables for the given model [DS98]. The most significant benefit in computing a Markov basis for a discrete exponential family model is that if we have a Markov basis for the model, we do not have to re-compute it since moves in a Markov basis connect all tables for any observed tables under the model. However, it is computationally expensive to compute a Markov basis in terms of the dimension of a table. In fact, [DO05] showed that the number of elements in a Markov basis for the no-three-way interaction model can be arbitrarily large. This means that it is not feasible to compute a Markov basis for large tables under the no-three-way interaction model. Then, Hara et al. conducted study of employing MCMC with a lattice basis which is much easier to compute than a Markov basis [HAT11]. However, with a lattice basis, we cannot guarantee that a chain is connected so that the estimated distribution of statistics might be biased.

To try to circumvent the difficulty of computing a Markov basis which may be large, [CDDH05, BB00] studied computing a smaller set of moves, such as a lattice basis, by allowing cell counts of the contingency table to be negative one (1-1). Motivated by their work, in this paper, we consider cases when we can connect a Markov chain if we allow cell counts to be 1-1 including some cases on the no-three-way interaction model with the basic moves.

A basic move of a 2×2×22\times 2\times 2 minor for the no-three-way interaction model is a I×J×KI\times J\times K contingency table with {0,±1}\{0,\pm 1\} entries such that for distinct i,i{1,,I}i,i^{\prime}\in\{1,\ldots,I\}, distinct j,j{1,,J}j,j^{\prime}\in\{1,\ldots,J\}, and distinct k,k{1,,K}k,k^{\prime}\in\{1,\ldots,K\},

i\displaystyle i jjk11k11\displaystyle\begin{array}[]{|c||c|c|}\hline\cr&j&j^{\prime}\\ \hline\cr\hline\cr k&1&-1\\ \hline\cr k^{\prime}&-1&1\\ \hline\cr\end{array}
i\displaystyle i^{\prime} jjk11k11\displaystyle\begin{array}[]{|c||c|c|}\hline\cr&j&j^{\prime}\\ \hline\cr\hline\cr k&-1&1\\ \hline\cr k^{\prime}&1&-1\\ \hline\cr\end{array}

and all zeros otherwise. In 2018, Lee showed that if I=3I=3, J=3J=3, and K2K\geq 2, then basic moves connect all tables if we allow cell counts XijkX_{ijk} to be 1-1 when we run a Markov chain. For I>3I>3, J>3J>3, and K2K\geq 2, it is still an open problem that basic moves connect all tables if we allow cell counts XijkX_{ijk} to be 1-1 when we run a Markov chain.

The contribution of this paper is the following:

  • We show that under a fixed model, if a set of moves MM connects all tables in a sample space, the set of all tables with fixed margins, which contains a table with all cell counts equal to 11, then MM connects all tables in a sample space with any fixed margins if we allow cell counts to be 1-1.

  • We show that under the no-three-way interaction model, the set of basic moves of 2×2×22\times 2\times 2 minors connects tables in a sample space with a fixed margins if we allow cell counts to be 1-1 in the case of I=2I=2. Then we also show that the set of basic moves connects all tables in the sample space with any fixed margins if we allow cell counts to be 1-1 for I=3I=3 and J=4J=4.

  • We apply our result to the Navy personnel dataset obtained from U.S. NAVY DEMOGRAPHIC DATA, 2022.

This paper is organized as follows: In Section 2, we set up basics for our results in this paper. Then, in Section 3, we show some theoretical conditions allowing us to connect all tables in the given fiber with a subset of a Markov basis if we allow cell counts to be 1-1. Additionally, we show cases of the three way contingency tables under the no-three-way interaction model that we can connect tables in the fiber by a set of all basic moves while allowing cell counts to be 1-1. Then we apply our hybrid scheme, that is, a Markov chain with a set of basic moves by allowing cell counts to be negative one combined with SA to an empirical data on U.S. Navy (USN) personnel in Section 5. We end with discussion and open problems.

2 Preliminaries

In this section we set up some basic notation and definitions for our results in this paper.

Let Am×dA\in\mathbb{Z}^{m\times d} and bmb\in\mathbb{Z}^{m}. We define bb-fiber of AA is

A,b:={u0d:Au=b}.\mathcal{F}_{A,b}:=\{u\in\mathbb{Z}_{\geq 0}^{d}:Au=b\}.

For a finite kerAn\mathcal{M}\subset\ker A\cap\mathbb{Z}^{n}, we define the fiber graph 𝒢(A,b,)\mathcal{G}(\mathcal{F}_{A,b},\mathcal{M}) of AA as graph having the bb-fiber as its vertex set and the set

{(u,v):u,vA,b,(uv)±}\{(u,v):u,v\in\mathcal{F}_{A,b},\,(u-v)\in\pm\mathcal{M}\}

as its edge set.

Definition 1.

We fix a matrix Am×dA\in\mathbb{Z}^{m\times d}. We call kerAn\mathcal{M}\subset\ker A\cap\mathbb{Z}^{n} as a Markov basis for a matrix AA if the fiber graph 𝒢(A,b,)\mathcal{G}(\mathcal{F}_{A,b},\mathcal{M}) of AA is connected for any bmb\in\mathbb{Z}^{m}.

In this paper, we focus on assessing interaction between three discrete random variables X,Y,ZX,\,Y,\,Z with finite levels, where X{1,,I}X\in\{1,\ldots,I\}, Y{1,,J}Y\in\{1,\ldots,J\}, and Z{1,,K}Z\in\{1,\ldots,K\} for I,J,KI,\,J,\,K\in\mathbb{N}. In order to conduct statistical analysis on such interactions, a commonly used model is called a log linear model. A log linear model is a generalized linear model and it forms a class of discrete exponential family.

Definition 2.

Suppose Am×dA\in\mathbb{Z}^{m\times d} be a non-negative integral matrix such that

i=1mai1==i=1maid\sum_{i=1}^{m}a_{i1}=\ldots=\sum_{i=1}^{m}a_{id}

where aija_{ij} is the (i,j)(i,j)th element of the matrix AA. If its likelihood function L(θ|𝐧)L(\theta|\bf{n}) for an observation 𝐧\bf{n} can be written as

L(θ|𝐧)=cθA𝐧L(\theta|\mathbf{n})=c\cdot\theta^{\;A\bf{n}}

where cc is a normalized constant, then the model is called a log linear model and we call such matrix AA as the design matrix for a model.

Applying the notation of the log-linear model notation to the three-way contingency table, we have the parameterization nijkPois(μijk)n_{ijk}\sim Pois(\mu_{ijk}), the Poisson distribution with the parameter μijk\mu_{ijk}, such that:

log(μijk)=λ+λiX+λjY+λkZ+λijXY+λikXZ+λjkYZ+λijkXYZ.\log(\mu_{ijk})=\lambda+\lambda_{i}^{X}+\lambda_{j}^{Y}+\lambda_{k}^{Z}+\lambda_{ij}^{XY}+\lambda_{ik}^{XZ}+\lambda_{jk}^{YZ}+\lambda_{ijk}^{XYZ}.

If we assume there is no interaction between three categorical variables, namely,

λijkXYZ=0,\lambda_{ijk}^{XYZ}=0,

for all i=1,,Ii=1,\ldots,I, j=1,,Jj=1,\ldots,J, and k=1,,Kk=1,\ldots,K, then we call this model the no-three-way interaction model.

It is easy to show that under the no-three-way interaction model, we have the bb-fiber of AA with a given observed table 𝐧{\bf n} is

A,b:={𝐮|i=1muijk=i=1mnijk,j=1nuijk=j=1nnijk,k=1luijk=k=1lnijk}=:{u+IJK|Au=b},\mathcal{F}_{A,b}:=\left\{{\bf u}\Big{|}\sum_{i=1}^{m}u_{ijk}=\sum_{i=1}^{m}n_{ijk},\,\sum_{j=1}^{n}u_{ijk}=\sum_{j=1}^{n}n_{ijk},\,\sum_{k=1}^{l}u_{ijk}=\sum_{k=1}^{l}n_{ijk}\right\}=:\{u\in\mathbb{Z}^{IJK}_{+}|Au=b\},

where nijkn_{ijk} is the cell count for the (i,j,k)(i,j,k)th cell in 𝐧{\bf n}.

Example 3.

Suppose we have a 2×2×22\times 2\times 2 table such that

X111X112X121X122X211X212X221X222.\begin{array}[]{|c|c|}\hline\cr X_{111}&X_{112}\\ \hline\cr X_{121}&X_{122}\\ \hline\cr\end{array}\ \ \begin{array}[]{|c|c|}\hline\cr X_{211}&X_{212}\\ \hline\cr X_{221}&X_{222}\\ \hline\cr\end{array}.

The the design matrix under the no-three-way interaction model is

A=(110000000011000000001100000000111010000001010000000010100000010110001000010001000010001000010001).A=\left(\begin{array}[]{cccccccc}1&1&0&0&0&0&0&0\\ 0&0&1&1&0&0&0&0\\ 0&0&0&0&1&1&0&0\\ 0&0&0&0&0&0&1&1\\ 1&0&1&0&0&0&0&0\\ 0&1&0&1&0&0&0&0\\ 0&0&0&0&1&0&1&0\\ 0&0&0&0&0&1&0&1\\ 1&0&0&0&1&0&0&0\\ 0&1&0&0&0&1&0&0\\ 0&0&1&0&0&0&1&0\\ 0&0&0&1&0&0&0&1\\ \end{array}\right).

Then, suppose we have a 2×2×22\times 2\times 2 table such that

11111111.\begin{array}[]{|c|c|}\hline\cr 1&1\\ \hline\cr 1&1\\ \hline\cr\end{array}\ \ \begin{array}[]{|c|c|}\hline\cr 1&1\\ \hline\cr 1&1\\ \hline\cr\end{array}.

Then the vector of margins is

b=(2,2,2,2,2,2,2,2,2,2,2,2)T,b=(2,2,2,2,2,2,2,2,2,2,2,2)^{T},

where xTx^{T} is the transpose of a vector xmx\in\mathbb{R}^{m}.

Now we define a basic move.

Definition 4.

Let mm be a I×J×KI\times J\times K table such that

i\displaystyle i jjk11k11\displaystyle\begin{array}[]{|c||c|c|}\hline\cr&j&j^{\prime}\\ \hline\cr\hline\cr k&1&-1\\ \hline\cr k^{\prime}&-1&1\\ \hline\cr\end{array}
i\displaystyle i^{\prime} jjk11k11\displaystyle\begin{array}[]{|c||c|c|}\hline\cr&j&j^{\prime}\\ \hline\cr\hline\cr k&-1&1\\ \hline\cr k^{\prime}&1&-1\\ \hline\cr\end{array}

where 1i,iI, 1j,jJ, 1k,kK1\leq i,i^{\prime}\leq I,\,1\leq j,j^{\prime}\leq J,\,1\leq k,k^{\prime}\leq K, iii\not=i^{\prime}, jjj\not=j^{\prime}, and kkk\not=k^{\prime}, and other cells are all zero. We call mm a basic move. We denote this table mm as (i,i;j,j;k,k)(i,i^{\prime};j,j^{\prime};k,k^{\prime}).

3 Connectivity of a Markov Chain via Subset of Markov Basis

In this section, we show the main result for the connectivity of a Markov chain if we allow cell counts to drop to 1-1.

theorem 5.

Suppose AA is a 010-1 matrix and suppose we have a set of moves MM such that moves in MM connect all points in the fiber A,A𝕀\mathcal{F}_{A,A{\mathbb{I}}}, where 𝕀=(1,,1)\mathbb{I}=(1,\ldots,1) the vector with all ones. Suppose A,b\mathcal{F}_{A,b} contains a point x0:=(x10,,xn0)x^{0}:=(x^{0}_{1},\ldots,x^{0}_{n}) such that xi01x^{0}_{i}\geq 1 for i=1,,ni=1,\ldots,n. Then moves in MM connect all points in A,b\mathcal{F}_{A,b}.

Proof.

Let

IM=xm+xm:mM.I_{M}=\langle x^{m_{+}}-x^{m_{-}}:m\in M\rangle.

Let b:=A𝕀b^{\prime}:=A\mathbb{I}. Let Im:=xkAm,nI_{m}:=\langle x_{k}\rangle_{A_{m},n} be the monomial ideal generated by all the indeterminates for the cells that contribute to a margin mm and let IMb=xi1xi2xibAm,ikI^{b^{\prime}}_{M}=\langle x_{i_{1}}x_{i_{2}}\ldots x_{i_{b^{\prime}}}\rangle_{A_{m},i_{k}}. Suppose u,vA,bu,v\in\mathcal{F}_{A,b^{\prime}}. Then since AA is a 010-1 matrix, each monomial xux^{u} and xvx^{v} are in ImbI^{b^{\prime}}_{m}. Since all moves in MM connect all points in A,b=A𝕀\mathcal{F}_{A,b^{\prime}=A{\mathbb{I}}},

AmImbIM.\mathcal{I}_{A}\cap\bigcap_{m}I^{b^{\prime}}_{m}\subset I_{M}.

Then we apply Proposition 0.4.1 in [CDY09b]. ∎

Then we have our main theorem.

theorem 6.

Suppose AA is a 010-1 matrix and suppose we have a set of moves MM such that moves in MM connect all points in the fiber A,A𝕀\mathcal{F}_{A,A{\mathbb{I}}}, where 𝕀=(1,,1)\mathbb{I}=(1,\ldots,1) the vector with all ones. Consider a contingency table X0nX\in\mathbb{Z}_{\geq 0}^{n}. We assume that (bA𝕀n)0(b-A\mathbb{I}_{n})\geq 0, where AA is the design matrix for a given model for contingency tables, and bb is a vector of the margins. If we allow Xi1X_{i}\geq-1, then all moves in MM connect all tables in A,b{\mathcal{F}}_{A,b}.

Proof.

We consider the fiber

¯A,b:={un:Au=b,u𝕀n}={u+𝕀n0n:A(u+𝕀n)=b}={u0n:Au=(bA𝕀n)}.\begin{array}[]{ccc}\bar{\mathcal{F}}_{A,b}&:=&\{u\in\mathbb{Z}^{n}:Au=b,\,u\geq-\mathbb{I}_{n}\}\\ &=&\{u+\mathbb{I}_{n}\in\mathbb{Z}_{\geq 0}^{n}:A(u+\mathbb{I}_{n})=b\}\\ &=&\{u\in\mathbb{Z}_{\geq 0}^{n}:Au=(b-A\mathbb{I}_{n})\}.\\ \end{array}

Since we have (bA𝕀n)0(b-A\mathbb{I}_{n})\geq 0, this means that bA𝕀nb\geq A\mathbb{I}_{n}, Then we apply Theorem 5. ∎

We apply Theorem 6 to the no-three-way interaction model.

Proposition 7.

Consider the design matrix for three-way contingency tables under the no-three-way interaction model. suppose we have a set of moves MM such that moves in MM connect all tables in the fiber which contains the table with all cell counts equal to one. Then, if we allow Xijk1X_{ijk}\geq-1 for all i=1,,Ii=1,\ldots,I, j=1,,Jj=1,\ldots,J, and k=1,,Kk=1,\ldots,K, then M connects all tables in the fiber.

Proof.

We simply apply Theorem 6. ∎

Note that we cannot apply Proposition 7 to the set of all basic moves since the set of basic moves does not connect tables in the fiber which contains a table with all ones. As an example, we consider the case of I=J=K=3I=J=K=3. Suppose we have a 3×3×33\times 3\times 3 table such that

300030003030003300003300030.\begin{array}[]{|c|c|c|}\hline\cr 3&0&0\\ \hline\cr 0&3&0\\ \hline\cr 0&0&3\\ \hline\cr\end{array}\ \ \begin{array}[]{|c|c|c|}\hline\cr 0&3&0\\ \hline\cr 0&0&3\\ \hline\cr 3&0&0\\ \hline\cr\end{array}\ \ \begin{array}[]{|c|c|c|}\hline\cr 0&0&3\\ \hline\cr 3&0&0\\ \hline\cr 0&3&0\\ \hline\cr\end{array}.

Then note that the set of basic moves does not connect this table to any other tables with the same margins. However, we can show that if we allow cell counts to be 1-1, then we can connect this table to other tables in the fiber A,b\mathcal{F}_{A,b} [Lee06]. Therefore, in the next section, we consider some cases which we can connect three-way contingency tables under the no-three-way interaction model with the set of basic moves by allowing cell counts to be 1-1.

4 Connecting I×J×KI\times J\times K Tables with Basic Moves

In this section, we consider three-way I×J×KI\times J\times K tables under the no-three-way interaction model with the set of basic moves.

Note that, by Lemma 12.2 in [Stu96], for some positive integer tt, if we allow XijktX_{ijk}\geq-t, then all moves in MM connect all tables in A,b\mathcal{F}_{A,b} for a three way I×J×KI\times J\times K contingency table XijkX_{ijk} under the no-three way interaction model.

Remark 8.

Suppose 𝐛=𝐛+𝐛{\bf b}={\bf b}_{+}-{\bf b}_{-} is in a Markov basis for a matrix AA. If we can show that a set of basic moves connect from 𝐛+{\bf b}_{+} and 𝐛{\bf b}_{-} for any move 𝐛=𝐛+𝐛{\bf b}={\bf b}_{+}-{\bf b}_{-} in a Markov basis by allowing cell counts to be negative one, then basic moves connect all tables in A,b\mathcal{F}_{A,b} for any b0mb\in\mathbb{Z}^{m}_{\geq 0} by allowing cell counts to be 1-1.

Example 9.

First we consider a 3×4×63\times 4\times 6 table and we consider an “indispensable move”, which is a necessary move in all Markov bases for a fixed matrix AA, such that

+1100000+1100000+100110000+10+101000100+10000+10100001+1100+10000+101000110+2+1000+12\displaystyle\begin{array}[]{|c|c|c|c|c|c|}\hline\cr+1&-1&0&0&0&0\\ \hline\cr 0&+1&-1&0&0&0\\ \hline\cr 0&0&+1&0&0&-1\\ \hline\cr-1&0&0&0&0&+1\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 0&+1&0&-1&0&0\\ \hline\cr 0&-1&0&0&+1&0\\ \hline\cr 0&0&0&+1&0&-1\\ \hline\cr 0&0&0&0&-1&+1\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr-1&0&0&+1&0&0\\ \hline\cr 0&0&+1&0&-1&0\\ \hline\cr 0&0&-1&-1&0&+2\\ \hline\cr+1&0&0&0&+1&-2\\ \hline\cr\end{array}
=\displaystyle= 100000010000001000000001010000000010000100000001000100001000000002100010\displaystyle\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 1&0&0&0&0&0\\ \hline\cr 0&1&0&0&0&0\\ \hline\cr 0&0&1&0&0&0\\ \hline\cr 0&0&0&0&0&1\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 0&1&0&0&0&0\\ \hline\cr 0&0&0&0&1&0\\ \hline\cr 0&0&0&1&0&0\\ \hline\cr 0&0&0&0&0&1\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 0&0&0&1&0&0\\ \hline\cr 0&0&1&0&0&0\\ \hline\cr 0&0&0&0&0&2\\ \hline\cr 1&0&0&0&1&0\\ \hline\cr\end{array}
\displaystyle- 010000001000000001100000000100010000000001000010100000000010001100000002\displaystyle\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 0&1&0&0&0&0\\ \hline\cr 0&0&1&0&0&0\\ \hline\cr 0&0&0&0&0&1\\ \hline\cr 1&0&0&0&0&0\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 0&0&0&1&0&0\\ \hline\cr 0&1&0&0&0&0\\ \hline\cr 0&0&0&0&0&1\\ \hline\cr 0&0&0&0&1&0\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 1&0&0&0&0&0\\ \hline\cr 0&0&0&0&1&0\\ \hline\cr 0&0&1&1&0&0\\ \hline\cr 0&0&0&0&0&2\\ \hline\cr\end{array}
=:\displaystyle=: 𝐛+𝟏𝐛𝟏.\displaystyle{\bf b^{1}_{+}}-{\bf b^{1}_{-}}.

If we allow Xijk1X_{ijk}\geq-1 for 1iI,1jJ,1kK1\leq i\leq I,1\leq j\leq J,1\leq k\leq K, then we can show that

𝐛𝟏=𝐛+𝟏(2,3;3,4;5,6)(1,3;3,4;1,6)+(2,3;2,3;3,5)(2,3;1,3;1,4)(1,2;2,3;2,3)(1,2;1,3;1,2).\begin{array}[]{cc}{\bf b^{1}_{-}}=&{\bf b^{1}_{+}}-(2,3;3,4;5,6)-(1,3;3,4;1,6)+(2,3;2,3;3,5)\\ &-(2,3;1,3;1,4)-(1,2;2,3;2,3)-(1,2;1,3;1,2).\end{array}

In addition we consider another indispensable move such that

+1100000+1100000+1100100+10010000+100+101000100+1+1000+120+100010100+10000+10100011+2\displaystyle\begin{array}[]{|c|c|c|c|c|c|}\hline\cr+1&-1&0&0&0&0\\ \hline\cr 0&+1&-1&0&0&0\\ \hline\cr 0&0&+1&-1&0&0\\ \hline\cr-1&0&0&+1&0&0\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr-1&0&0&0&0&+1\\ \hline\cr 0&0&+1&0&-1&0\\ \hline\cr 0&0&-1&0&0&+1\\ \hline\cr+1&0&0&0&+1&-2\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 0&+1&0&0&0&-1\\ \hline\cr 0&-1&0&0&+1&0\\ \hline\cr 0&0&0&+1&0&-1\\ \hline\cr 0&0&0&-1&-1&+2\\ \hline\cr\end{array}
=\displaystyle= 100000010000001000000100000001001000000001100010010000000010000100000002\displaystyle\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 1&0&0&0&0&0\\ \hline\cr 0&1&0&0&0&0\\ \hline\cr 0&0&1&0&0&0\\ \hline\cr 0&0&0&1&0&0\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 0&0&0&0&0&1\\ \hline\cr 0&0&1&0&0&0\\ \hline\cr 0&0&0&0&0&1\\ \hline\cr 1&0&0&0&1&0\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 0&1&0&0&0&0\\ \hline\cr 0&0&0&0&1&0\\ \hline\cr 0&0&0&1&0&0\\ \hline\cr 0&0&0&0&0&2\\ \hline\cr\end{array}
\displaystyle- 010000001000000100100000100000000010001000000002000001010000000001000110\displaystyle\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 0&1&0&0&0&0\\ \hline\cr 0&0&1&0&0&0\\ \hline\cr 0&0&0&1&0&0\\ \hline\cr 1&0&0&0&0&0\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 1&0&0&0&0&0\\ \hline\cr 0&0&0&0&1&0\\ \hline\cr 0&0&1&0&0&0\\ \hline\cr 0&0&0&0&0&2\\ \hline\cr\end{array}\,\,\begin{array}[]{|c|c|c|c|c|c|}\hline\cr 0&0&0&0&0&1\\ \hline\cr 0&1&0&0&0&0\\ \hline\cr 0&0&0&0&0&1\\ \hline\cr 0&0&0&1&1&0\\ \hline\cr\end{array}
=:\displaystyle=: 𝐛+𝟐𝐛𝟐.\displaystyle{\bf b^{2}_{+}}-{\bf b^{2}_{-}}.

If we allow Xijk1X_{ijk}\geq-1 for 1iI,1jJ,1kK1\leq i\leq I,1\leq j\leq J,1\leq k\leq K, then we can show that

𝐛𝟐=𝐛+𝟐+(2,3;2,4;5,6)+(2,3;3,4;4,6)+(2,3;1,2;2,6)(1,2;3,4;1,4)(1,2;1,3;1,3)+(1,2;1,2;2,3).\begin{array}[]{cc}{\bf b^{2}_{-}}=&{\bf b^{2}_{+}}+(2,3;2,4;5,6)+(2,3;3,4;4,6)+(2,3;1,2;2,6)\\ &-(1,2;3,4;1,4)-(1,2;1,3;1,3)+(1,2;1,2;2,3).\end{array}
Remark 10.

One notices that by the way we use basic moves to connect from 𝐛+𝟏{\bf b_{+}^{1}} to 𝐛𝟏{\bf b_{-}^{1}} and 𝐛+𝟐{\bf b_{+}^{2}} to 𝐛𝟐{\bf b_{-}^{2}} we cannot connect by allowing just one cell to be 1-1. We have to allow at least three cells to be 1-1. So it is interesting to find out the upper bounds KK such that all moves in MM connect all tables in FF if we allow at most KK cells Xijk1X_{ijk}\geq-1.

Dinwoodie et al. discussed connecting tables via allowing cell counts to be negative one and they discussed a condition for a set of moves so that it connects tables in the fiber by allowing cell counts to be negative one (Proposition 0.2.1 [CDY09a]). However, for the no-three-way interaction model, the ideal generated by binomials with exponents for the positive part and negative part of all possible basic moves for 3×3×43\times 3\times 4 is not radical. Therefore, we cannot use Proposition 0.2.1 for the connectivity of tables with allowing cell counts to be 1-1. However, using a known Markov basis for 3×3×K3\times 3\times K, for K2K\geq 2, by Aoki and Takemura in [AT03a], we can show that basic moves of all 2×2×22\times 2\times 2 minors can connect tables for 3×3×43\times 3\times 4 case.

We can also show that a set of basic moves MM connects all tables in the fiber A,b{\mathcal{F}}_{A,b} for AA a design matrix for the model and bb a vector of the margins if we allow a cell count Xijk1X_{ijk}\geq-1 under the no-three-way interaction model. To prove this, we use elements of all indispensable moves for 3×4×K3\times 4\times K tables in [AT03b]. Then as we discussed in Remark 10, we can show the positive component and negative component of each indispensable move can be connected via basic moves if we allow cell counts to be 1-1.

Proposition 11.

Consider a 3×4×K3\times 4\times K table XX for K=2,K=2,\ldots under the no-three-way interaction model. Then a set of basic moves MM connects all tables in the fiber A,b{\mathcal{F}}_{A,b} for AA, a design matrix for the model, and bb, a vector of the margins, if we allow cell counts Xijk1X_{ijk}\geq-1.

In addition, we can show that a Markov chain with the set of all basic moves by allowing all cell counts to be negative one if I=2I=2.

Proposition 12.

Let MM be a set of moves. Suppose all moves in MM connect all tables in A,b{\mathcal{F}}_{A,b} if b>0b>0. Then MM connects all tables in A,b{\mathcal{F}}_{A,b^{\prime}} if we allow cell counts to be 1-1.

Proof.

We consider the fiber

¯A,b:={un:Au=b,u𝕀n}={u+𝕀n0n:A(u+𝕀n)=b}={u0n:Au=(bA𝕀n)}.\begin{array}[]{ccc}\bar{\mathcal{F}}_{A,b}&:=&\{u\in\mathbb{Z}^{n}:Au=b,\,u\geq-\mathbb{I}_{n}\}\\ &=&\{u+\mathbb{I}_{n}\in\mathbb{Z}_{\geq 0}^{n}:A(u+\mathbb{I}_{n})=b\}\\ &=&\{u\in\mathbb{Z}_{\geq 0}^{n}:Au=(b-A\mathbb{I}_{n})\}.\\ \end{array}

Since we have (bA𝕀n)>0(b-A\mathbb{I}_{n})>0, MM connects all tables in ¯A,b\bar{\mathcal{F}}_{A,b}. ∎

theorem 13.

Suppose we consider 2×J×K2\times J\times K contingency tables under the no-three-way interaction model. Then the set of all basic moves connects tables in the fiber A,b{\mathcal{F}}_{A,b} for AA, a design matrix for the model, and bb, a vector of the margins, if we allow cell counts Xijk1X_{ijk}\geq-1.

Proof.

Theorem 3 in [RY10] shows that the set of basic moves connects bounded J×KJ\times K tables under the independence model if we have positive margins. This is equivalent that the set of all basic moves connect tables for 2×J×K2\times J\times K tables under the no-three-way interaction model with all positive margins. Then we apply Proposition 12 we have the result. ∎

In general we do not know that a set of basic moves of 2×2×22\times 2\times 2 minors connects all tables in A,b\mathcal{F}_{A,b} under the no-three-way interaction model for any b0mb\in\mathbb{Z}^{m}_{\geq 0} if we allow cell counts to be 1-1. Thus, it is still an open problem to prove that moves of 2×2×22\times 2\times 2 minors connects all I×J×KI\times J\times K tables in the fiber for I>3,J>3,K>3I>3,\,J>3,\,K>3 under the no-three-way interaction model if we allow cell counts to be negative one.

5 USN Officer and Enlisted Population by Race, Rank, and Gender

We now examine the performance of the algorithms using an empirical data set from [NAV22]. The data set consists of the USN officer and enlisted population as of January 20, 2021. The data is organized into a three way contingency table stratified by race, rank, and gender. The rank category consists of 19 levels. The values are displayed in Tables 123, and 4. By Theorem 13, we know that the set of all basic moves connects tables in the fiber if we allow cell counts to be 1-1. Thus we apply our MCMC scheme to this contingency table.

Table 1: Male Naval Officer Population by Race and Rank as of January 20,2021
Race Adm. O-6 O-5 O-4 O-3 O-2 O-1 W-4 W-3 W-2
Nat. Am. 1 9 29 92 154 64 66 7 14 15
Asian 2 96 225 417 832 347 349 12 51 34
Af. Am. 6 167 357 551 1,006 329 396 81 148 142
Pac. Isl. 2 107 263 280 413 127 118 14 38 50
Multi-Race 2 36 123 242 853 311 342 13 19 14
White 192 2,452 4,752 6,517 11,635 4,038 4,038 222 413 371
Table 2: Male Enlisted Population by Race and Rank as of January 20,2021
Race E-9 E-8 E-7 E-6 E-5 E-4 E-3 E-2 E-1
Nat. Am 44 210 777 1,863 1,142 379 254 110 56
Asian 129 466 1,257 2,720 3,405 2,229 2,051 693 452
Af. Am. 409 994 3,151 7,514 9,963 6,533 5,968 2,820 2,036
Pac. Isl. 93 308 798 1,387 2,593 3,087 1,922 333 30
Multi-Race 48 162 942 4,679 5,004 2,189 1,279 476 348
White 1,809 4,242 11,591 26,435 34,716 25,716 20,871 9,140 6,502
Table 3: Female Naval Officer Population by Race and Rank as of January 20,2021
Race Adm. O-6 O-5 O-4 O-3 O-2 O-1 W-4 W-3 W-2
Nat. Am. 0 2 11 12 45 27 32 0 0 0
Asian 1 28 56 136 323 129 126 0 3 4
Af. Am. 0 50 103 226 466 143 141 13 29 38
Pac. Isl. 1 14 39 81 215 55 45 0 8 6
Multi-Race 0 5 33 87 327 130 144 1 3 1
White 13 294 677 1,447 2,955 1,089 1,117 12 21 33
Table 4: Female Enlisted Population by Race and Rank as of January 20,2021
Race E-9 E-8 E-7 E-6 E-5 E-4 E-3 E-2 E-1
Nat. Am 6 24 114 294 314 173 124 53 23
Asian 14 71 214 545 863 652 677 198 129
Af. Am. 88 915 3,151 2,509 4,453 3,039 2,983 1,050 894
Pac. Isl. 13 50 157 297 779 920 714 132 5
Multi-Race 5 24 181 975 1,536 757 544 165 122
White 120 324 1,267 3,536 7,555 6,669 5,914 2,308 1,748

Of note, the table consists of a wide range of cell counts. In general, cell counts decrease as rank increases which is expected as there are fewer billets for higher ranks thus reflecting the USN’s “up or out” promotion structure. Further, we note that there are considerably fewer females than males across all ranks and races. For this reason, several sub-categories were combined to ensure that the chain runs smoothly.

In this computation, we consider the following hypotheses:

H0:λijkXYZ=0 for all i=1,,10,j=1,,6,k=1,2.H1:λijkXYZ0 for all i=1,,10,j=1,,6,k=1,2.\begin{array}[]{cc}H_{0}:&\lambda_{ijk}^{XYZ}=0\mbox{ for all }i=1,\ldots,10,\,j=1,\ldots,6,\,k=1,2.\\ &\\ H_{1}:&\lambda_{ijk}^{XYZ}\not=0\mbox{ for all }i=1,\ldots,10,\,j=1,\ldots,6,\,k=1,2.\end{array}

We estimated maximum likelihood estimate (MLE) via Iterative Proportional Fitting Procedure (IPFP) under the no-three-way interaction model shown in Tables Tables 567, and 8.

Table 5: MLE under the no-three-way interaction model for Male Naval Officer Population by Race and Rank as of January 20,2021
Race Adm. O-6 O-5 O-4 O-3 O-2 O-1 W-4 W-3 W-2
Nat. Am. 0.92 9.52 33.91 81.65 150.63 68.19 73.55 6.55 12.88 13.39
Asian 2.76 107.26 238.10 433.88 873.60 356.39 356.20 11.22 49.66 33.90
Af. Am. 5.17 168.82 346.00 517.31 926.37 292.50 333.57 83.44 152.62 147.43
Pac. Isl. 2.74 103.43 252.48 277.95 464.99 133.31 119.59 13.02 42.01 49.49
Multi-Race 1.81 34.71 129.01 249.48 858.83 317.35 350.35 12.96 19.97 13.15
White 191.60 2443.25 4749.50 6538.72 11618.57 4048.27 4075.74 221.81 405.85 368.64
Table 6: MLE under the no-three-way interaction model for Male Enlisted Population by Race and Rank as of January 20,2021
Race E-9 E-8 E-7 E-6 E-5 E-4 E-3 E-2 E-1
Nat. Am 45.58 193.81 711.45 1835.01 1152.64 424.38 283.95 127.27 60.72
Asian 130.32 444.54 1173.84 2776.32 3376.57 2213.34 2047.63 695.21 446.27
Af. Am. 421.94 1383.03 4307.92 7582.58 9722.60 6169.24 5568.08 2554.54 1887.83
Pac. Isl. 95.85 291.92 748.72 1413.27 2619.39 3016.65 1935.93 355.91 26.34
Multi-Race 47.62 149.82 867.92 4694.68 5005.78 2181.91 1315.54 483.06 348.02
White 1790.69 3918.87 10706.15 26296.14 34946.02 26127.49 21193.87 9356.01 6654.81
Table 7: MLE under the no-three-way interaction model for Female Naval Officer Population by Race and Rank as of January 20,2021
Race Adm. O-6 O-5 O-4 O-3 O-2 O-1 W-4 W-3 W-2
Nat. Am. 0.08 1.48 6.09 22.35 48.37 22.81 24.45 0.45 1.12 1.61
Asian 0.24 16.74 42.90 119.12 281.40 119.61 118.80 0.78 4.34 4.10
Af. Am. 0.83 48.18 114.00 259.69 545.63 179.50 203.43 10.56 24.38 32.57
Pac. Isl. 0.26 17.57 49.52 83.05 163.01 48.69 43.41 0.98 3.99 6.51
Multi-Race 0.19 6.29 26.99 79.52 321.17 123.65 135.65 1.04 2.03 1.85
White 13.40 302.75 679.50 1425.28 2971.43 1078.73 1079.26 12.19 28.15 35.36
Table 8: MLE under the no-three-way interaction model for Female Enlisted Population by Race and Rank as of January 20,2021
Race E-9 E-8 E-7 E-6 E-5 E-4 E-3 E-2 E-1
Nat. Am 4.42 40.19 179.55 321.99 303.36 127.62 94.05 35.73 18.28
Asian 12.68 92.46 297.16 488.68 891.43 667.66 680.37 195.79 134.73
Af. Am. 75.06 525.97 1994.08 2440.41 4693.40 3402.76 3382.92 1315.46 1042.17
Pac. Isl. 10.15 66.08 206.28 270.73 752.61 990.35 700.07 109.09 8.66
Multi-Race 5.38 36.18 255.08 959.32 1534.22 764.09 507.46 157.94 121.98
White 138.32 647.134 2151.85 3674.87 7324.98 6257.51 5591.13 2091.99 1595.19

In this study, as the first experiment, we only look at ranks which include Admirals, officers (O-1 through O-6) and W-4, W-3, and W-2. The race category consists of six levels and gender is binary. This results in a 10×6×210\times 6\times 2 contingency table. The χ2\chi^{2} test statistics of the observed table is 90.2390.23. Therefore an estimate p-value using the χ2\chi^{2} distribution with (101)(61)(21)(10-1)\cdot(6-1)\cdot(2-1) is 0.000020.00002.

We took the sample size N=10000N=10000 with 25% burn-in and thinning 25. With our MCMC scheme with the set of all basic moves by allowing cell counts to be negative one, we have an estimated p-value for this hypothesis test 0.000010.00001. If we set the significance level α=0.01\alpha=0.01, we reject the null hypothesis and we support the alternative. Figure 1 shows that an estimated distribution of χ2\chi^{2} statistics with the fixed margins for this Navy personnel dataset using our MCMC scheme.

Refer to caption
Figure 1: Estimated distribution of χ2\chi^{2} statistics using our MCMC scheme using the set of basic moves with allowing cell counts to be negative one. The red line is the χ2\chi^{2} distribution with (101)(65)(21)(10-1)\cdot(6-5)\cdot(2-1) degrees of freedom.

For the second experiment, we look at all 19 ranks. The race category consists of six levels and gender is binary. This results in a 19×6×219\times 6\times 2 contingency table. The χ2\chi^{2} test statistics of the observed table is 2775.152775.15. Therefore an estimate p-value using the χ2\chi^{2} distribution with (191)(61)(21)(19-1)\cdot(6-1)\cdot(2-1) is very close to 0.

We took the sample size N=10000N=10000 and thinning 25 with the set of basic moves by allowing cell counts to be 1-1. For burn-in step, due to its size, we took 250% burn-in with the set of basic moves by allowing only nonnegative cell counts since this is just a burn-in step and since this chain has much better mixing time. With our MCMC scheme with the set of all basic moves by allowing cell counts to be negative one, we have an estimated p-value for this hypothesis test <0.00001<0.00001. If we set the significance level α=0.01\alpha=0.01, we reject the null hypothesis and we support the alternative. Figure 2 shows that an estimated distribution of χ2\chi^{2} statistics with the fixed margins for this Navy personnel dataset using our MCMC scheme.

Refer to caption
Figure 2: Estimated distribution of χ2\chi^{2} statistics using our MCMC scheme using the set of basic moves with allowing cell counts to be negative one. The sample size of a Markov chain is N=10000N=10000. The red line is the χ2\chi^{2} distribution with (191)(65)(21)(19-1)\cdot(6-5)\cdot(2-1) degrees of freedom.

Since the size of a 19×6×219\times 6\times 2 contingency table is a large table, we increased the sample size of a Markov chain to N=50000N=50000 while the burn-in sample size is fixed as B=2500000B=2500000. Then we have an estimated p-value for this hypothesis test <0.000005<0.000005. If we set the significance level α=0.01\alpha=0.01, we reject the null hypothesis and we support the alternative. Figure 3 shows that an estimated distribution of χ2\chi^{2} statistics with the fixed margins for this Navy personnel dataset using our MCMC scheme.

Refer to caption
Figure 3: Estimated distribution of χ2\chi^{2} statistics using our MCMC scheme using the set of basic moves with allowing cell counts to be negative one. The sample size of a Markov chain is N=50000N=50000. The red line is the χ2\chi^{2} distribution with (191)(65)(21)(19-1)\cdot(6-5)\cdot(2-1) degrees of freedom.

6 Conclusion

In this paper we conduct MCMC with basic moves by allowing cell counts to be negative one. Experimental results imply that for the case of the three-way I×J×KI\times J\times K tables under the no-three-way interaction model, our MCMC algorithm provides an estimated distribution of χ2\chi^{2} statistics closer to the asymptotic distribution, χ2\chi^{2} distribution with the degrees of freedom (I1)(J1)(K1)(I-1)(J-1)(K-1).

In addition, it is still an open problem to prove that I×J×KI\times J\times K tables for I>3,J>3,K>3I>3,\,J>3,\,K>3 under the no-three-way interaction model moves of 2×2×22\times 2\times 2 minors connect all tables in the fiber if we allow cell counts to be negative one. Specifically

Conjecture 14.

Consider a three way I×J×JI\times J\times J contingency table XijkX_{ijk} for I>3,J>3,K>3I>3,\,J>3,\,K>3 under the no-three-way interaction model. If we allow Xijk1X_{ijk}\geq-1, then all moves of 2×2×22\times 2\times 2 minors connect all tables in A,b\mathcal{F}_{A,b}, where AA is a design matrix for the model and bb is a vector of margins computed from the observed table.

Acknowledgement

RY and DB are partially funded by NSF Division of Mathematical Sciences: Statistics Program DMS 1916037.

References

  • [AT03a] S. Aoki and A. Takemura, Minimal basis for a connected Markov chain over 3×3×K3\times 3\times K contingency tables with fixed two-dimensional marginals, Aust. N. Z. J. Stat. 45 (2003), no. 2, 229–249. MR MR1983834 (2005e:62090)
  • [AT03b] Satoshi Aoki and Akimichi Takemura, The list of indispensable moves of the unique minimal markov basis for 3 × 4 × k and 4 × 4 × 4 contingency tables with fixed two-dimensional marginals, 2003.
  • [BB00] F. Bunea and J. Besag, MCMC in i×j×ki\times j\times k contingency tables, Monte Carlo Methods (N. Madras, ed.), vol. 26, Fields Institute Communications, 2000, pp. 25–36.
  • [BC89] J. Besag and P. Clifford, Generalized monte carlo significance tests., Biometrika 76 (1989), 633–642.
  • [CDDH05] Y. Chen, I. Dinwoodie, A. Dobra, and M. Huber, Lattice points, contingency tables, and sampling, Integer points in polyhedra—geometry, number theory, algebra, optimization, Contemp. Math., vol. 374, Amer. Math. Soc., Providence, RI, 2005, pp. 65–78.
  • [CDHL05] Y. Chen, P. Diaconis, S. P. Holmes, and J. S. Liu, Sequential monte carlo methods for statistical analysis of tables, American Statistical Association 100 (2005), no. 469, 109–120.
  • [CDY09a] Y. Chen, I. H. Dinwoodie, and R. Yoshida, Markov chains, quotient ideals, and connectivity with positive margins, Algebraic and Geometric Methods in Statistics (Paolo Gibilisco, Eva Riccomagno, and Maria Piera Rogantin, eds.), Cambridge University Press, 2009, pp. 101 – 112.
  • [CDY09b] Yuguo Chen, Ian H. Dinwoodie, and Ruriko Yoshida, Markov chains, quotient ideals and connectivity with positive margins, pp. 99–110, Cambridge University Press, United Kingdom, Jan 2009 (English (US)), Publisher Copyright: © Cambridge University Press 2010.
  • [DE85] P. Diaconis and B. Efron, Testing for independence in a two-way table: New interpretations of the chi-square statistic (with discussion), Ann. Statist. 13 (1985), 845–913.
  • [DO05] J. De Loera and S. Onn, Markov bases of three-way tables are arbitrarily complicated, J. Symb. Comput. 41 (2005), no. 2, 173–181.
  • [DS98] Persi Diaconis and Bernd Sturmfels, Algebraic algorithms for sampling from conditional distributions, The Annals of Statistics 26 (1998), no. 1, 363–397.
  • [GT92] S. W. Guo and E. A. Thompson, Performing the exact test of hardy– weinberg proportion for multiple alleles, Biometrics 48 (1992), 361–372.
  • [HAT11] Hisayuki Hara, Satoshi Aoki, and Akimichi Takemura, Running markov chain without markov bases, Harmony Of Grobner Bases And The Modern Industrial Society, 2011.
  • [Lee06] Seungchan Lee, Markov chain monte carlo and exact conditional tests with three-way contingency tables, 2018-06.
  • [NAV22] U.S. NAVY, U.S. Navy demographic data, 2022, https://www.mynavyhr.navy.mil/Portals/55/Support/21stCenturySailor/Inclusion/Status%20of%20the%20Navy%201%20January%202021.pdf?ver=G416tgluOmYGnKld3mH7Tg%3D%3D.
  • [RY10] F. Rapallo and R. Yoshida, Markov bases and subbases for bounded contingency tables, Ann Inst Stat Math 62 (2010), 785–805.
  • [Stu96] Bernd Sturmfels, Gröbner basis and convex polytopes, University Lecture Series, vol. 8, AMS, 1996.