Skip to the content

Topics Covered

Notations Order of Class Ultimate Frequencies Consistency Independence Association Yule's Q Colligation Dichotomy Algebra Coefficient of Contingency Worked Problems
On this page
  1. 1. Notation for Attributes
  2. 2. Order of Class Frequencies
  3. 3. Ultimate Class Frequencies
  4. 4. Consistency of Data
  5. 5. Independence of Attributes
  6. 6. Association of Attributes — Yule's Coefficient \(Q\)
  7. 7. Coefficient of Colligation \(\omega\)
  8. 8. Worked Examples
  9. Worked Problems on Theory of Attributes
  10. Key Take-aways

1. Notation for Attributes

DEFINITION

An attribute is a qualitative characteristic of an individual that cannot be measured quantitatively but can only be classified (e.g., honesty, gender, eye colour, smoking habit).

If a population is classified by attribute A, an individual either possesses A (denoted \(A\)) or does not possess A (denoted \(\alpha\), the "negation"). Similarly we use \(B, \beta\), \(C, \gamma\), etc.

Frequency Notation

Dichotomy and manifold classification

Dividing a population into exactly two classes, those with the attribute and those without, is called dichotomy. The two classes are mutually exclusive (no one is in both) and exhaustive (everyone is in one). When an attribute is split into more than two classes, for example eye colour into blue, grey and brown, the classification is manifold. This unit works with dichotomies; manifold tables come back in section 7, with the coefficient of contingency.

EXAMPLE — reading a class symbol

Let \(A\) = drinking and \(B\) = singing, so \(\alpha\) = non-drinking and \(\beta\) = non-singing. Read each letter as a property the class must have:

Capital letters are called positive attributes and Greek letters negative attributes.

2. Order of Class Frequencies

Class frequencies are classified by order = number of attributes specified.

How many class frequencies are there?

RESULT

With \(n\) attributes, the number of class frequencies of order \(r\) is \(\binom{n}{r}2^r\), and the total number of class frequencies of all orders is \(3^n\).

Why. A class of order \(r\) is fixed by two choices.

  1. Choose which \(r\) of the \(n\) attributes are specified: \(\binom{n}{r}\) ways.
  2. For each chosen attribute, choose present (capital letter) or absent (Greek letter): 2 ways each, so \(2^r\) ways in all.

Multiplying gives \(\binom{n}{r}2^r\). Adding over \(r = 0, 1, \dots, n\) and using the binomial theorem \(\sum_r \binom{n}{r} a^r b^{\,n-r} = (a+b)^n\) with \(a = 2\), \(b = 1\):

\[ \sum_{r=0}^{n}\binom{n}{r}2^r = (2+1)^n = 3^n . \]

Another way to see \(3^n\): each attribute is either present, absent, or not mentioned, which is three options per attribute.

EXAMPLE — three attributes
Order \(r\)CountClass frequencies
01\(N\)
16\((A), (\alpha)\), \((B), (\beta)\), \((C), (\gamma)\)
212\((AB), (A\beta)\), \((\alpha B), (\alpha\beta)\), \((AC), (A\gamma)\), \((\alpha C), (\alpha\gamma)\), \((BC), (B\gamma)\), \((\beta C), (\beta\gamma)\)
38\((ABC), (AB\gamma)\), \((A\beta C), (\alpha BC)\), \((A\beta\gamma), (\alpha B\gamma)\), \((\alpha\beta C), (\alpha\beta\gamma)\)
Total27\(= 3^3\)

Positive class frequencies

A class frequency with no Greek letter, such as \((A)\), \((AB)\) or \((ABC)\), is a positive class frequency; \(N\) counts as one too. Of order \(r\) there are only \(\binom{n}{r}\) of them (choose the attributes; each is present), so there are \(\sum_r \binom{n}{r} = 2^n\) in all. For three attributes these are the 8 frequencies

\[ N,\; (A),\; (B),\; (C),\; (AB),\; (AC),\; (BC),\; (ABC). \]

They matter because every other class frequency can be computed from them (section 3), so a table of \(n\) attributes is fully known from its \(2^n\) positive class frequencies.

3. Ultimate Class Frequencies

The frequencies of the highest-order classes (where every attribute is specified as either present or absent) are called ultimate class frequencies. For 2 attributes there are \(2^2 = 4\) ultimate frequencies; for 3 attributes there are \(2^3 = 8\).

Lower-order frequencies can be expressed as sums of ultimate frequencies. E.g.

\[ (A) = (AB) + (A\beta), \quad (B) = (AB) + (\alpha B), \quad N = (AB)+(A\beta)+(\alpha B)+(\alpha\beta). \]
B β Total A α Total (AB) (Aβ) (A) (αB) (αβ) (α) (B) (β) N Blue = 4 ultimate frequencies • Amber = margins • each row/column sums to N
Fig 5.1 — The \(2\times2\) contingency structure: the four ultimate frequencies (blue) add across each row and column to the first-order margins (amber), which in turn sum to \(N\).

Relations between class frequencies

Every class splits into two smaller classes by bringing in one more attribute: the members who have it and the members who do not. So any class frequency is the sum of two frequencies of the next order:

\[ N = (A) + (\alpha), \qquad (A) = (AB) + (A\beta), \qquad (AB) = (ABC) + (AB\gamma). \]

Repeating the split until every attribute is specified writes any class frequency as a sum of ultimate frequencies. For three attributes, for example,

