EGB4 is of computational importance, as will become clear in Section \[sec:GGB\]. There we also show in Examples \[ex:EGB3\] and \[ex:EGB4\] that these requirements are not redundant.

\[thm:GGB\] Under conditions EGB1, EGB2, EGB3, and EGB4 there exists an algorithm that takes a finite subset $B$ of $K[X]$ as input and that returns a finite $G$-Gröbner basis of the ideal generated by $B$, [*provided that it terminates*]{}.

In Section \[sec:GGB\] we derive this algorithm, and in Section \[sec:2f\] we apply it to a conjecture concerning a statistical model to be discussed now.

The Gaussian two-factor model {#the-gaussian-two-factor-model .unnumbered}
-----------------------------

The [*Gaussian $k$-factor model with $n$ observed variables*]{} consists of all covariance matrices of $n$ jointly Gaussian random variables $X_1,\ldots,X_n$, the [*observed variables*]{}, consistent with the hypothesis that there exist $k$ further variables $Z_1,\ldots,Z_k$, the [*hidden variables*]{}, such that the joint distribution of the $X_i$ and the $Z_j$ is Gaussian and such that the $X_i$ are pairwise independent given all $Z_j$. This set of covariance matrices turns out to be $$F_{k,n}:=\{D+SS^T \mid D \in M_{n}({{\mathbb R}}) \text{ diagonal and
positive definite, and } S \in M_{n,k}({{\mathbb R}})\},$$ where $M_{n,k}({{\mathbb R}})$ is the space of real $n \times
k$-matrices, and $M_n({{\mathbb R}})$ is 