ExamSaathi learning library · Government exams · SSC CGL quantitative foundations; published syllabus labelled 2024 · Quantitative aptitude

Association of attributes: class frequencies and Yule's coefficient

Set out two yes-or-no attributes as class frequencies, fill in missing counts, check that the data are consistent, and measure how strongly the attributes go together with Yule's coefficient of association Q and the coefficient of colligation.

Status: original pilot lesson. Teacher review is pending. It is not a complete course or official exam material.

You will learn to

Before you start

Some features of a person are not measured but simply noted as present or absent: a voter is literate or not, a shopkeeper accepts UPI payments or not, a candidate passed or failed. Such a quality is called an attribute. Capital letters A and B name two attributes, and the small letters a and b stand for their absence, so a is read as 'not A'. A letter group in brackets is a count of people: (A) is the number having A, (aB) the number lacking A but having B, and N is the whole group. This lesson measures how strongly two attributes go together, much as correlation does for measured quantities. All counts here are invented for practice; x keeps its usual meaning of multiplication.

Class frequencies and missing values

Every member of the group falls into exactly one of four ultimate classes: (AB), (Ab), (aB) and (ab). These four class frequencies add up to N. The first-order totals come from them: (A) = (AB) + (Ab), (a) = (aB) + (ab), (B) = (AB) + (aB) and (b) = (Ab) + (ab), with (A) + (a) = (B) + (b) = N. Laid out as a table, A and a label the rows, B and b label the columns, the four ultimate classes sit inside and the totals sit along the edges. Any missing count can be recovered from the others. A handy identity is (ab) = N - (A) - (B) + (AB): taking (A) and (B) away from N removes the (AB) people twice, so they are added back once. Data are consistent only if none of the class frequencies, worked out this way, is negative. A negative count is impossible, so it shows that the given figures contain an error.

Independent or associated?

If A and B have nothing to do with each other, the share of B among those with A equals the share of B in the whole group: (AB) / (A) = (B) / N. So A and B are independent when (AB) = (A) x (B) / N. Compare the observed (AB) with this value. If (AB) is more than (A)(B) / N, the two attributes appear together more often than independence predicts: positive association. If (AB) is less, they appear together less often: negative association. A second check gives the same verdict: compare (AB)(ab) with (Ab)(aB). These two products are equal under independence, the first is larger under positive association, and the second is larger under negative association. For example, with N = 400, (A) = 160 and (B) = 220, independence predicts 160 x 220 / 400 = 88 people with both attributes.

Yule's coefficient of association Q

The comparison gives the direction; Yule's coefficient of association measures the strength: Q = ((AB)(ab) - (Ab)(aB)) / ((AB)(ab) + (Ab)(aB)). It uses the two diagonal products of the table, as a difference on top and as a sum below, so Q always lies from -1 to +1. Q = 0 when the products are equal, that is, when the attributes are independent. Q = +1 when (Ab) or (aB) is 0, for example when every candidate who took coaching passed: complete positive association. Q = -1 when (AB) or (ab) is 0: complete negative association. Values near 0 show a weak link and values near +1 or -1 a strong one. Q needs only the four ultimate class frequencies, so find any missing ones first.

The coefficient of colligation

Yule also defined the coefficient of colligation. Reference books print it with a different capital letter; this lesson writes it as C. First find k = (Ab)(aB) / ((AB)(ab)), the ratio of the two diagonal products. Then C = (1 - sqrt(k)) / (1 + sqrt(k)). Under independence k = 1 and C = 0; when (Ab) or (aB) is 0, k = 0 and C = +1. In terms of the same k, Q = (1 - k) / (1 + k), and the two measures are linked by Q = 2C / (1 + C^2). For instance, k = 1/4 gives sqrt(k) = 1/2, C = (1/2) / (3/2) = 1/3 and Q = (3/4) / (5/4) = 0.6; as a check, 2 x (1/3) / (1 + 1/9) = 0.6. C always has the same sign as Q but is never further from 0, so a value of C must not be read on the same scale as a value of Q.

Common mistakes

Pairing the wrong cells: Q uses the diagonal products (AB)(ab) and (Ab)(aB), not products along a row or down a column. Forgetting to add (AB) back when using (ab) = N - (A) - (B) + (AB). Mixing up 'neither A nor B', which is (ab), with 'not both', which is N - (AB). Accepting figures that make a class frequency negative; such data are inconsistent. Taking positive association as proof that A causes B: candidates who chose coaching may also have studied longer, so association is not cause. Reading a value of C as if it were a value of Q. Judging association from (AB) alone, without comparing it with (A)(B) / N. Whether a small gap could be due to chance is a question for a separate significance test, not for Q.

A routine for attribute questions

1. Name the attributes A and B and list what is given. 2. Fill in the four ultimate class frequencies and all the totals, using the table edges and (ab) = N - (A) - (B) + (AB). 3. Check consistency: no class frequency may be negative. 4. Compare (AB) with (A)(B) / N to name the direction, or note independence. 5. Work out the two diagonal products and Q = (their difference) / (their sum). 6. If asked, find k and C = (1 - sqrt(k)) / (1 + sqrt(k)), and confirm Q = 2C / (1 + C^2). 7. Describe the result in words, remembering that association does not show cause.