\[ (C) = (AC) + (\alpha C) = (ABC) + (A\beta C) + (\alpha BC) + (\alpha\beta C), \]

and \(N\) is the sum of all 8 ultimate frequencies. For this reason the ultimate frequencies are called the fundamental set: knowing them, we know every class frequency.

Going the other way: the dichotomy algebra

The positive class frequencies are also a complete set: every frequency with Greek letters can be written in terms of them. A symbolic shorthand does this quickly.

  1. Notation. Write \(A\cdot N\) for \((A)\), \(AB\cdot N\) for \((AB)\), \(\alpha\cdot N\) for \((\alpha)\), and so on: the letters in front of \(N\) pick out a class.
  2. The key rule. Every individual either has \(A\) or does not, so \((A) + (\alpha) = N\), that is \((A + \alpha)\cdot N = N\). Hence, as operators, \(A + \alpha = 1\), or
\[ \alpha = 1 - A, \qquad \beta = 1 - B, \qquad \gamma = 1 - C. \]

Now replace each Greek letter, multiply out, and read each term back as a frequency.

FORMULAS \[ (\alpha\beta) = (1-A)(1-B)\cdot N = N - (A) - (B) + (AB), \] \[ (AB\gamma) = AB(1-C)\cdot N = (AB) - (ABC), \] \[ (\alpha\beta C) = (1-A)(1-B)C\cdot N = (C) - (AC) - (BC) + (ABC), \] \[ (\alpha\beta\gamma) = N - (A) - (B) - (C) + (AB) + (AC) + (BC) - (ABC). \]

The last line comes from expanding \((1-A)(1-B)(1-C)\): the terms of one letter enter with a minus sign, the terms of two letters with a plus sign, and the term of three letters with a minus sign. It is the inclusion–exclusion principle written for frequencies.

A lower bound for the joint frequency

THEOREM

For any \(n\) attributes \(A_1, A_2, \dots, A_n\),

\[ (A_1 A_2 \cdots A_n) \;\ge\; (A_1) + (A_2) + \cdots + (A_n) - (n-1)N . \]

Proof (by induction on \(n\)).

  1. Case \(n = 2\). The ultimate frequency \((\alpha_1\alpha_2)\) cannot be negative, and by the dichotomy algebra \((\alpha_1\alpha_2) = N - (A_1) - (A_2) + (A_1A_2)\). So \(N - (A_1) - (A_2) + (A_1A_2) \ge 0\), which rearranges to \[ (A_1A_2) \ge (A_1) + (A_2) - N . \qquad \text{(i)} \]
  2. Induction hypothesis. Suppose the result holds for every set of \(r\) attributes: \[ (A_1 \cdots A_r) \ge (A_1) + \cdots + (A_r) - (r-1)N . \qquad \text{(ii)} \]
  3. Step to \(r+1\). Treat the pair \(A_rA_{r+1}\) as a single attribute. Then \(A_1, \dots, A_{r-1}, A_rA_{r+1}\) are \(r\) attributes, and (ii) applies to them: \[ (A_1 \cdots A_{r+1}) \ge (A_1) + \cdots + (A_{r-1}) + (A_rA_{r+1}) - (r-1)N . \]
  4. By (i), applied to the pair \(A_r, A_{r+1}\), \((A_rA_{r+1}) \ge (A_r) + (A_{r+1}) - N\). Putting this into the line above: \[ (A_1 \cdots A_{r+1}) \ge (A_1) + \cdots + (A_{r+1}) - rN , \] which is the result for \(r+1\) attributes. By induction it holds for every \(n\). \(\blacksquare\)

Use. In percentages (\(N = 100\)) with three attributes it reads \((ABC) \ge (A) + (B) + (C) - 200\). If 65%, 90% and 60% of candidates pass three papers, at least \(65 + 90 + 60 - 200 = 15\)% pass all three.

4. Consistency of Data

DEFINITION

A set of class frequencies is consistent if it does not violate the basic axiom that every frequency must be non-negative.

4.1 Conditions of Consistency for Two Attributes

The four ultimate frequencies must all be \(\ge 0\). Since

\[ (AB) \ge 0,\quad (A\beta) = (A) - (AB) \ge 0,\quad (\alpha B) = (B) - (AB) \ge 0, \] \[ (\alpha\beta) = N - (A) - (B) + (AB) \ge 0, \]

the consistency conditions reduce to:

\[ 0 \le (AB) \le \min\{(A), (B)\}, \qquad (AB) \ge (A) + (B) - N. \]

4.2 Conditions for Three Attributes

For one attribute the only condition is \(0 \le (A) \le N\). For three attributes the 8 ultimate frequencies must all be \(\ge 0\). Write each one through the positive class frequencies (the dichotomy algebra of section 3) and rearrange it as a bound on \((ABC)\):

Ultimate frequency (must be \(\ge 0\))Condition on \((ABC)\)
\((ABC)\)\((ABC) \ge 0\)(i)
\((AB\gamma) = (AB) - (ABC)\)\((ABC) \le (AB)\)(ii)
\((A\beta C) = (AC) - (ABC)\)\((ABC) \le (AC)\)(iii)
\((\alpha BC) = (BC) - (ABC)\)\((ABC) \le (BC)\)(iv)
\((A\beta\gamma) = (A) - (AB) - (AC) + (ABC)\)\((ABC) \ge (AB) + (AC) - (A)\)(v)
\((\alpha B\gamma) = (B) - (AB) - (BC) + (ABC)\)\((ABC) \ge (AB) + (BC) - (B)\)(vi)
\((\alpha\beta C) = (C) - (AC) - (BC) + (ABC)\)\((ABC) \ge (AC) + (BC) - (C)\)(vii)
\((\alpha\beta\gamma)\)\((ABC) \le (AB) + (AC) + (BC)\) \(- (A) - (B) - (C) + N\)(viii)

