The toric fiber product is a general procedure for gluing two ideals, homogeneous with respect to the same multigrading, to produce a new homogeneous ideal. Toric fiber products generalize familiar constructions in commutative algebra like adding monomial ideals and the Segre product. We describe how to obtain generating sets of toric fiber products in non-zero codimension and discuss persistence of normality and primary decompositions under toric fiber products.Several applications are discussed, including (a) the construction of Markov bases of hierarchical models in many new cases, (b) a new proof of the quartic generation of binary graph models associated to K 4 -minor free graphs, and (c) the recursive computation of primary decompositions of conditional independence ideals. arXiv:1102.2601v5 [math.AC] 9 May 2014 Theorem 1.1. Let d i = 2 for all i ∈ V and let Γ be a graph with no K 4 minors. Then I Γ,d is generated by binomials of degrees two and four.Combining our techniques with results from [15], we can also make statements about the asymptotic behavior as the d i grow. For instance, let F ⊆ V be an independent set of Γ and consider I Γ,d as d i tend to infinity for i ∈ F , while the remaining d i are fixed. In this case, there is a bound M (Γ, d V \F ) for the degrees of elements in minimal generating sets of I Γ,d . Our techniques allow us to determine the values of M (Γ, d V \F ), which were previously known only for reducible models or when F is a singleton [17]. Here is a simple example of how to apply Theorem 5.15. Example 1.2. Let Γ = [12][13][24][34] be a four cycle, F = {1, 4}, and d {2,3} = (2, 2). The toric ideal I Γ,d is a codimension one toric fiber product and its minimal generating set consists of the following four types of binomials, written in tableau notation (a common J A⊥ ⊥B |C := p i A i An argument similar to that in Section 1.2 shows that this ideal is prime. For a collectionof CI-statements, the CI-ideal is the sum of the ideals of its statements:In statistics one is usually not interested in all of the variety of a CI-ideal, but only its intersection with the set of probability distributions. The following properties of CI-ideals imply well-known properties of conditional independence.Proposition 6.1. The following ideal containments hold:• J A⊥ ⊥B |C = J B⊥ ⊥A |C (symmetry);• J A⊥ ⊥B∪D |C ⊃ J A⊥ ⊥B |C (decomposition); • J A⊥ ⊥B∪D |C ⊃ J A⊥ ⊥B |C∪D (weak union).However, the contraction property does not hold algebraically since J A⊥ ⊥B |C∪D + J A⊥ ⊥D |C ⊇ J A⊥ ⊥B∪D |C .