Worked examples

  1. A survey of 400 candidates from a town in Rajasthan records whether each took coaching (attribute A) and whether each passed a recruitment test (attribute B). 160 took coaching, 220 passed, and 100 took coaching and passed. Find the other class frequencies, check that the data are consistent, and decide whether coaching and passing are positively or negatively associated.

    1. (Ab) = (A) - (AB) = 160 - 100 = 60, the coached candidates who did not pass.
    2. (aB) = (B) - (AB) = 220 - 100 = 120, the uncoached candidates who passed.
    3. (ab) = N - (A) - (B) + (AB) = 400 - 160 - 220 + 100 = 120. Check: (a) = 400 - 160 = 240 = 120 + 120.
    4. The four class frequencies 100, 60, 120 and 120 are all 0 or more, so the data are consistent.
    5. Under independence (AB) would be (A)(B) / N = 160 x 220 / 400 = 88. The observed 100 is more than 88.
    6. Cross-check: (AB)(ab) = 100 x 120 = 12000 is more than (Ab)(aB) = 60 x 120 = 7200.

    Answer: (Ab) = 60, (aB) = 120 and (ab) = 120, and the data are consistent. Since (AB) = 100 is more than the 88 expected under independence, coaching and passing are positively associated, though this alone does not prove that coaching caused the passes.

  2. In a survey of 280 small shopkeepers in Indore, 90 are literate and accept UPI payments, 30 are literate and do not, 40 are not literate but accept UPI, and 120 are neither. With A = literate and B = accepts UPI, find Yule's coefficient of association Q and the coefficient of colligation C, and check that Q = 2C / (1 + C^2).

    1. (AB) = 90, (Ab) = 30, (aB) = 40 and (ab) = 120, which add up to 280.
    2. Diagonal products: (AB)(ab) = 90 x 120 = 10800 and (Ab)(aB) = 30 x 40 = 1200.
    3. Q = (10800 - 1200) / (10800 + 1200) = 9600 / 12000 = 0.8.
    4. k = 1200 / 10800 = 1/9, so sqrt(k) = 1/3.
    5. C = (1 - 1/3) / (1 + 1/3) = (2/3) / (4/3) = 0.5.
    6. Check: 2C / (1 + C^2) = 1 / 1.25 = 0.8, which equals Q.

    Answer: Q = 0.8 and C = 0.5. Literacy and accepting UPI payments are strongly positively associated, and 2 x 0.5 / (1 + 0.25) = 0.8 confirms the link between the two coefficients.

  3. In a textile mill in Surat, 150 workers were checked: 90 wore ear protection at work (A) and 30 had some hearing loss (B). Only 10 of the 90 who wore ear protection had hearing loss. Find the four class frequencies, the direction of association and Yule's Q.

    1. (AB) = 10, (Ab) = 90 - 10 = 80, (aB) = 30 - 10 = 20 and (ab) = 150 - 90 - 30 + 10 = 40. All are 0 or more.
    2. Under independence (AB) would be 90 x 30 / 150 = 18. The observed 10 is less, so the association is negative.
    3. (AB)(ab) = 10 x 40 = 400 and (Ab)(aB) = 80 x 20 = 1600.
    4. Q = (400 - 1600) / (400 + 1600) = -1200 / 2000 = -0.6.
    5. For comparison, k = 1600 / 400 = 4, sqrt(k) = 2 and C = (1 - 2) / (1 + 2) = -1/3, about -0.3333. Again 2C / (1 + C^2) = (-2/3) / (10/9) = -0.6.
    6. The link fits the idea that protection helps, but the counts alone cannot rule out other reasons, such as protected workers having spent fewer years in the noisiest sheds.

    Answer: Q = -0.6: wearing ear protection and hearing loss are fairly strongly negatively associated. The coefficient of colligation is -1/3, about -0.3333.

Practice checks

  1. A survey of 1,000 households in Coimbatore found that 400 own a two-wheeler (A), 300 have a member working in a factory (B), and 150 have both. How many households have neither attribute?
  2. A report on 100 students of a school in Patna says that 60 play cricket (A), 70 play kabaddi (B) and 25 play both. Which statement is right?
  3. Of 200 farmers in a district of Punjab, 80 use drip irrigation (A), 50 grow vegetables (B), and 20 do both. How are the two attributes related?
  4. Among 135 students of a college in Bhubaneswar, 70 attended remedial classes and passed, 20 attended and failed, 15 did not attend but passed, and 30 neither attended nor passed. Taking A = attended and B = passed, Yule's coefficient of association Q is:
  5. For a table of two attributes, the coefficient of colligation is C = 0.6. Using Q = 2C / (1 + C^2), Yule's coefficient of association is:

Sources checked