The data are consistent exactly when all eight hold. Conditions (i), (v), (vi) and (vii) are lower bounds on \((ABC)\); (ii), (iii), (iv) and (viii) are upper bounds.

Consistency when \((ABC)\) is not given

Often only the frequencies up to order two are given. They are consistent when some value of \((ABC)\) satisfies (i)–(viii), that is, when every lower bound is at most every upper bound. Taking the 16 pairs one at a time, twelve of them give back the two-attribute conditions of 4.1 for the pairs \((A,B)\), \((A,C)\) and \((B,C)\). The other four are new:

CONDITIONS

From (i) and (viii):

\[ (AB) + (AC) + (BC) \ge (A) + (B) + (C) - N . \]

From (iv) and (v):

\[ (AB) + (AC) - (BC) \le (A) . \]

From (iii) and (vi):

\[ (AB) + (BC) - (AC) \le (B) . \]

From (ii) and (vii):

\[ (AC) + (BC) - (AB) \le (C) . \]

For example, (iv) and (v) together say \((AB) + (AC) - (A) \le (ABC) \le (BC)\), which is possible only if \((AB) + (AC) - (A) \le (BC)\), the second condition. So the second-order data of three attributes are consistent if and only if each pair passes the two-attribute test and these four inequalities hold. (This was also confirmed by checking every table with \(N = 6\) by computer.)

EXAMPLE 1

Given: \(N = 1000,\; (A) = 600,\; (B) = 500,\; (AB) = 200\). Check consistency.

\((A\beta) = 600 - 200 = 400 \ge 0\) ✓.

\((\alpha B) = 500 - 200 = 300 \ge 0\) ✓.

\((\alpha\beta) = 1000 - 600 - 500 + 200 = 100 \ge 0\) ✓.

Data are consistent.

EXAMPLE 2 (Inconsistent)

\(N = 100,\; (A) = 70,\; (B) = 60,\; (AB) = 20\). Check.

\((\alpha\beta) = 100 - 70 - 60 + 20 = -10 < 0\) ✗ — inconsistent.

5. Independence of Attributes

DEFINITION

Two attributes \(A\) and \(B\) are independent if the proportion of \(A\) in the population is the same as the proportion of \(A\) within \(B\):

\[ \dfrac{(AB)}{(B)} \;=\; \dfrac{(A)}{N}. \]

Equivalently:

\[ (AB) \;=\; \dfrac{(A)(B)}{N}. \]

Comparison with the Expected Frequency

EXAMPLE 1

Among 1000 people: 200 have attribute \(A\), 300 have \(B\), and 60 have both.
Expected \((AB)\) under independence = \(200 \cdot 300 / 1000 = 60\). Observed = 60.
\(A\) and \(B\) are independent.

EXAMPLE 2

Same population, but \((AB) = 80\). Expected = 60, so \(80 > 60\) ⇒ positive association.

Three equivalent tests of independence

The definition says that \(B\) makes no difference to how common \(A\) is. That idea can be written in three ways, and all three are the same condition.

THEOREM

For two attributes the following are equivalent:

  1. \(\dfrac{(AB)}{(B)} = \dfrac{(A\beta)}{(\beta)}\): the proportion of A's is the same among the B's as among the \(\beta\)'s;
  2. \((AB) = \dfrac{(A)(B)}{N}\);
  3. \((AB)(\alpha\beta) = (A\beta)(\alpha B)\).

Criterion 1. If \(A\) and \(B\) are independent, the proportion of A's is the same among the B's as among the \(\beta\)'s: \(\dfrac{(AB)}{(B)} = \dfrac{(A\beta)}{(\beta)}\). Subtracting each side from 1,

\[ \frac{(B) - (AB)}{(B)} = \frac{(\beta) - (A\beta)}{(\beta)} \;\Longrightarrow\; \frac{(\alpha B)}{(B)} = \frac{(\alpha\beta)}{(\beta)} . \]

In the same way, the proportion of B's is the same among the A's as among the \(\alpha\)'s, \(\dfrac{(AB)}{(A)} = \dfrac{(\alpha B)}{(\alpha)}\), and subtracting from 1,

\[ \frac{(A) - (AB)}{(A)} = \frac{(\alpha) - (\alpha B)}{(\alpha)} \;\Longrightarrow\; \frac{(A\beta)}{(A)} = \frac{(\alpha\beta)}{(\alpha)} . \]

Criterion 2. \((AB) = \dfrac{(A)(B)}{N}\). If two fractions are equal, say \(a/b = c/d = k\), then \(a = kb\) and \(c = kd\), so \((a + c)/(b + d) = k\) as well. Apply this to criterion 1 with \(a = (AB)\), \(b = (B)\), \(c = (A\beta)\), \(d = (\beta)\):

\[ \frac{(AB)}{(B)} = \frac{(AB) + (A\beta)}{(B) + (\beta)} = \frac{(A)}{N}, \]

