Primary package documentation for GoodmanKruskalGamma, SomersDelta and Lambda. The Details sections specify the tied-pair exclusion in Goodman and Kruskal's gamma, directional denominators for Somers' D, and modal-prediction interpretation of Goodman and Kruskal's lambda. These definitions corroborate mathematical interpretation; the documentation does not identify the implementation or version of an unspecified oii.xtab wrapper in a past examination.
Greater technology distrust is associated with lower efficacy in the overall sample. The omnibus evidence against independence is strong, while the unsigned association magnitude is modest: on 6 statistical degrees of freedom, and Cramér's V about 0.148. The observational study does not establish that changing trust would cause efficacy to change.
Rows identify the technology response and columns identify efficacy. Each body percentage is a within-row conditional probability estimate, not a column percentage. For example, of those who strongly disagree with the distrust statement have High efficacy, whereas of those who agree do. The difference is about 21.69 percentage points. High efficacy decreases across all four rows: 49.40%, 42.41%, 31.02%, 27.72%. Low efficacy is 20.54% in the strongly-disagree row, 18.00% in Disagree, 21.43% in Neutral and 34.26% in Agree. Thus the overall pattern is clear without claiming that every category changes monotonically: the low-efficacy proportion initially falls, and the Medium proportion peaks at 47.55% among neutral respondents.
For the Pearson chi-squared test of independence, the null hypothesis says that the two categorical variables are independent, equivalently that the efficacy distribution is the same in every technology-response row. With row totals and column totals , the expected frequency under that hypothesis is , and
All twelve expected frequencies exceed 79, with minimum about 79.844, so sparse expected cells are not the concern here. Under independent sampling and the usual large-sample calibration, the very small p-value rejects independence at conventional significance levels. This is an omnibus finding: it does not provide a separate adjusted significance test for every pair of row percentages.[ref]
The likelihood-ratio test of independence in a contingency table uses . The supplied with 6 statistical degrees of freedom gives . Its displayed 0.000 is rounded, not an exact zero. It corroborates the omnibus finding. The generalized phi coefficient is , the contingency coefficient is about 0.205, and Cramér's V is . These are unsigned measures of association strength rather than three additional significance tests; they do not describe causal effects or percentages of variance explained. Their magnitude and the small p-value answer different questions, especially with a large sample size.
The ordinal measures use the displayed order: increasing row index means increasing distrust, while increasing column index means decreasing efficacy. There are 882033 concordant pairs and 552543 discordant pairs. Hence Goodman and Kruskal's gamma is
Its positive sign therefore means that increasing distrust tends to accompany movement toward lower efficacy. Under an ascending efficacy order its sign would be negative, by sign reversal under reversal of one ordinal ordering. Goodman and Kruskal's gamma ignores tied pairs; it is not a claim that 23% of efficacy variation is explained. The displayed pair counts partition all unordered pairs correctly, including ties. Somers' D for efficacy given technology is about 0.151, Kendall's tau-b about 0.158, and Stuart's tau-c about 0.163. Their different denominators handle ties or table dimensions differently, so their differing magnitudes do not constitute disagreement about the direction.[ref][ref]
Goodman and Kruskal's lambda concerns the proportional reduction in errors when predicting a most frequent category, not ordinal movement. Without technology information the modal efficacy category is Medium, producing errors. Choosing a separate modal efficacy category in each technology row yields errors. Thus . In the reverse prediction direction the reduction is , matching the other printed lambda. The improvement in modal classification is small even though independence is decisively rejected. Both the conditional percentages and these distinct summaries support a real sample association; ethnicity and other possible confounders still require attention before any causal account.
There are descriptive ethnic differences in the distribution of technology distrust, but the omnibus evidence is borderline and the unsigned association is small. The printed Pearson test just rejects independence at 5%, while the likelihood-ratio test does not; neither establishes a strong ethnic pattern or a causal effect.
Read the body percentages within each ethnic group. Strong disagreement with the distrust statement occurs among 24.68% of Asian respondents, 10.53% of Black respondents and 13.34% of White respondents. Agreement occurs among 27.27%, 21.05% and 29.37%, respectively. Neutral responses are 20.78%, 26.32% and 19.68%. Thus Asian respondents are especially likely to be in the strongly-disagree category, while Black respondents have the largest neutral share. The mode for Black and White respondents is Disagree; Asian respondents have a tie between Disagree and Agree at 21 observations each. The small group totals, 77 and 57, mean that a few observations can materially change the minority-group percentages.
The Pearson chi-squared test of independence has , statistical degrees of freedom and . Under its sampling assumptions, this is a nominal rejection at a prespecified 5% significance level, but not at 1%. The minimum expected frequency is about 7.766, so this particular table has no expected cell below five. The alternative likelihood-ratio test of independence in a contingency table gives and , printed as 0.074. These are different test statistics, not contradictory versions of the same calculation. Their different threshold decisions show that the evidence is close enough to the conventional boundary to warrant qualification rather than selection of the more favourable label.
The generalized phi coefficient is about 0.071, the contingency coefficient about 0.071 and Cramér's V about 0.051. They indicate a small overall unsigned association. This does not erase the particular descriptive percentage differences, and a small p-value is not a measure of their substantive size. Conversely, failure of the likelihood-ratio test to reject at 5% is not evidence that every ethnic group has exactly the same population response distribution.
Ethnicity is a nominal categorical variable, with no natural rank Asian–Black–White. Therefore the printed Goodman and Kruskal's gamma of 0.079, Somers' D of 0.058, Kendall's tau-b of 0.022 and Stuart's tau-c of 0.009 have no invariant substantive ordinal interpretation here. Permuting the ethnicity labels can change the ordinal pair comparisons without changing the underlying observations or their nominal association. These values are not evidence for an ethnic hierarchy; Cramér's V and the actual within-group percentages are appropriate summaries for this question.[ref]
Both directional values of Goodman and Kruskal's lambda are zero. Knowing ethnicity does not improve the number of correct modal predictions of technology response: Disagree remains a modal category within every ethnic group, including the Asian tie. In the reverse direction, White is the most frequent ethnicity within every technology-response column, so knowing technology does not improve modal ethnicity predictions either. Zero lambda therefore coexists with unequal conditional distributions and a nonzero Pearson chi-squared statistic; modal prediction discards changes that do not change the most frequent category. The supported conclusion is a small, weakly evidenced nominal association, with its descriptive pattern and uncertainty stated explicitly.
The White stratum retains the overall distrust–lower-efficacy pattern, the Asian stratum shows a stronger but irregular version of it, and the Black stratum has an opposite descriptive ordinal direction. This supports replication in the dominant stratum together with possible specification by ethnicity in the elaboration model. Sparse minority tables and different significance labels do not by themselves establish a population statistical interaction.
Each table fixes ethnicity and compares the efficacy conditional distributions across technology responses. The body percentages use the technology-response row total within that stratum. The same labels, coding direction and efficacy order apply as before. The strata contain 77, 57 and 2332 observations; they sum to 2466 and their cells reproduce the overall table exactly. Consequently the comparison is genuinely a stratification of the supplied overall counts, rather than a comparison of unrelated samples.
For Asian respondents, High efficacy is 78.95% among those who strongly disagree with the distrust statement, falling to 23.81% among those who disagree, 18.75% among neutral respondents and 19.05% among those who agree. The strong-disagreement versus agreement contrast is about 59.90 percentage points, based on 15 of 19 versus 4 of 21 respondents. This is a large descriptive contrast, but the rest of the table is not a simple monotone progression: Low efficacy peaks at 47.62% in Disagree, versus 10.53% in Strongly disagree, 18.75% in Neutral and 23.81% in Agree; Medium efficacy exceeds 57% in the last two rows. The striking first row is part of a more irregular categorical pattern.
The Asian Pearson chi-squared test of independence gives , 6 statistical degrees of freedom, . The likelihood-ratio test gives , ; its displayed 0.000 is a rounding convention. Cramér's V is about 0.430, compared with 0.148 overall. The generalized phi coefficient is 0.608 and the contingency coefficient 0.519. Two of twelve expected frequencies are below five, with minimum 4.156. This is a modest sparse-cell warning rather than a reason to delete the observed cells, but asymptotic calibration should still be qualified and could be checked by an exact or fixed-margin Monte Carlo test.
The Asian Goodman and Kruskal's gamma is about 0.323, from 1025 concordances and 524 discordances, so its displayed-order direction agrees with the overall association. Somers' D for efficacy given technology is about 0.226, Kendall's tau-b 0.241 and Stuart's tau-c 0.253. These stronger ordinal summaries do not imply that every individual row transition is monotone. Goodman and Kruskal's lambda is about 0.362 for predicting efficacy from technology and 0.286 in the reverse direction: the technology row changes the modal efficacy prediction sufficiently to reduce its errors by about 36.2%. This is a reduction in modal-classification errors, not a fraction of efficacy variance explained.
For Black respondents, High efficacy is 0 of 6, or 0%, in Strongly disagree; 8 of 24, or 33.33%, in Disagree; 2 of 15, or 13.33%, in Neutral; and 7 of 12, or 58.33%, in Agree. Low efficacy is 16.67%, 25.00%, 20.00% and 8.33%, respectively. The strongest-disagreement versus agreement High-efficacy contrast is therefore percentage points, opposite to the Asian and White contrasts. The zero observed High count in the first row does not prove zero population probability, especially with only six respondents in that row. These percentages are compatible with a reversed tendency, but considerable sampling uncertainty is unavoidable.
The Black Pearson chi-squared test of independence gives , 6 statistical degrees of freedom and . The likelihood-ratio test gives , , also above 5%. Thus neither nominal test rejects at 5%; this does not establish exact independence. Eight of twelve expected frequencies are below five, with minimum about 1.158, making the usual large-sample calibration particularly questionable. An exact conditional analysis or Monte Carlo test would be more defensible for a calibrated inferential claim; no uncomputed simulated p-value is asserted.[ref]
The Black Cramér's V is about 0.308, the generalized phi coefficient 0.435 and the contingency coefficient 0.399. An unsigned magnitude of this size can coexist with a nonsignificant test in a small sample. There are 254 concordances and 457 discordances, giving Goodman and Kruskal's gamma about , Somers' D about , Kendall's tau-b about and Stuart's tau-c about . Their negative signs agree with the reversed displayed-order direction. Goodman and Kruskal's lambda is about 0.107 for efficacy given technology and zero for technology given efficacy. In the latter direction, Disagree remains a modal technology category within every efficacy column, so modal prediction gains nothing despite the changed conditional percentages.
For White respondents, High efficacy decreases from 48.55% in Strongly disagree through 43.10% and 32.03% to 27.45% in Agree. The extreme-row contrast is about 21.11 percentage points, from 151 of 311 versus 188 of 685. Low efficacy is 21.22%, 17.10%, 21.57% and 35.04%, respectively. This closely resembles the overall distribution, including the fact that the Low category is not monotone at every step. The White Pearson chi-squared test of independence gives , 6 statistical degrees of freedom and ; the likelihood-ratio test gives , . All expected frequencies exceed 74, so sparse cells are not the problem for these nominal tests.
The White Cramér's V is about 0.152, the generalized phi coefficient 0.215 and the contingency coefficient 0.210. Goodman and Kruskal's gamma is about 0.236, Somers' D 0.155, Kendall's tau-b 0.162 and Stuart's tau-c 0.167: close to the overall ordinal summaries and in the same direction. The two values of Goodman and Kruskal's lambda are about 0.061 for efficacy given technology and 0.062 for technology given efficacy. They again indicate only a small improvement in modal prediction. The large sample size helps explain why the White test has a much smaller p-value than the smaller strata, without implying that its association magnitude is the largest.
The original figure below plots selected empirical conditional probabilities from all the cells. It gives the opposite small-stratum pattern and the dominant White pattern a common scale; it is not a reproduction of a source figure, an estimated continuous trend or a display of uncertainty intervals.
Figure 1.
Efficacy distributions across technology-distrust responses: contrasting ethnic strata and the pooled sample. Lines only connect the four ordered categories; group sizes and sparse cells limit inference.
Details.
The elaboration model asks how the original association changes when a third variable is held fixed. If the association disappeared throughout the strata, an explanation by the control variable might be plausible, subject to a credible causal ordering. Here it persists in the White group, which supplies 94.57% of the sample, and is stronger on several descriptive measures in the Asian group. Therefore ethnicity does not simply explain away the relationship. The White result is a replication of the broad pattern; the reversed Black direction and the Asian shape suggest descriptive specification or possible effect modification. The output supplies no temporal or causal design that would distinguish an actual causal mechanism from other confounding, measurement differences or sampling variation. It also does not demonstrate a Simpson's paradox in which the association reverses in every stratum: that is not what the displayed tables show.
The predominance of White respondents explains why the pooled pattern resembles theirs. By the law of total probability, each technology row's efficacy distribution is a mixture over ethnicity, using the ethnic proportions within that technology row. Those weights need not equal the overall ethnic proportions. As an optional descriptive comparison, standardization with common weights using the overall ethnic shares gives High-efficacy proportions of about 48.38% in Strongly disagree and 27.90% in Agree, a 20.48-percentage point contrast, compared with the crude 21.69-point contrast. This explicitly defined adjustment leaves the broad contrast intact; it is not a causal estimate and does not turn the three different stratum patterns into one common effect.
Finally, a significant test in one group and a nonsignificant test in another is not itself a test that the groups' associations differ. A formal statistical interaction requires a directly specified heterogeneity test or model on a chosen effect scale. The omnibus tests also address whole categorical distributions, whereas gamma and the High-efficacy contrast describe particular ordered features. Multiple stratum tests create a multiple testing issue if used to select a discovery. The defensible result is an association that survives stratification in the dominant group, with important descriptive heterogeneity that merits a direct, sparse-cell-aware investigation rather than an assertion that ethnicity causes the difference.
The displayed age groups have fairly similar employment proportions, with no coherent monotone age trend. The printed test reports no evidence against age–employment independence; recomputing from the five visible rows reaches the same qualitative conclusion. Their totals and several auxiliary fields nevertheless do not represent one consistent table.
Each row percentage estimates an employment proportion within that age group. For example, of the youngest displayed group are employed. The employed proportions in the next four rows are , , and . The largest displayed proportion is in the 45–54 group and the smallest in the 55–64 group, a difference of about percentage points. These are conditional percentages, not the age distribution of employed people. The sequence rises and then falls; there is no simple increasing or decreasing pattern.
The null hypothesis for a Pearson chi-squared test of independence is that the joint category probabilities factor into their age and employment marginals. Its expected frequencies are , and its test statistic adds the standardized squared count discrepancies, . For a complete contingency table with positive margins, the large-sample reference chi-squared distribution has statistical degrees of freedom. Independent observations and an appropriate sampling scheme are essential; adequate expected counts make the approximation more plausible.[ref]
Reading only the printed test block, , statistical degrees of freedom and are mutually compatible. The printed likelihood-ratio test gives nearly the same p-value, about . At a prechosen 5% significance level neither rejects independence. This is a failure to find evidence, not proof of equal employment probabilities at every age. The printed Cramér's V around suggests a small sample association; the contingency coefficient around has the same broad message. The generalized phi coefficient is an unsigned chi-squared magnitude here, not evidence for a positive age trend. A small association magnitude and a large p-value answer different questions.
But only a table is actually visible. Those rows total , with employment column sums and , rather than the printed with columns and . Computing solely from the five visible rows gives
Its likelihood-ratio test statistic is about , again with statistical degrees of freedom. The smallest count-based expected frequency is about , comfortably large for this ordinary approximation, but different from the printed minimum . These figures are a labelled analysis of the visible subset, not a repaired full dataset. An unprinted sixth age row might explain some intended metadata, but neither its label nor a uniquely justified reconstruction is supplied. The oldest printed label also conflicts with Figures 1 and 8.
The ordinal measures look for an ordered tendency. Goodman and Kruskal's gamma compares concordant pairs with discordant pairs among pairs untied on both variables. The printed negative gamma, Somers' D, Kendall's tau-b and Stuart's tau-c therefore suggest, at most, a very weak tendency toward lower employment at higher age categories under the specified ordering. Their precise magnitudes are not reliable here. The ordinary unordered-pair partition for ordinal data fails for the printed pair counts, even when compared with the printed cases. On the five visible rows the respective count-based values are about , for employment conditional on age, and . None gives a substantial monotone pattern; a near-zero ordinal measure would not exclude a nonmonotone relationship in general.
Goodman and Kruskal's lambda is zero in both predictive directions on the visible table: knowing age does not improve the number of correct predictions made by always choosing the most common employment category, and knowing employment does not improve modal age-category prediction. Zero modal-prediction improvement does not mean every category distribution is identical. Both the reported test block and the separately recomputed visible-table test fail to reject independence; neither justifies asserting no association, a causal age effect, or a coherent full-sample calculation from the contradictory printout.
Within the 1424 complete records displayed here, employed respondents report more frequent use on average in the ordinal sense of positive pairwise association. The overall independence test is significant, but its sample association magnitude is modest and the result is observational. Some printed ordinal summaries are internally inconsistent.
Compare row percentages because employment groups have different sizes. Never-use is reported by of the non-employed group and of the employed group. Daily use is versus ; more-than-daily use is versus . Combining the last two categories gives versus , an employed-minus-non-employed difference of about 11.26 percentage points. That threshold comparison is a descriptive summary of the six-category table, not a replacement for the original omnibus test or a newly declared prespecified endpoint. It does not assign equal spacing to the six frequency categories.
Here the row counts, column counts and grand total are additive. Under the null hypothesis of employment–use independence, a contingency table has statistical degrees of freedom. The Pearson chi-squared statistic recomputed from the cells is , agreeing with the printed value, and its p-value is about . The likelihood-ratio test statistic gives . Both reject independence at the conventional 5% and 1% significance levels under the sampling assumptions. The minimum expected frequency, about , gives no sparse-cell warning for this table. The tests compare whole category distributions; they do not by themselves identify one category as the source of the association or establish its causal direction.
Cramér's V is . The generalized phi coefficient coincides with it for this two-row table, while the contingency coefficient is about . These are modest magnitudes; a small p-value does not make the relationship large or useful for individual prediction. The employment–use association could change after conditioning on age or other covariates, and the sample excludes cases without recorded use. Relative to the employment margins in Figure 1, the omitted complete-case counts are non-employed and employed, or about and of those groups. Different missing fractions alone do not identify the missing-data mechanism, but they rule out treating complete records as automatically representative of everyone.
The count-based Goodman and Kruskal's gamma is
With the employment categories ordered non-employed then employed and use ordered from never to more than daily, this positive value means concordant pairs outnumber discordant pairs among pairs untied on both variables. It is not a 16.9% increase in a person's use and is not a causal effect. Reversing one ordering reverses its sign. Excluding ties can make gamma appreciably larger than tie-adjusted measures.
For use as response and employment as predictor, the cells give Somers' D about , Kendall's tau-b about and Stuart's tau-c about . The printed Somers value and tau-b should not be presented as verified calculations: the table prints second-variable-only ties, whereas its cells give . The other four pair classes agree with the cells; the printed five classes sum to , not . The source does not establish an alternative tie convention that repairs those ordinary identities. The direction remains a weak positive association under either description, but the exact measures require coherent pair counts.
Modal prediction provides another perspective. Without employment information, predicting the globally most frequent use category, never, makes errors. Predicting a separate modal use category in each employment group makes errors. Thus Goodman and Kruskal's lambda for use given employment is : about a 1.97% reduction in modal-classification errors. For employment given use the corresponding reduction is . These identify the targets explicitly; the source's row-dependent/column-dependent labels should not be used to reverse the target interpretation. The two small numbers show why an independence test can be significant while coarse modal prediction improves very little. The supported overall finding is a modest positive association among observed respondents, requiring conditional analysis and a missing-data qualification before broader claims.
Every displayed age stratum has a higher proportion of employed respondents reporting use at least daily, and each has positive ordinal association. The visible counts do not support the printed claim of a conventional significant omnibus result in any one stratum: several test fields are contradictory, and sparse cells further limit the chi-squared approximation. Age-specific significance labels do not establish interaction or causation.
Conditioning on age means comparing the employment groups within each displayed age category. Each within-row percentage estimates a use distribution for that age–employment combination. This helps assess a marginal association that could reflect different age compositions, but broad age categories do not remove all residual confounding. The relevant conditional-independence null hypothesis is that employment and use are independent within every age stratum. It differs both from marginal independence and from a null hypothesis that the strength of association is identical across ages.
For the 14–24 stratum, . The non-employed group reports use at least daily in of cases, versus of employed cases: an 11.13-percentage-point difference. Daily use alone is versus . This is not a uniform upward shift at every threshold: never-use is also higher among employed respondents, versus , whereas weekly use is lower, versus . The count-based Cramér's V is about and Goodman and Kruskal's gamma about . The cells give on statistical degrees of freedom, with , agreeing qualitatively with the likelihood-ratio result , . The printed Pearson and disagree with the cells and with one another: that printed statistic at statistical degrees of freedom would give about , not . Four of twelve expected frequencies are below five, with minimum about , so an exact conditional test or a Monte Carlo test is preferable for calibrated inference rather than trusting a marginal printed significance label.
For ages 25–44, . At-least-daily use is in the non-employed group and in the employed group, a difference of 11.06 percentage points. Never-use is versus , daily use versus , and more-than-daily use versus . The count-based Cramér's V is about and Goodman and Kruskal's gamma about . The visible cells give , , and , , each with statistical degrees of freedom. These differ materially from the printed Pearson , , and printed likelihood-ratio , . Even the printed Pearson statistic at its stated statistical degrees of freedom gives , not the stated p-value. The minimum expected frequency is about , so the principal difficulty here is corrupted numerical output rather than a listed sparse-cell warning. The recomputed 5% test fails to reject independence, although its p-value is not evidence that the positive descriptive contrast is exactly zero.
For ages 45–54, . At-least-daily use is versus , a difference of 9.03 percentage points. Never-use is versus , and daily use versus . The count-based Cramér's V is about and Goodman and Kruskal's gamma about . The cells give , , consistent with the likelihood-ratio , . The printed Pearson and are incompatible with the cells and with one another: using that statistic at statistical degrees of freedom gives . The smallest expected frequency is about . Thus this is another positive descriptive contrast without a count-supported significant omnibus result at 5%.
For ages 55–64, . At-least-daily use is versus , a difference of 7.89 percentage points. Never-use is versus , and daily use versus . Cramér's V is about and Goodman and Kruskal's gamma about . The printed and count-based Pearson result agrees: , statistical degrees of freedom, . The likelihood-ratio p-value is about . Two of twelve expected frequencies are below five, with minimum about ; the nominal result does not indicate rejection, but a simulation-based check would be prudent if formal calibration mattered. Neither a large p-value nor the smaller sample establishes an absence of association.
For the oldest stratum, labelled 65+ in Figure 8, . At-least-daily use is versus , a difference of 5.61 percentage points. Never-use is versus . Cramér's V is about and Goodman and Kruskal's gamma about , the largest of the five displayed strata. Yet on statistical degrees of freedom gives , while the likelihood-ratio p-value is about . There are four expected frequencies below five, with minimum about . Sampling uncertainty and a sparse distribution therefore matter greatly; the larger descriptive ordinal magnitude is not evidence for a significant age interaction. The zero observed entries do not establish zero population probabilities. An exact conditional test or a Monte Carlo test can retain the six categories without relying on a doubtful asymptotic approximation. Collapsing categories should have a substantive justification; searching for a grouping that produces significance changes the inferential problem.[ref]
The following original analytical plot summarizes a common threshold rather than reproducing any source table. Its overall reference is deliberately separated: the five age strata total , not the in Figure 3, so their percentages cannot be pooled and called the reported overall result.
Figure 1.
At-least-daily use is more common among employed respondents in each displayed age stratum; the printed overall row is a separate, non-reconciling input
. Details.
Across the visible strata, frequent use declines strongly with age in both employment groups, while the at-least-daily employment difference remains positive. This is compatible with age being important to the use distribution and with a positive employment association persisting after age stratification. It is not a demonstrated Simpson's paradox: none of these displayed threshold differences reverses direction. The evidence also does not establish how much age confounds the overall result, because the strata do not reproduce its sample and the oldest age labels disagree across figures. Among young respondents the positive ordinal association coexists with a reversed never-use contrast, so the threshold summary should not be described as stochastic domination of every conditional distribution.
Ordinal measures summarize a different aspect from the omnibus tests. Counting pairs from each visible table gives Goodman and Kruskal's gamma approximately in age order. For use as response, the corresponding Somers' D values are about ; Kendall's tau-b values are ; and Stuart's tau-c values are . They are all positive and modest, but not interchangeable. Gamma discards pairs tied on either variable; Somers' D includes response ties separated by employment; Kendall's tau-b adjusts for ties in both variables; Stuart's tau-c adjusts for table dimensions. The printed second-variable tie counts violate the unordered-pair partition for ordinal data in all five strata, so the printed Somers and tau-b values should not be accepted as independently verified numbers.[ref]
Goodman and Kruskal's lambda for predicting the use category from employment is zero in all five visible strata: each employment row has the same modal use category as its stratum overall. This does not contradict their nonzero gamma or V, because the rest of each category distribution can change without its mode changing. Reversing the prediction target gives about for predicting employment from use. In the original display these are the second lambda values; identify the target directly rather than relying on ambiguous row/column-dependent labels. The contingency coefficient, another unsigned transformation of the Pearson statistic, adds no new direction and cannot repair a corrupted test statistic.
Even if all printed p-values were trusted, a significant result in one age group and a nonsignificant result in another would not prove that their effects differ. A statistical interaction needs a direct comparison of effects on a specified scale, not a comparison of significance labels. Five separate tests also create a multiple-testing issue if the aim is to claim at least one association; choosing categories or a threshold after inspection adds further selection. A joint conditional independence test for stratified contingency tables or an appropriate categorical-response model can target a clear combined hypothesis, with exact or simulation-based calibration where needed. Such a model would require coherent input tables before it could resolve the source discrepancies. The sound conclusion is a consistent positive descriptive tendency within the five shown strata, with no count-supported nominal 5% omnibus rejection in an individual stratum, and insufficient coherent output for a claimed causal or precisely quantified age-adjusted effect.
These are row percentages, so the comparisons estimate the conditional probability of recorded vaccination within each NHS trust category. The percentages increase across the ordered trust categories as
The extreme-category difference is approximately 49.31 percentage points, rather than a 49.31% relative increase. The ordinal categorical variable records an order; the categories do not establish equal numerical trust increments.
Under the null hypothesis of independence, the expected count in a cell is its row total times its column total divided by 748. The Pearson chi-squared statistic compares observed and expected counts through
There are statistical degrees of freedom, giving . The minimum expected count is approximately 5.015, so the usual expected-count concern is much less acute here than in the income strata. The table gives strong evidence of a statistical association. The likelihood-ratio test of independence in a contingency table agrees: its statistic is approximately 81.361 on four statistical degrees of freedom, with a very small p-value. The displayed 0.000 is rounding, not a zero probability.
For magnitude, Cramér's V is
It describes the size of the departure from independence without using the category order or giving a direction. Calling it “moderate” is only a rough contextual description; the actual percentage differences are easier to interpret.
The ordered coefficients describe a positive direction. Goodman and Kruskal's gamma uses only concordant pairs and discordant pairs:
It excludes tied pairs, which are frequent when the response has only two categories. It is therefore not a claim that 54.7% of respondents were vaccinated because of their trust. The directional Somers' D for vaccination as response includes pairs tied on that response in its denominator:
The smaller value reflects the retained ties; it does not contradict the positive statistical association.
The small column-dependent Goodman and Kruskal's lambda has a useful prediction interpretation. Without trust information, always predicting the more frequent vaccinated category gives 121 mistakes. Predicting the majority category separately in each trust row gives mistakes. Hence
Trust reduces this particular modal-prediction error by only about 4.13%, despite the strong evidence against independence. Most rows retain the same majority category. Evidence of association, its ordinal direction and improvement in a chosen prediction rule are different questions. None establishes that changing trust would change an individual's vaccination status.
The association remains positive within each income group, although its estimated size is smaller in the higher-income groups. The two extreme trust categories give the following conditional vaccination percentages and differences:
Annual household incomeLowest trustHighest trustDifference in percentage points
Below £20,00036.36%89.60%53.24
£20,000–£40,00050.00%93.10%43.10
£40,000 and above66.67%91.14%24.47
In the lowest-income group, the intervening percentages are 42.86%, 44.12% and 82.54%, so the increase is monotone. Its Pearson chi-squared statistic is approximately 62.520 on four statistical degrees of freedom, with the printed asymptotic . Cramér's V is approximately 0.441, Goodman and Kruskal's gamma is approximately 0.626 and the column-dependent Somers' D is approximately 0.259. The column-dependent Goodman and Kruskal's lambda is approximately 0.158: trust improves the modal prediction more here than in the pooled table.
In the middle-income group, the intervening vaccination percentages are 61.54%, 81.82% and 92.04%. The printed Pearson chi-squared statistic is approximately 24.033 on four statistical degrees of freedom, with asymptotic . Cramér's V is approximately 0.298, Goodman and Kruskal's gamma approximately 0.454 and column-dependent Somers' D approximately 0.100. Column-dependent Goodman and Kruskal's lambda is zero: vaccinated respondents are the majority in every row, so the modal prediction never changes. A zero lambda does not mean independence.
In the highest-income group, the intermediate vaccination percentages are 71.43%, 76.92% and 94.55%; the final category falls slightly to 91.14%. Thus the observed pattern is broadly positive rather than strictly monotone. The printed Pearson chi-squared statistic is approximately 8.199 on four statistical degrees of freedom, with asymptotic . It does not reject independence at 5%. The corresponding Cramér's V is approximately 0.229, Goodman and Kruskal's gamma approximately 0.281 and column-dependent Somers' D approximately 0.058. The column-dependent Goodman and Kruskal's lambda is again zero.
Small counts limit the asymptotic tests, especially in the middle- and highest-income tables. Their minimum expected counts are approximately 0.644 and 0.306, with respectively 30% and 40% of cells below five. The lowest-income table has one expected count below five, with minimum approximately 3.315. These diagnostics concern expected counts under independence, not just the observed row sizes.
The supplied counts are sufficient to make an exact conditional Pearson test for a binary contingency table, without needing individual records or assuming a chi-squared distribution approximation. Conditioning on the row totals and total unvaccinated count removes the common unknown binomial probability. For each admissible table, sum its multivariate hypergeometric distribution probability when its Pearson chi-squared statistic is at least the observed one. Complete enumeration gives:
Income groupEnumerated tablesExact conditional p-value
Lowest507150
Middle22379
Highest2585
These are new exact conditional calculations, rather than the paper's printed asymptotic p-values. They confirm evidence of association in the first two groups and nonrejection at 5% in the third, while showing the numerical effect of sparse cells. The tail is ordered by the Pearson chi-squared statistic; an exact test with a different ordering need not have the same p-value. Fixed-margin Monte Carlo tests approximate this same Pearson-ordered tail when enumeration is impractical.[ref]
The original count-based figure below includes pointwise approximate 95% Wilson intervals. The very wide intervals for sparsely populated trust categories make the uncertainty visible; they are not simultaneous intervals or a formal test of differences between income groups.
Figure 1.
Recorded vaccination by NHS trust within household-income groups, with pointwise Wilson intervals
. Original plot from the supplied table counts. Connected categories show their order without assuming equal numerical trust increments. The intervals concern conditional proportions, and the figure does not identify causal effects. Details.
In the elaboration model, the positive direction is replicated after conditioning on income: income does not fully explain away the observed trust–vaccination relationship. The decreasing estimated contrasts and ordered coefficients suggest possible specification by income, or effect modification on an explicitly chosen scale. They do not establish it. Different p-values can arise from different sample sizes and standard errors; significant and nonsignificant results need not differ significantly. A formal statistical interaction test or a confidence interval for differences between comparable contrasts would address that question.[ref]
Nor do these conditional tables prove that income is a causal confounder or causal mediator. Those labels require assumptions about causal order, relevant confounding and how variables were measured. This is an observational study of recorded vaccination status, not a randomized change in trust or a test of vaccine effectiveness.
Each row of the contingency table is a conditional distribution of the safety category among respondents with that experience status. Thus the relevant comparison uses row percentages, rather than interpreting the larger number of respondents with some bad experiences as itself an effect on safety.
The sample proportions reporting feeling very safe are without bad experiences and with some bad experiences: the latter is lower by about percentage points. Feeling fairly safe rises from to , a difference of about percentage points. Feeling unsafe changes only from to , about percentage points. The main descriptive shift is therefore from very safe toward fairly safe, rather than a large increase in the unsafe category.
Pearson's chi-squared test tests the null hypothesis that experience status and safety category are independent. If that were true, the expected cell count would be its row total times column total divided by . The Pearson chi-squared statistic sums squared observed-minus-expected count differences divided by their expected counts. Here
The expected counts are comfortably large, with minimum approximately , so the ordinary large-sample chi-squared distribution approximation is appropriate under the sampling assumptions. There is evidence against independence even at the significance level. The reported likelihood-ratio result gives the same conclusion.
Magnitude is a separate question. Cramér's V gives
which describes a weak statistical association. It does not mean that of safety is explained. Nor does the p-value measure the size of that association.
For ordinal direction, order the experience categories as none, some, and the safety categories from very safe toward unsafe. Goodman and Kruskal's gamma compares concordant pairs with discordant pairs after excluding tied pairs:
Its small positive sign then corresponds to a weak tendency toward less safety among respondents with bad experiences. The sign would reverse if exactly one category ordering were reversed. Because this contingency table has many ties, the response-direction Somers' D, which retains response ties among pairs with different predictor values, is smaller:
These coefficients describe ordered association; the omnibus Pearson's chi-squared test tests any departure from independence and does not supply a separate p-value for gamma.
The column-dependent Goodman and Kruskal's lambda makes the weak predictive improvement tangible. Predicting the overall most frequent safety category makes errors in this table. Using a separate most frequent category within each experience row makes , giving , only about a reduction in those classification errors.
The sample supports a statistically detectable but weak association, chiefly a reduced sample proportion feeling very safe. This observational study does not establish that bad experiences cause the change: reverse direction, reporting differences or confounding could also contribute. The numerical p-value also presumes the sampling and complete-case assumptions appropriate to the observations used.
Reverse the order of exactly one of two ordinal categorical variables. Every concordant pair becomes a discordant pair and conversely, while pairs tied on either variable remain tied. Therefore the numerator changes sign and the denominator does not: Goodman and Kruskal's gamma changes sign whenever defined. The same argument applies to Somers' D, Kendall's tau-b and Stuart's tau-c, whose denominators depend on tie counts or table dimensions rather than the orientation. Reversing both orders preserves the sign. This explains why an association's numerical sign must be interpreted using the actual coding directions; it does not change the substantive paired observations. Measures of nominal association such as Cramér's V are invariant under either reversal.
Somers' D 2026-10-25
Here count concordant pairs and discordant pairs, and counts pairs tied on response but not on predictor . Somers' D divides by the number of pairs with distinct values, including pairs that the predictor separates but the response ties. Thus it is directional and generally changes when predictor and response are interchanged. For an contingency table with row predictor totals , that denominator is . The double-counting convention for concordances and discordances cancels the factor two.[ref]
Tied pair (ordinal data) 2026-10-25
Two observations tied on a variable have equal recorded values of that variable. For observations of two ordinal categorical variables, distinguish pairs tied only on the first, only on the second, or on both. Goodman and Kruskal's gamma excludes all such pairs, whereas Somers' D retains ties on the response when measuring directional predictive association. Consequently these coefficients can differ markedly for the same contingency table.
For observations of two ordered variables, every unordered pair is concordant, discordant, tied only on the first variable, tied only on the second variable, or tied on both. Consequently
The proof is an exhaustive partition: if neither coordinate is tied the two nonzero comparison signs agree or disagree; otherwise exactly one or both coordinates are tied. For contingency-table counts with row totals and column totals ,
Two records tied on both variables belong to each marginal tie total, so subtracting them once from each produces the exclusive . Using incompatible exclusive and inclusive conventions corrupts Somers' D and Kendall's tau-b even if the untied concordances are correct. The identities also provide a direct arithmetic check on a printed statistical summary.