{'fraction_non_alphanumeric': 0.05233083506086217, 'fraction_numerical': 0.017168978897570828, 'mean_word_length': 3.9095772442588728, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Directionally collapsible parameterizations of multivariate binary distributions

Odds ratios and log-linear parameters are not collapsible, meaning that including a variable into the analysis or omitting one from it, may change the strength of association among the remaining variables. Even the direction of association may be reversed, a fact that is often discussed under the name of Simpson's paradox. A parameter of association is directionally collapsible, if this reversal cannot occur. The paper investigates the existence of parameters of association which are directionally collapsible. It is shown, that subject to two simple assumptions, no parameter of association, which depends only on the conditional distributions, like the odds ratio does, can be directionally collapsible. The main result is that every directionally collapsible parameter of association gives the same direction of association as a linear contrast of the cell probabilities does. The implication for dealing with Simpson's paradox is that there is exactly one way to associate direction with the association in any table, so that the paradox never occurs


Introduction
This paper studies the relationships between certain properties that parameters of associations for binary distribution may have. Goodman & Kruskal (1954) gave an overview of bivariate parameters of association and they argued that no single concept of association may be used in all research problems. Interest since then has turned towards the multivariate case and, although there have been alternative suggestions, see, e.g., Bahadur (1961), Lancaster (1969), applications and theoretical work in the last fifty years have concentrated around the odds ratio and quantities derived from it, mostly because of their relevance in log-linear and other graphical Markov models, see, e.g, Bishop et al. (1975), Lauritzen (1996). The multivariate version of the odds ratio was first considered in Bartlett (1935), see also Birch (1963), and Ku & Kullback (1968) for a review of related approaches. However, not every analyst is entirely satisfied with odds ratios (or their logarithms), as parameters of association. First, the standard error of the sample odds ratio, as an estimator, depends not only on the true value of the odds ratio, but is a monotone function of the sum of the reciprocals of the cell probabilities, resulting in high variability of estimators. Second, lack of collapsibility is often cited as an undesirable property, see, e.g., Whittemore (1978), Wermuth (1987) and Vellaisamy (2014). The fact that even the direction of association may change after collapsing (e.g., taking the new drug may be associated with recovery for both male and female patients, but disregarding sex, taking the old drug is associated with recovery) is seen as paradoxical by many, as shown by the widespread literature on 'Simpson's paradox'. In addition to well-known occurrences of Simpson's paradox in sociology, education and the health sciences, it is being discussed in genetics (Brimacombe, 2014) and in physics (Li et al., 2013).
As opposed to the vast majority of this literature, Simpson's paradox is not considered here as a special, perhaps negative, feature of the data for which it occurs, rather it is considered as a characteristic of the parameter of association applied, namely the odds ratio, that conditional and marginal associations may have opposing directions (cf. Wermuth, 1987;Rudas, 2010). Directional collapsibility means, that such a reversal cannot occur.
The direction of association is readily interpreted for k = 2. If one variable is treatment, the other is response to it, then the direction of association tells whether the treatment is beneficial or detrimental to the response. If the two variables are treated on an equal footing, that is, none of them is assumed to be a response to the other, then the direction of association tells whether concordant or discordant types of observations are more likely. For more than 2 variables, when one is response to the others, if all treatments are beneficial when applied individually, the direction of association may tell whether applying all treatments has additional benefit, or whether it is beneficial, at all. However, just like there is no single parameter of association, there is also no single meaning of association. When the variables are treated on an equal footing, one possible interpretation is given in (6) and in the discussion following it.
The paper investigates the possibility of finding directionally collapsible parameters of association, which also provide a parameterizations of multivariate binary distributions. The main results are obtained under two simple assumptions made for parameters of association, which are described and motivated in Section 2. These two properties are possessed not only by the odds ratio, but also by a simple contrast of the cell probabilities defined in (5). It is also shown in Section 2, that both the odds ratios and the contrasts, associated with all marginal distributions, constitute a parameterization of the joint distribution.
The main results of the paper are given in Section 3. Variation independence of the odds ratio from lower dimensional marginal distributions, formulated here as dependence on the conditional distributions only, which is a very desirable property in other contexts (see, e..g, Rudas, 1998), turns out to imply the lack of directional collapsibility. More precisely, any parameter of association which depends only on the conditional distributions, assigns the same direction of association to every distribution as the log odds ratio does, and, therefore, is not directionally collapsible. On the other hand, a parameter of association is directionally collapsible, if and only if it assigns the same direction of association to every distribution, as the contrast of the cell probabilities does.
One is then left with the following simple situation. If the two properties described in Section 2 are assumed, then all parameters of association which depend on the conditional distributions only, deem the direction of association as the odds ratio does, and are not directionally collapsible. Further, all directionally collapsible parameters of association assign the same direction to association as the contrast does, and the latter also provides a parameterization of the distribution.
Section 4 concludes the paper with a brief discussion of the potential use of the contrast as a parameter of association and the implications for dealing with Simpson's paradox. Those analysts who are interested in the direction of association only, and find the contrast being overly simple, failing to properly describe their concept of association, cannot avoid Simpson's paradox and have to learn to accept the reversal as not paradoxical. On the other hand, those, whose main concern remains to avoid Simpson's paradox, and are ready to use the contrast to determine the direction of association, will be happy to see that the contrast has very attractive sampling properties, including that its sampling distribution does not depend on the number of variables involved, rather only on its population value.
2 Some properties of parameters of association This paper deals with parameters of the joint distribution of k binary variables. Such distributions may be written as entries in the cells t of a 2 k contingency table, T k . The cells of such a table may be identified with sequences of 1's and 2's of length k, and the notation t = (j 1 , j 2 , . . . , j k ) will be used, where j i is 1 or 2 for all i = 1, 2, . . . , k. The distributions to be considered are not restricted to probability distributions summing to 1 and not even to frequency distributions with integer values. The set of any positive entries (p(t), t ∈ T k ) in the contingency tableT k will be called a distribution.
This paper offers no definition of what is a parameter of association, rather the relationships between different possible characteristics are investigated. As pointed out by Goodman & Kruskal (1954), see also Darroch (1974), Streitberg (1990), Rudas & Bergsma (2004), there are several ways to define parameters of association, which may be relevant in different research context, and these different parameters may have different characteristics. The properties which will be assumed here, seem appropriate in the common situations when: (i) The variables considered describe the presence (category 1) or absence (category 2) of various characteristics. Association means that these characteristics tend to occur together. If the joint distribution is uniform, there is no association, and the stronger is the tendency for all the characteristics to occur together, the stronger is the association.
(ii) Association has a direction, and any pattern of association of k − 1 variables, combined with the presence or the absence of the k-th characteristic imply different directions of association.
These assumptions are formulated as Properties 1 and 2. Property 1. A parameter of association f k is a continuous real function on the set of distributions (p(t) : t ∈ T k ), such that and f k is strictly monotone increasing in p(1, 1, . . . , 1).
Property 2. If (p(t), t ∈ T k ) and (q(t), t ∈ T k ) are distributions, such that there is an i ∈ {1, 2, . . . , k} with p(j 1 , . . . , j i−1 , j i , j i+1 , . . . , j k ) = q(j 1 , . . . , j i−1 , j * i , j i+1 , . . . , j k ), where j * i + j i = 3, for all (j 1 , . . . , j i−1 , j i+1 , . . . , j k ), then This is not the most parsimonious formulation of these assumptions: Property 2 implies (1). Let the cells of T k with an even number of 2's be denoted by T ke and those with an odd number of 2's by T ko . Swapping the categories of a variable, as described in Property 2, interchanges these two subsets of the cells.
If f k is of the form (2), then it may be written as where e ′ is the transpose of a column vector of length k, consisting of 1 ′ s. The following example illustrates parameters of association of the type (2). Example 1. The k − 1st order odds ratio for a k-dimensional distribution is and log OR k is an interaction parameter, to be denoted as LOR k . The log odds ratios are closely related to the log-linear parameters of the distribution (see, e.g., Rudas, 1998). The log odds ratios may also be generated as in (2), by using h = log: The difference parameter of association is which is obtained from (2) by choosing h as the identity function. Finally, by choosing h = exp in (2) gives Parameters of association of the type (2) are not only contrasts between functions of the entries in T ke and T ko , but also a comparison of the strengths of association in parts of the table defined by specific indices of a variable. Let T k−1 (V i = 1) be the part of the table where the ith variable is 1, and T k−1 (V i = 2) be the part of the table where the jith variable is 2. These are k − 1-dimensional tables formed by the variables other than V i . Then, if f k is of the type (2), it may be obtained by the following recursion, irrespective of the choice of i : To see that (2) and (6) give the same, only the signs of the quantities h(p(t)) need to be checked. For every t ∈ T k , the the sign of h(p(t)) in f k in (2) is the same as the sign in f k−1 in (6), if and only if V i = 1, and is the opposite when V i = 2, because the sign depends on the parity of the number of 2's among the indices. This reversal is introduced in (6) by the negative sign of the second term. Formula (2) may seem counter-intuitive, even "wrong", as it suggests, as implied by Property 2, that large entries in cells with an odd number of 2's among their indices imply weak association. Formula (6) shows, that (2) is a comparison, showing, for any variable V i , the amount by which association is stronger, when, in addition to all other characteristics, also the one indicated by V i is present (j i = 1), as opposed to when it is not (j i = 2).
However, there are functions of the cell entries which possess Properties 1 and 2, but cannot be written in the form of (2), as illustrated next.
Example 2. Let let d be strictly monotone but non-linear function.Then .
is a parameter of association which cannot be written in the form of (2). For example, in the case of k = 2, with the usual notation, (p(1, 1) + p(2, 2)) 3 − (p(1, 2) + p(2, 1)) 3 is not a linear contrast of any function of the cell entries.
The next example illustrates parameters of association which do not possess Properties 1 and 2.
Example 3. One may say, that in the following distribution, the three variables (possessing the three characteristics) do show some association, because it is more likely to have all three characteristics present, than any other pattern of presence or absence. Indeed, the Bahadur parameter (Bahadur, 1961) associates the value of 0.103 with this distribution. By the same argument, one might think that the association is stronger in the following distribution. Parameters of association obtained by some normalization of the chi-squared statistic (see Goodman & Kruskal, 1954) are always nonnegative, thus cannot possess Property 2. Rudas (2010) discussed treatment selection in the case of a single treatment and a single response variable. The conditions under which he showed that every decision rule which avoids Simpson's paradox for all data sets, chooses the same treatment as DI 2 does, are implied by Properties 1 and 2.
An important property of the interaction parameters LOR k and DI k is that they constitute a parameterization of the distributions on the contingency table. Parameterization means that the vector valued function, which for every distribution on T k gives its 2 k interaction parameters (one for every subset of the variables), is invertible.
For easier formulation of this fact, these interaction parameters are extended to apply to zerodimensional subsets, so that LOR 0 is the logarithm of the product of the entries in the table, and DI 0 is their sum.
Theorem 1. Let T k be a k-dimensional binary contingency table formed by the ranges of the variables V 1 , . . . , V k . Let m be a 0 − 1 vector of length k, and let M be the set of all such vectors. Let V m be the subset of the variables consisting of those V i , for which m i is not zero. Finally, let all the parameters of association where e ′ m is the sum of the components of m and T e ′ m (V m ) is the contingency table with the joint distribution of the variables in V m , be given. Then, if f k = LOR k or f k = DI k , the distribution on T k may be reconstructed.
Proof. In the case, when f k = LOR k , (7) is essentially a marginal log-linear parameterizaton as described by Bergsma & Rudas (2002), with all subsets of the set of variables being a hierarchical and complete class, and the claim follows from their Theorem 2, where a reconstruction algorithm based on repeated applications of the Iterative Proportional Fitting procedure was also described.
In the case, when f k = DI k , the given interaction parameter values define a system of linear equations for the cell entries. To formulate the equations in this system, consider a vector m. Each entry in the marginal table defined by m, is the sum of those entries of T k , which are in cells with such vectors of indices t, that are identical to each other in all the positions that have a 1 in m.
When DI e ′ m is computed for the marginal table defined by m, all these entries have the same sign, namely, the sign associated with the marginal entry in the e ′ m-dimensional table by DI e ′ m , which is as implied by (3). Thus, the left hand side of the equation associated with m is and the right hand side is the value of the parameter of association for the marginal defined by m. This system of equations does have a positive solution by assumption, and as the 2 k × 2 k matrix of coefficients is shown below to be of full rank, it only has one solution.
To see the rank of the coefficient matrix, consider any two of its rows, say, the ones associated with different vectors m 1 and m 2 . There is a position, where one of these vectors is 1, and the other one is 0. To simplify notation, it is assumed that m 1 is 0 and m 2 is 1 in position k. Then, for any two cells that are identical in the first k − 1 indices, but one has a 1, the other has a 2 in the kth position, exactly 1 will have identical signs in the two rows, and exactly 1 will have different signs, because changing the last index from 1 to 2 leaves the sign of the entry in the row (i.e., equation) associated with m 1 unchanged, but changes the sign of the entry in the row (i.e., equation) associated with m 2 , as the sign depends on the parity of the number of 2 ′ s among the indices of the cells. Therefore, half of the entries have identical, and half of the entries have different signs in the two rows, thus the two rows of coefficients are orthogonal. If any two rows of the coefficient matrix are orthogonal, then the matrix is of full rank.
Any algorithm to find the solution of a system of linear equations may be used to reconstruct the distribution in T k .

Directional collapsibility
The central question in this paper is directional collapsibility of parameters of association, which is now defined formally as Property 3.
Property 3. If for some i ∈ {1, . . . , k}, Example 4. It is well known that LOR k is not directionally collapsible. On the other hand, DI k is directionally collapsible. For simplicity of notation, this will be shown now for i = 1. It follows form (3), that, with e being a vector of 1 ′ s of length k − 1, where t k−1 is a cell in T k−1 and (j, t k−1 ) is a cell in T k . Then, with (+, t k−1 ) being a marginal cell, and then the sign of the left hand side is equal to the common sign of the terms on the right hand side, which is what was to be seen. In fact, the argument shows that DI k is not only directionally collapsible, but is also collapsible.
The first result of this section identifies a property of the LOR k , which implies its lack of directional collapsibility, and, consequently, all parameters of association with this property also lack directional collapsibility. This property is that the value of the parameter of association depends on the conditional distributions only, in the sense given in the next definition.
Property 4. If the distributions (p(t), t ∈ T k ) and (q(t), t ∈ T k ) are such, that there exists a variable V i , such that its conditional distributions, given the categories of all other variables, derived from p and q, coincide, then The condition for the equality of the conditional distributions, written for the first variable, is that for all cells t k−1 of the table formed by the ranges of the last k − 1 variables. A celebrated characteristic of the odds ratio is variation independence of LOR k from the marginal distribution of any k − 1 variables. This property is usually formulated (Rudas, 1998) by saying that if (r(t), t ∈ T k ) and (s(t), t ∈ T k ) are distributions on T k , then there always exists a distribution (u(t), t ∈ T k ), that has the k − 1 dimensional marginal distributions of the first distribution, and the k − 1st order odds ratio of the second one. This form of definition is applied to avoid the problems stemming from the k − 1 dimensional marginal distributions not being variation independent for k > 2 among themselves, see Bergsma & Rudas (2002). The theory of mixed parameterization of exponential families (Barndorff-Nielsen, 1978) implies that there is only one distribution u. Property 4 implies this variation independence.
Example 5. Obviously, LOR k depends on the conditional distributions only but DI k does not have this property.
The next theorem shows that if Property 4 is assumed, then f k (p(t) : t ∈ T k ) is equal to the value of f k for a special distribution, derived from p.
The proof is based on a series of transformations, which are first illustrated for k = 3. Example 6. For k = 3, write the distribution as follows:

p(111) p(121) p(211) p(221) p(112) p(122) p(212) p(222)
The first transformation is to divide both p(1, j, k) and p(2, j, k) by the latter, for all choices of j and k, which yields The conditional distribution of V 1 , given V 2 and V 3 in this distribution is the same as in (p(t), t ∈ T k ), thus, if f 3 depends on the conditional distributions only, its value remains the same. The next transformation is to divide the entry in cell (1, 1, k) and in cell (1, 2, k), for all choices of k, by the latter, yielding As the conditional distribution of the second variable, given the first and the third did not change, the value of f 3 is also unchanged. The last transformation is to divide the entries in cells (1, 1, 1) and (1, 1, 2) by the latter. This gives in cell (1, 1, 1) p (111)  which is the 2nd order odds ratio, and the other cells all contain 1. The value of f 3 is still unchanged, as the last transformation left the conditional distribution of the third variable, given the first two, unchanged.
Proof. The proof applies a series of transformations to the distribution in T k , such that each step leads to a distribution with the same value of f k and at the end of the transformations, the odds ratio of the k variables appears in cell (1, . . . , 1), and the other cells all contain 1.
To define such a series of transformations, note that if both p(1, t k−1 ) and p(2, t k−1 ), for a fixed t k−1 , are multiplied by the same number, the value of f k remains unchanged, because the conditional distribution of the first variable, conditioned on the last k − 1 variables, remains unchanged, and similarly for any variable other than V 1 . There is one transformation for each variable and they are applied consecutively to the result of the previous transformation.
The transformation for variable V 1 is dividing both p(1, t k−1 ) and p(2, t k−1 ), by p(2, t k−1 ), for all possible choices of the last k − 1 indices. The conditional distribution of V 1 , given all other variables, does not change, so f k (p(t) : t ∈ T k ) will remain unchanged, too. The transformation will change the p(2, t k−1 ) entries to 1, and the new value of p(1, t k−1 ) will be p(1, t k−1 )/p(2, t k−1 ). The next step is for variable V 2 . It consists of dividing both p(1, 1, t k−2 ) and p(1, 2, t k−2 ) by the latter entries, for all choices of the k − 2 indices in t k−2 . Note that p(2, t k−1 ) = 1, thus p(2, 1, t k−2 ) and p(2, 2, t k−2 ) are also equal to 1 and need not be divided. This will leave the conditional distribution of V 2 , given all other variables, unchanged, so the value of f k (p(t) : t ∈ T k ) is also unchanged. This transformation does not affect any cell of the form (2, t k−1 ), thus the entry in any cell with 2 as the first index remains 1, and, in addition, the entries in every cell with a second index equal to 2 also become equal to 1.
The ith step is applied to a table with entries in the cells having 2 as any of their 1st, 2nd, ... , i−1st indices equal to 1. It consist of dividing all cell entries p(1, . . . , 1, 1, t k−i ) and p(1, . . . , 1, 2, t k−i ) by the latter. As the conditional distribution of V i , given all other variables, remains unchanged, so does f k (p : p ∈ T k ), too.
The last step of the series of transformations is for variable V k and it consists of dividing the entries in cells (1, . . . , 1, 1) and (1, . . . , 1, 2) by the latter. This does not affect the value of the parameter of association and makes all cell entries, except for the one in (1, . . . , 1) equal to 1.
All steps leave the value of f k (p(t) : t ∈ T k ) unchanged. If an entry was made equal to 1, it is not changed later during the transformations. After this series of transformations, all original cell entries appear in a multiplicative formula in cell (1, 1, . . . , 1), and all other entries are made equal to 1, because these latter cells contain at least one index equal to 2, and were divided by their own value in step i of the transformation, if their first index equal to 2 is the ith one.
Some of the original entries in (p(t) : t ∈ T k ) appear in the numerator in cell (1, 1, . . . , 1), some appear in the denominator. The (original) value p (1, 1, . . . , 1) is in the numerator, because there is no division performed with that entry. All other terms appear in this cell as a result of a number of consecutive divisions. If during the series of transformations, a value p(t k ) goes into the numerator of the entry in a cell, the next time, if such exists, when the entry in that cell is used for division, this value will appear in the denominator. Therefore, whether (the original) p(t k ) ends up in the numerator or in the denominator of the (final) entry in cell (1, 1, . . . , 1), depends on the parity of times, divisions involving that term occurred. And this is exactly the number of indices equal to 2 in t k . If the number of 2's is even, the original value in the cell will be in the numerator, if it is odd, the original value will be in the denominator, which gives (4).
Consequently, if Property 1 is also assumed, then the direction of association can be determined for parameters of association which depend on the conditional distributions only, as formulated in the next theorem.
Theorem 3. Let f k be a parameter of association with Properties 1 and 4. Then, that is, f k assigns the same direction of association to all distributions as LOR k does, and, therefore, f k is not directionally collapsible.
Proof. Consider the distribution constructed in Theorem 2. If it had 1 in every cell, then f k would be zero but it has the odds ratio of (p(t) : t ∈ T k ) in cell (1, . . . , 1). Thus, to obtain this distribution from the one containing 1's in every cell, the entry in cell (1, . . . , 1) has to be increased / left unchanged / decreased, depending on whether the odds ratio is more than / equal to / less than 1, making f k positive / zero / negative, which is also the sign of LOR k .
The second claim of the theorem is implied by the first one.
Theorem 3 says that no parameter of association, which depends on the conditional distributions only in the sense of Property 4, can avoid Simpson's paradox for all data sets, if Property 1 is also assumed to hold. Every such parameter of association assigns the same sign to association to any distribution, as the LOR k does. Consequently, as long as one is only interested in the direction of association and wishes to use parameters of association which depend on the conditional distributions only, it is sufficient to use the LOR k , but Simpson's paradox cannot be avoided.
The next example illustrates that there are parameters of association, which do not depend on the conditional distributions only, yet are not directionally collapsible, thus the converse of Theorem 3 does not hold.
Example 7. The parameter of association EX k does not depend on the conditional distributions only. In the following two distributions the conditional distribution of V 1 given V 2 is the same, yet the value of EX 2 for the first one is 79.67, and for the second one is -0.60. In spite of this, EX k is not directionally collapsible. In both of the following tables, EX 2 is positive (259.94 and 143.46, respectively) 6 5 3 3 5 7 1 7 but in the collapsed table   11 12  4 10 it is negative (-77694.70). Note that LOR k does not exhibit Simpson's paradox for these data.
The main result of the section is that all directionally collapsible parameters of association judge the direction of association like DI k does, if Properties 1 and 2 are assumed to hold. First, a preliminary result is needed.
Theorem 3. Assume that for f k , Properties 1 and 3 hold and let (q(t) : t ∈ T k ) be a distribution such that sgn (f k (q(t) : t ∈ T k )) = 0.
Then, for all distributions (p(t) : t ∈ T k ) , Proof. The distributions (q(t) : t ∈ T k ) and (p(t) : t ∈ T k ) may be seen as distributions in two layers of a k + 1-dimensional table, of which T k is the marginal table.
If f k (p(t) : t ∈ T k ) is zero, directional collapsibility implies the result immediately. If f k (p(t) : t ∈ T k ) is positive, then (p(t) + q(t) : t ∈ T k ) will be written as the sum of two distributions, so that f k is positive on both, and, then, it is also positive on (p(t) + q(t) : t ∈ T k ).
Because of Property 1, the entry in p(1, 1, . . . 1) may be decreased by a positive amount, such that the entry remains positive and f k (p(t) : t ∈ T k ) also remains positive. If the entry q(1, 1, . . . 1) is increased by the same amount, then by (i), f k (q(t) : t ∈ T k ) becomes positive, and by directional collapsibility, f k (p(t) + q(t) : t ∈ T k ) has to be positive.
If f k (p(t) : t ∈ T k ) is negative, the argument is modified so that p(1, 1, . . . 1) is increased by a small amount.
Theorem 4. If for a parameter of association f k , Properties 1 and 2 hold, then Property 3 holds for it if and only if, for any distribution, Proof. The "if" part follows from the directional collapsibility of DI k . The idea of the proof of the "only if" part is to write (p(t) : t ∈ T k ) as the sum of several k-dimensional distributions, such that f k has, on at least one of them, the same sign as DI k does, and on the others it either has the same sign or is zero. Then, repeated application of directional collapsibility and of Theorem 3 yields the result.
Let s be the smallest entry in (p(t), t ∈ T k ). Subtract from every entry in (p(t), t ∈ T k ) the value s, to obtain (p(t) − s, t ∈ T k ), which has non-negative entries and will be denoted as q 0 (t). Then Let (u 0 (t), t ∈ T k ) be zero in every cell of T k . If the following condition does not hold for l = 0, q l (t) = 0 for all t ∈ T ke or q l (t) = 0 for all t ∈ T ke , then consider the smallest positive entry (or one of the smallest positive ones), of (q 0 (t), t ∈ T k ).
Suppose it is in cell t 1 . The cell t 1 is either in T ke or in T ko , and there is a cell, say t ′ 1 in the other subset, so that q 0 (t ′ 1 ) ≥ q 0 (t 1 ). Then define Continue the procedure of the previous paragraph for q 1 instead of q 0 to obtain u 2 and q 2 , and repeat until the condition in (10) wil become true for some l.
Now the entries of q l are all zero, either in T ko or in T ke or in both, and because l j=0 t∈T ke this will happen when DI k (p(t) : t ∈ T k ) is positive or negative or zero, respectively. In case DI k (p(t) : t ∈ T k ) > 0, define for every t ′ ∈ T ke , and in case DI k (p(t) : It follows from the construction that if DI k (p(t) : t ∈ T k ) > 0, then if DI k (p(t) : t ∈ T k ) < 0, then and if DI k (p(t) : t ∈ T k ) = 0, then for every t ∈ T k . In the first two cases, add to all the enties in te distributions (u j , j = 0, . . . , l), and to all the entries in the distributions (v t ′ , t ′ ∈ T ke ) (or (v t ′ , t ′ ∈ T ko )), the value of s (l + 1)2 k + 2 k−1 2 k , and in the third case, to all the enties in the distributions (u j , j = 0, . . . , l), the value of s (l + 1)2 k , and denote the distributions obtained by u ′ j , j = 0, . . . , l and v ′ t ′ , t ′ ∈ T ke (or v ′ t ′ , t ′ ∈ T ko ), so that the following holds: If DI k (p(t) : t ∈ T k ) > 0, then if DI k (p(t) : t ∈ T k ) < 0, then and if DI k (p(t) : t ∈ T k ) = 0, then for every t ∈ T k . The structures of the distributions in (11), (12) and (13) are as follows: The distribution u ′ 0 has the same entry in every cell. Each of the distributions u ′ j , j = 1, . . . , l has the same entry in every cell, except for one cell in T ke and one cell in T ko , which have the same value in them (different from the other cells) and these will be called the specific entries.
Each of the distributions v ′ t ′ , t ′ ∈ T ke (v ′ t ′ , t ′ ∈ T ko ) has the same entry in every cell, which will be called the common value, except for a cell in T ke ( T ko ), which has a larger value.
To complete the proof, it will be shown that which, together with directional collapsibility, Theroem 3, and (11), (12) and (13), imply the desired result.
To see (14) for j = 0, note that because all entries are the same, swapping the categories of one variable does not change the distribution but changes the sign of f k to its opposite by (ii), thus f k (u ′ 0 ) = 0. To see (14) for j = 1, . . . , l, consider a series of swaps of indices of variables, which exchanges the two cells with the specific values. If such a series of swaps exists, it leaves the distribution unchanged, as all other entries are the same. Such a series of swaps is obtained, if the indices of all variables are swapped, in an arbitrary order, which are 2 in any one of the cells with specific values but not in the other one. One of these cells is in T ke , thus has an even number of 2 ′ s, the other cell is in T ko , thus has an odd number of 2 ′ s. Therefore, the total number of indices equal to 2 in the two cells is odd. To obtain the number of indices that are equal to 2 in exactly one of the cells, from the odd total, the number of 2 ′ s in identical positions in the indices has to be subtracted. This latter number is even, so the total number of swaps is odd. By repeated application (ii), the sign of f k changes to its opposite during the series of swaps, but because the distribution remains the same, it cannot change. Thus, f k is zero for u ′ j , j = 1, . . . l. To see (15) and (16), note first that if t ′ = (1, 1, . . . , 1), then f k is positive, because, as was seen in the proof of (14) for j = 0, for a distribution with all entries equal, f k is zero, and if the entry in the cell (1, 1, . . . , 1) is increased to the value v ′ (1,1,...,1) (1, 1, . . . , 1), then by (i), f k will become positive.
For any t ′ ∈ T k , other than (1, 1, . . . , 1), write the value of v ′ t ′ (t ′ ) in celll (1, 1, . . . , 1), while keeping the common value in the other cells. This will give a positive f k . This entry can be moved into the cell t ′ by a series of swaps, while the common value remains in all other cells and also appears in (1, 1, . . . , 1). This requires an even number of swaps, if t ′ ∈ T ke , keeping the positive value, thus (15) is implied, and an odd number of swaps, if t ′ ∈ T ko , yielding a negative value, thus (16) is implied.

Discussion
This section addresses briefly the meaning and use of the results of the paper.
Odds ratios and log-linear parameters have the very attractive property of being variation independent from lower dimensional marginals, and, thus, make it possible to identify association with the information in the joint distribution which is there in addition to the information in the lower dimensional marginal distribution, see Rudas (1998). In particular, Property 4 implies that variants of the Iterative Proportional Fitting / Scaling algorithm may be used to obtain maximum likelihood estimates in various exponential family models that are specified by prescribing the values of odds ratios (Bishop et al., 1975;Rudas, 1991;Klimova & Rudas, 2014). However, as implied by Theorem 2, this property makes it impossible to find parameters of association, which are free from the possibility of Simpson's paradox, if Properties 1 and 2 are assumed.
The lack of directional collapsibility is considered problematic by most analysts, as testified not only by a large body of literature about "avoiding" it, but also by the wide-spread use of the Mantel-Haensel odds ratio in meta-analysis, which always estimates the common odds ratio to be in between the lowest and highest conditional odds ratios, even if the marginal odds ratio is outside of this range.
On the other hand, as implied by Theorem 4, if only the direction of association is of interest, and one wishes to use parameters of association which are directionally collapsible, then, if Properties 1 and 2 are assumed, there is only one possible choice for this direction, and it is given by DI k .
The simple linear contrast of the cell probabilities, DI k , is not necessarily seen as a meaningful parameter of association, and those who are not willing to accept the direction of association as given by it, have to accept that Simpson's paradox cannot be avoided. Another argument for using DI k in certain situations, given in Rudas (2010), is that if the data are observational, then allocation in treatment categories is potentially informative, thus association (effect) should not be measured by a parameter which is variationally independent of the treatment marginal(s). In such cases, avoiding Simpson's paradox is an additional bonus, which comes with using DI k Whether or not one is ready to adopt DI k to determine the direction of association, it is worth noting that its sampling behaviour is straightforward, in particular it does not depend on the individual cell entries, and not even on k. If the population probability (fraction) of cells in T ke is p, then the probability that sgn(DI k ) = 1, which will lead to the correct or incorrect decision as to the direction of association depending on whether p > 0.5 or p ≤ 0.5, may be obtained as follows. In the case of multinomial sampling with N observations, Which, for large sample sizes, may be approximated as where Φ is the cumulative distribution function of the standard normal distribution. For example, with a sample size of 1000, and true value of DI k = 0.05, that is p = 0.525, the probability of correctly deciding that the association is positive is about 0.94, which seems quite certain, even though the assumed true value is not very far from zero. An important property of the probability