and multiplying by \((B)\) gives criterion 2. Conversely, using \((A\beta) = (A) - (AB)\) and \((\beta) = N - (B)\), criterion 2 gives \(\dfrac{(A\beta)}{(\beta)} = \dfrac{(A) - (A)(B)/N}{N - (B)} = \dfrac{(A)}{N} = \dfrac{(AB)}{(B)}\).

Criterion 3. If \(A\) and \(B\) are independent, so are \(A\) and \(\beta\), \(\alpha\) and \(B\), and \(\alpha\) and \(\beta\) (criterion 1 above, and the excess \(\delta\) below). Then by criterion 2 for each pair,

\[ (AB)(\alpha\beta) = \frac{(A)(B)}{N}\cdot\frac{(\alpha)(\beta)}{N} = \frac{(A)(\beta)}{N}\cdot\frac{(\alpha)(B)}{N} = (A\beta)(\alpha B) . \]

Criteria 2 and 3 are the same condition. Expand the cross products using \((A\beta) = (A) - (AB)\), \((\alpha B) = (B) - (AB)\) and \((\alpha\beta) = N - (A) - (B) + (AB)\):

\[ (AB)(\alpha\beta) = N(AB) - (A)(AB) - (B)(AB) + (AB)^2, \] \[ (A\beta)(\alpha B) = (A)(B) - (A)(AB) - (B)(AB) + (AB)^2 . \]

Subtracting, everything cancels except two terms:

KEY IDENTITY \[ (AB)(\alpha\beta) - (A\beta)(\alpha B) = N(AB) - (A)(B) = N\delta, \qquad \delta = (AB) - \frac{(A)(B)}{N}. \]

So the cross products are equal exactly when \(\delta = 0\), that is, when 2 holds. \(\blacksquare\)

The excess \(\delta\) is the same in every cell

\(\delta\) is how far the observed \((AB)\) is above the frequency expected under independence. The other three cells are off by the same amount. For instance, using \((\beta) = N - (B)\),

\[ (A\beta) - \frac{(A)(\beta)}{N} = (A) - (AB) - (A) + \frac{(A)(B)}{N} = -\delta , \]

and in the same way \((\alpha B) - (\alpha)(B)/N = -\delta\) and \((\alpha\beta) - (\alpha)(\beta)/N = +\delta\). Two consequences follow.

Criteria of association

The tests of independence turn into tests of association by replacing “=” with “>” or “<”. \(A\) and \(B\) are positively associated when

\[ \frac{(AB)}{(B)} > \frac{(A\beta)}{(\beta)}, \quad \text{or equivalently} \quad (AB) > \frac{(A)(B)}{N}, \quad \text{i.e. } \delta > 0, \]

and negatively associated when the inequalities are reversed. The three forms agree because

\[ \frac{(AB)}{(B)} - \frac{(A\beta)}{(\beta)} = \frac{(AB)(\beta) - (A\beta)(B)}{(B)(\beta)} = \frac{N\delta}{(B)(\beta)} , \]

where the numerator was simplified exactly as in the key identity, and \((B)(\beta) > 0\).

6. Association of Attributes — Yule's Coefficient \(Q\)

DEFINITION

Yule's coefficient of association:

\[ Q \;=\; \dfrac{(AB)(\alpha\beta) - (A\beta)(\alpha B)}{(AB)(\alpha\beta) + (A\beta)(\alpha B)}. \]

Properties of \(Q\)

  1. \(-1 \le Q \le 1\).
  2. \(Q = 0\) ⇔ attributes are independent.
  3. \(Q = +1\) ⇒ perfect positive association ((Aβ) = 0 or (αB) = 0).
  4. \(Q = -1\) ⇒ perfect negative association ((AB) = 0 or (αβ) = 0).
  5. Sign of \(Q\) reflects direction of association.

Proof that \(Q\) lies between \(-1\) and \(1\)

  1. Write \(a = (AB)(\alpha\beta)\) and \(b = (A\beta)(\alpha B)\), so that \(Q = \dfrac{a - b}{a + b}\). Both are products of frequencies, so \(a \ge 0\) and \(b \ge 0\); and \(a + b > 0\), or \(Q\) is not defined.
  2. Since \(b \ge 0\): \(a - b \le a + b\). Since \(a \ge 0\): \(a - b \ge -a - b = -(a + b)\).
  3. So \(-(a+b) \le a - b \le a + b\). Dividing by the positive number \(a + b\) gives \(-1 \le Q \le 1\). \(\blacksquare\)

By the key identity of section 5, the numerator \(a - b\) equals \(N\delta\). So \(Q\) has the sign of \(\delta\): positive for positive association, negative for negative association, and zero exactly when the attributes are independent.

When does \(Q\) equal \(+1\) or \(-1\)?

Because a single empty cell already gives \(Q = \pm 1\), \(Q\) reports “complete” association in tables where the two attributes are far from going together in every case. For example, \((AB) = 10\), \((A\beta) = 0\), \((\alpha B) = 90\), \((\alpha\beta) = 900\) gives \(Q = 1\), although only 10 of the 100 B's are A's.

7. Coefficient of Colligation \(\omega\)

DEFINITION

Yule's coefficient of colligation (many books write it \(Y\)):

\[ \omega \;=\; \dfrac{\sqrt{(AB)(\alpha\beta)} - \sqrt{(A\beta)(\alpha B)}}{\sqrt{(AB)(\alpha\beta)} + \sqrt{(A\beta)(\alpha B)}}. \]

Dividing the numerator and denominator by \(\sqrt{(AB)(\alpha\beta)}\) gives the equivalent form

\[ \omega = \frac{1 - \sqrt{K}}{1 + \sqrt{K}}, \qquad K = \frac{(A\beta)(\alpha B)}{(AB)(\alpha\beta)} . \]

Relation between \(Q\) and \(\omega\)

\[ Q \;=\; \dfrac{2\,\omega}{1 + \omega^2}. \]

Proof of the relation \(Q = 2\omega/(1+\omega^2)\)

  1. Divide the numerator and denominator of \(Q\) by \((AB)(\alpha\beta)\): \(Q = \dfrac{1 - K}{1 + K}\).
  2. Square \(\omega = \dfrac{1-\sqrt K}{1+\sqrt K}\) and add 1, over the common denominator \((1+\sqrt K)^2\): \[ 1 + \omega^2 = \frac{(1+\sqrt K)^2 + (1-\sqrt K)^2}{(1+\sqrt K)^2} = \frac{2(1+K)}{(1+\sqrt K)^2}, \] because the cross terms \(\pm 2\sqrt K\) cancel.
  3. Divide \(2\omega = \dfrac{2(1-\sqrt K)}{1+\sqrt K}\) by this: \[ \frac{2\omega}{1+\omega^2} = \frac{2(1-\sqrt K)}{1+\sqrt K}\cdot\frac{(1+\sqrt K)^2}{2(1+K)} = \frac{(1-\sqrt K)(1+\sqrt K)}{1+K} = \frac{1-K}{1+K} . \]
  4. This is \(Q\) by step 1. \(\blacksquare\)

Limits of \(\omega\)

\(\omega\) lies between \(-1\) and \(1\). Since \(K \ge 0\), put \(s = \sqrt K \ge 0\); then \(\omega = \dfrac{1 - s}{1 + s} = -1 + \dfrac{2}{1 + s}\), which decreases from 1 (at \(s = 0\)) towards \(-1\) as \(s\) grows, so \(-1 \le \omega \le 1\). Using the relation \(Q = 2\omega/(1 + \omega^2)\):

Also \(|\omega| \le |Q|\): since \(\omega^2 \le 1\), the denominator \(1 + \omega^2\) is at most 2, so \(|Q| = 2|\omega|/(1+\omega^2) \ge |\omega|\). Fig 5.2 shows the curve.

-1 -1 -0.5 -0.5 0 0 0.5 0.5 1 1 Q = 2ω / (1 + ω²) dashed: Q = ω A B coefficient of colligation ω coefficient of association Q
Fig 5.2 — \(Q\) as a function of \(\omega\). Both run from \(-1\) to \(1\) and share their sign and their zero, but the curve lies further from zero than the dashed line \(Q = \omega\): \(Q\) always reports a stronger association than \(\omega\). Point A is Worked Problem 7 (\(\omega = 0.348\), \(Q = 0.620\)); point B is Example 1 of section 8 (\(\omega = 0.292\), \(Q = 0.538\)).

Measures for larger tables: \(\phi^2\), \(C\) and \(T\)

\(Q\) and \(\omega\) need a \(2\times2\) table. For a manifold classification into an \(r \times s\) table, association is measured through the \(\chi^2\) statistic, \(\chi^2 = \sum (O - E)^2/E\), where each expected frequency \(E\) is (row total \(\times\) column total)\(/N\), as under independence.

FORMULAS

Mean square contingency:

\[ \phi^2 = \frac{\chi^2}{N} . \]

Karl Pearson's coefficient of contingency:

\[ C = \sqrt{\frac{\chi^2}{\chi^2 + N}} = \sqrt{\frac{\phi^2}{1 + \phi^2}} . \]

Tschuprow's coefficient:

\[ T = \sqrt{\frac{\phi^2}{\sqrt{(r-1)(s-1)}}} . \]
EXAMPLE — \(\phi^2\), \(C\) and \(T\) for a \(2\times2\) table

Take the table of Worked Problem 7: \((AB) = 42\), \((A\beta) = 28\), \((\alpha B) = 13\), \((\alpha\beta) = 37\), with \((A) = 70\), \((\alpha) = 50\), \((B) = 55\), \((\beta) = 65\), \(N = 120\).

Expected frequencies. \(70 \times 55/120 = 32.083\) for \((AB)\), \(70 \times 65/120 = 37.917\) for \((A\beta)\), \(50 \times 55/120 = 22.917\) for \((\alpha B)\) and \(50 \times 65/120 = 27.083\) for \((\alpha\beta)\). Each cell is off by \(\delta = 42 - 32.083 = 9.917\) in size.

\[ \begin{aligned} \chi^2 &= \frac{9.917^2}{32.083} + \frac{9.917^2}{37.917} + \frac{9.917^2}{22.917} + \frac{9.917^2}{27.083} = 3.065 + 2.594 + 4.291 + 3.631 \\ &= 13.581 . \end{aligned} \]

Then \(\phi^2 = 13.581/120 = 0.1132\), \(\phi = T = 0.336\), and

\[ C = \sqrt{\frac{13.581}{133.581}} = \sqrt{0.1017} = 0.319 . \]

All three put the association in the moderate range, while \(Q = 0.62\) reports it as fairly strong: \(Q\) and \(\omega\) are built from the cross products and run larger than \(\phi\) and \(C\) on the same table.

8. Worked Examples

EXAMPLE 1

Among 200 people: \((AB) = 80,\; (A\beta) = 30,\; (\alpha B) = 40,\; (\alpha\beta) = 50\).

\(Q = (80 \cdot 50 - 30 \cdot 40)/(80 \cdot 50 + 30 \cdot 40)\) \(= (4000 - 1200)/(4000 + 1200)\) \(= 2800/5200 = 0.538\).

A moderate positive association: \(Q\) is a little over one half.

\(\omega = (\sqrt{4000} - \sqrt{1200})/(\sqrt{4000} + \sqrt{1200})\) \(= (63.25 - 34.64)/(63.25 + 34.64)\) \(= 28.61/97.89 = 0.292\).

Verify: \(2\omega/(1+\omega^2) = 0.584/(1.0853) ≈ 0.538\) ✓.

EXAMPLE 2 (Independence)

Among 1000 individuals: \((AB) = 60, (A\beta) = 140, (\alpha B) = 240, (\alpha\beta) = 560\).

Check: \((A) = 60+140 = 200,\; (B) = 60+240 = 300\); expected \((AB) = 200 \cdot 300 / 1000 = 60\) — matches observed.

\(Q = (60 \cdot 560 - 140 \cdot 240)/(60 \cdot 560 + 140 \cdot 240)\) \(= (33600 - 33600)/(33600 + 33600) = 0\). Attributes are independent.

Worked Problems on Theory of Attributes

Eight problems, grouped by topic, then eight exercises with answers. Every frequency is derived from the given ones and checked: the ultimate frequencies must be non-negative and must add to \(N\).

A. Class Frequencies

WORKED PROBLEM 1 — all 27 class frequencies from the 8 positive ones

Given. \(N = 18450\), \((A) = 1420\), \((B) = 1860\), \((C) = 690\), \((AB) = 512\), \((AC) = 284\), \((BC) = 371\), \((ABC) = 133\). Find the remaining class frequencies.

Plan. Three attributes have \(3^3 = 27\) class frequencies; 8 are given, so 19 remain. Work upwards in order: first order, then second, then third, each time subtracting from a frequency already known (section 3).

Step 1: first order. \((\alpha) = 18450 - 1420 = 17030\), \((\beta) = 18450 - 1860 = 16590\), \((\gamma) = 18450 - 690 = 17760\).

Step 2: second order. Each pair of attributes gives a \(2\times2\) table, completed from its margins.

PairFrequencyWorkingValue
A, B\((A\beta)\)\((A) - (AB) = 1420 - 512\)908
\((\alpha B)\)\((B) - (AB) = 1860 - 512\)1348
\((\alpha\beta)\)\((\alpha) - (\alpha B) = 17030 - 1348\)15682
A, C\((A\gamma)\)\((A) - (AC) = 1420 - 284\)1136
\((\alpha C)\)\((C) - (AC) = 690 - 284\)406
\((\alpha\gamma)\)\((\alpha) - (\alpha C) = 17030 - 406\)16624
B, C\((B\gamma)\)\((B) - (BC) = 1860 - 371\)1489
\((\beta C)\)\((C) - (BC) = 690 - 371\)319
\((\beta\gamma)\)\((\beta) - (\beta C) = 16590 - 319\)16271

Step 3: third order (the ultimate frequencies).

FrequencyWorkingValue
\((AB\gamma)\)\((AB) - (ABC) = 512 - 133\)379
\((A\beta C)\)\((AC) - (ABC) = 284 - 133\)151
\((\alpha BC)\)\((BC) - (ABC) = 371 - 133\)238
\((A\beta\gamma)\)\((A\beta) - (A\beta C) = 908 - 151\)757
\((\alpha B\gamma)\)\((\alpha B) - (\alpha BC) = 1348 - 238\)1110
\((\alpha\beta C)\)\((\beta C) - (A\beta C) = 319 - 151\)168
\((\alpha\beta\gamma)\)\((\alpha\beta) - (\alpha\beta C) = 15682 - 168\)15514

Check. The 8 ultimate frequencies must add to \(N\): \(133 + 379 + 151 + 238 + 757 + 1110 + 168 + 15514 = 18450\). ✓ As a second check, the formula of section 3 gives \((\alpha\beta\gamma) = 18450 - 1420 - 1860 - 690 + 512 + 284 + 371 - 133 = 15514\).

B. Consistency

WORKED PROBLEM 2 — a two-attribute report

Given. \(N = 600\), \((A) = 450\), \((B) = 420\), \((AB) = 260\). Are the data consistent?

Method. Compute the four ultimate frequencies; all must be \(\ge 0\).

\[ (A\beta) = 450 - 260 = 190, \qquad (\alpha B) = 420 - 260 = 160, \] \[ (\alpha\beta) = N - (A) - (B) + (AB) = 600 - 450 - 420 + 260 = -10 . \]

Conclusion. \((\alpha\beta) = -10 < 0\), which is impossible for a count, so the data are inconsistent. Equivalently, the condition \((AB) \ge (A) + (B) - N = 270\) fails, since \(260 < 270\): if 450 of 600 have A and 420 have B, at least 270 must have both.

WORKED PROBLEM 3 — neither \(x\) nor \(y\) can exceed \(\tfrac16\)

Given. \((A)/N = x\), \((B)/N = 3x\), \((C)/N = 4x\) and \((AB)/N = (AC)/N = (BC)/N = y\). Show that for consistent data neither \(x\) nor \(y\) can exceed \(\tfrac16\).

  1. From the two-attribute condition \((AB) \le (A)\): dividing by \(N\), \(y \le x\). (1)
  2. From the two-attribute condition \((BC) \ge (B) + (C) - N\): dividing by \(N\), \(y \ge 3x + 4x - 1 = 7x - 1\). (2)
  3. Put (1) and (2) together: \(7x - 1 \le y \le x\), so \(6x \le 1\), or \(x \le \tfrac16\). (3)
  4. By (1) and (3), \(y \le x \le \tfrac16\). So neither can exceed \(\tfrac16\). \(\blacksquare\)

The bound is reached. At \(x = \tfrac16\), (1) and (2) force \(y = \tfrac16\). Taking also \((ABC)/N = \tfrac16\), the ultimate frequencies (as fractions of \(N\)) are \(\tfrac16\) for \((ABC)\), \(\tfrac13\) for \((\alpha B\gamma)\), \(\tfrac12\) for \((\alpha\beta C)\), and 0 for the other five: all \(\ge 0\), so \(x = y = \tfrac16\) is consistent.

WORKED PROBLEM 4 — limits to the percentage of B's that are C's

Given. \((A) = (B) = (C) = \tfrac12 N\); 70% of the A's are B's and 80% of the A's are C's. Find the limits to the percentage of B's that are C's.

Step 1: translate. \((AB) = 0.7(A) = 0.35N\) and \((AC) = 0.8(A) = 0.4N\). The quantity asked for is \(100(BC)/(B) = 100 \times 2(BC)/N\) per cent.

Step 2: the four three-attribute conditions of section 4 (the two-attribute conditions only say it lies between 0% and 100%).

Answer. Between 50% and 90% of the B's are C's. Both ends are attainable: a search over all values of \((BC)\) and \((ABC)\) (with \(N = 200\)) finds consistent tables exactly on this interval. Note which percentage is given: “80% of the A's are C's” fixes \((AC)\) through \((A)\), not through \((C)\).

Two-attribute limits for the pair (B, C): 0% to 100% (AB) + (AC) − (BC) ≤ (A) gives at least 50% (AB) + (BC) − (AC) ≤ (B) gives at most 110%: no new limit (AC) + (BC) − (AB) ≤ (C) gives at most 90% (AB) + (AC) + (BC) ≥ (A) + (B) + (C) − N gives at least −50%: no new limit All conditions together: 50% to 90% 0 10 20 30 40 50 60 70 80 90 100 percentage of B’s that are C’s, 100(BC)/(B)
Fig 5.3 — Worked Problem 4. Each consistency condition allows part of the scale; the data are consistent only where all of them overlap. Two of the four three-attribute conditions bind, giving 50% to 90%.

C. Independence and Association

WORKED PROBLEM 5 — completing a table under independence

Given. \(N = 800\), \((A) = 200\), \((B) = 360\), and A and B are independent. Find \((AB)\) and \((\alpha\beta)\).

Step 1. By the independence criterion, \((AB) = \dfrac{(A)(B)}{N} = \dfrac{200 \times 360}{800} = 90\).

Step 2. If A and B are independent, so are \(\alpha\) and \(\beta\) (section 5). With \((\alpha) = 600\) and \((\beta) = 440\),

\[ (\alpha\beta) = \frac{(\alpha)(\beta)}{N} = \frac{600 \times 440}{800} = 330 . \]

Check. \((\alpha\beta) = N - (A) - (B) + (AB) = 800 - 200 - 360 + 90 = 330\). ✓

WORKED PROBLEM 6 — testing for association

Given. \(N = 1200\), \((A) = 500\), \((B) = 720\), \((AB) = 330\). Are A and B associated?

Step 1. Under independence we would expect \((A)(B)/N = 500 \times 720/1200 = 300\).

Step 2. Observed \((AB) = 330 > 300\), so \(\delta = 30 > 0\): A and B are positively associated.

How strongly? The table is \((AB) = 330\), \((A\beta) = 170\), \((\alpha B) = 390\), \((\alpha\beta) = 310\), so

\[ Q = \frac{330 \times 310 - 170 \times 390}{330 \times 310 + 170 \times 390} = \frac{102300 - 66300}{102300 + 66300} = \frac{36000}{168600} = 0.214 , \]

a weak positive association. The numerator is \(N\delta = 1200 \times 30\), as the key identity says.

WORKED PROBLEM 7 — yoga and sleep

Given. Of 120 adults, 70 practise yoga (A), 55 report sleeping well (B), and 42 do both. Find Yule's coefficient of association and interpret it.

Step 1: complete the table.

\(B\) (sleeps well)\(\beta\) (does not)Total
\(A\) (yoga)422870
\(\alpha\) (no yoga)133750
Total5565120

Step 2: the cross products. \((AB)(\alpha\beta) = 42 \times 37 = 1554\) and \((A\beta)(\alpha B) = 28 \times 13 = 364\).

\[ Q = \frac{1554 - 364}{1554 + 364} = \frac{1190}{1918} = 0.6204 . \]

Step 3: colligation, as a check. \(K = 364/1554 = 0.2342\), \(\sqrt K = 0.4840\), so

\[ \omega = \frac{1 - 0.4840}{1 + 0.4840} = 0.3477, \qquad \frac{2\omega}{1+\omega^2} = \frac{0.6955}{1.1209} = 0.6204 = Q . \;\checkmark \]

Interpretation. \(Q = 0.62\) is a fairly strong positive association: those who practise yoga sleep well more often (42 of 70, 60%) than those who do not (13 of 50, 26%). Association is not cause: people who sleep well may simply be more likely to keep up a morning routine.

WORKED PROBLEM 8 — home area and examination result

Given. Of 250 students, 160 come from towns; 128 town students and 72 village students passed. Let A = from a town and B = passed. Is there any association?

\(A\) (town)\(\alpha\) (village)Total
\(B\) (passed)12872200
\(\beta\) (failed)321850
Total16090250
\[ Q = \frac{(AB)(\alpha\beta) - (A\beta)(\alpha B)}{(AB)(\alpha\beta) + (A\beta)(\alpha B)} = \frac{128 \times 18 - 32 \times 72}{128 \times 18 + 32 \times 72} = \frac{2304 - 2304}{4608} = 0 . \]

Conclusion. \(Q = 0\): home area and result are independent. Directly, 128 of 160 town students (80%) and 72 of 90 village students (80%) passed.

Exercises, with answers checked

PRACTICE
  1. Given \(N = 15000\), \((A) = 1130\), \((B) = 1420\), \((C) = 760\), \((AB) = 512\), \((AC) = 301\), \((BC) = 287\), \((ABC) = 133\), find the remaining class frequencies. Ans. \((\alpha) = 13870\), \((\beta) = 13580\), \((\gamma) = 14240\); \((A\beta) = 618\), \((\alpha B) = 908\), \((\alpha\beta) = 12962\); \((A\gamma) = 829\), \((\alpha C) = 459\), \((\alpha\gamma) = 13411\); \((B\gamma) = 1133\), \((\beta C) = 473\), \((\beta\gamma) = 13107\); \((AB\gamma) = 379\), \((A\beta C) = 168\), \((\alpha BC) = 154\), \((A\beta\gamma) = 450\), \((\alpha B\gamma) = 754\), \((\alpha\beta C) = 305\), \((\alpha\beta\gamma) = 12657\). Only this value of \((\alpha\beta\gamma)\) makes the 8 ultimate frequencies add to \(N\).
  2. 120 students took three tests A, B and C: 45 passed the first, 49 the second and 51 the third; 14 passed all three, 31 failed all three, 11 passed the first two and failed the third, and 20 failed the first two and passed the third. How many passed at least two tests? Which of the given frequencies are not needed? Ans. 42. “At least two” is \((AB\gamma) + (A\beta C) + (\alpha BC) + (ABC)\). Since \((C) = (ABC) + (A\beta C) + (\alpha BC) + (\alpha\beta C)\), the last three terms add to \((C) - (\alpha\beta C)\), and the total is \((AB\gamma) + (C) - (\alpha\beta C) = 11 + 51 - 20 = 42\). Only \((C)\), \((\alpha\beta C)\) and \((AB\gamma)\) are needed.
  3. \(N = 1000\), \((A) = 480\), \((B) = 350\), \((C) = 510\), \((AB) = 55\), \((BC) = 95\), \((AC) = 160\), \((ABC) = 30\). Examine the consistency of the data. Ans. Inconsistent: \((\alpha\beta\gamma) = 1000 - 480 - 350 - 510 + 55 + 160 + 95 - 30 = -60 < 0\).
  4. Given \((A) = (B) = (C) = \tfrac12 N\), 70% of A's are B's and 80% of A's are C's, find the limits to the percentage of B's that are C's. Ans. 50% and 90% (Worked Problem 4).
  5. If \((A) = 60\), \((B) = 50\), \((C) = 40\), \((A\beta) = 10\), \((A\gamma) = 30\) and \(N = 100\), find the greatest and least values of \((BC)\) for consistent data. Ans. \(20 \le (BC) \le 30\). Here \((AB) = 50\) and \((AC) = 30\). The condition \((AB) + (AC) - (BC) \le (A)\) gives \((BC) \ge 20\); \((AB) + (BC) - (AC) \le (B)\) gives \((BC) \le 30\). The other conditions are weaker.
  6. If \(1000 = N = \tfrac43(A) = 2(B) = \tfrac53(C) = \tfrac52(AB)\) and \((AC) = (BC)\), what is the least possible value of \((BC)\)? Ans. 350. Here \((A) = 750\), \((B) = 500\), \((C) = 600\), \((AB) = 400\). With \((AC) = (BC) = x\), the three-attribute condition \((AB) + (AC) + (BC) \ge (A) + (B) + (C) - N\) gives only \(x \ge 225\); the two-attribute condition \((AC) \ge (A) + (C) - N = 350\) is stronger, and every condition holds at \(x = 350\). Check every condition, not only the three-attribute ones.
  7. In a university examination 70% of candidates passed in English, 85% in the second language and 65% in the optional subjects. At least how many passed the whole examination? Ans. 20%, by the theorem of section 3: \((ABC) \ge 70 + 85 + 65 - 2 \times 100 = 20\).
  8. The male population of a state is 300 lakh; 30 lakh males are literate; there are 36 thousand male criminals, of whom 3 thousand are literate. Is there any association between literacy and criminality? Ans. A slight negative association. In thousands, with A = literate and B = criminal: \(N = 30000\), \((A) = 3000\), \((B) = 36\), \((AB) = 3\). Under independence \((AB)\) would be \(3000 \times 36/30000 = 3.6\) thousand; the observed 3 thousand is below it, and \(Q = -0.1\). The criminality rate is 0.100% among literates and 0.122% among illiterates: literates are slightly less often criminal. Check the sign of \(\delta\) before calling an association positive.

Key Take-aways