Concordant pair 2026-10-25
For paired ordered observations and , the pair is concordant when : both coordinates increase in the same ordering. It is a discordant pair when this product is negative. Equality gives a tie in at least one coordinate. Counting these cases compares orderings without assuming meaningful equal distances between categories.
Goodman and Kruskal's gamma 2026-10-25
For concordant pairs and discordant pairs, Goodman and Kruskal's gamma compares their difference with their total. It ranges from to when and discards all pairs tied in either variable. Reversing exactly one category ordering reverses its sign; reversing both leaves it unchanged. Zero gamma does not imply independence, and ignoring numerous ties can make its magnitude larger than a tie-adjusted measure.[ref]
https://andrisignorell.github.io/DescTools/reference/GoodmanKruskalGamma.html. DescTools documentation, Details: concordances, discordances and discarded ties
Kendall rank correlation coefficient 2026-10-25
A family of ordinal association measures based on concordant pairs and discordant pairs. Without a tie adjustment, the coefficient is : the arithmetic mean, over unordered pairs, of the product of the two coordinate comparison signs. Reversing one ordering reverses the sign, and strictly increasing relabellings preserve it. Kendall's tau-b makes an explicit adjustment for tied pairs. The name commemorates Maurice Kendall.
Kendall's tau-b 2026-10-25
Let count concordant pairs and discordant pairs, and let count pairs tied only on the indicated variable. Thenwhen both factors in the denominator are positive. Unlike Goodman and Kruskal's gamma, this coefficient accounts for ties. Its absolute value is at most one: form vectors of the comparison signs for all unordered pairs. Their inner product is and their squared norms are the two denominator factors, in reverse variable order. The Cauchy-Schwarz inequality supplies the bound. A variable constant throughout gives a zero denominator, not a meaningful zero association.[ref]
Ordinal association measures in the DescTools documentation. KendallTauB: tie-adjusted rank association and relation to cor(method="kendall")
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 , andAll 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]
Pearson's Chi-squared Test for Count Data in the R documentation. Details: product-marginal null hypothesis and asymptotic chi-squared calibration
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 isIts 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]
DescTools documentation for gamma, Somers' D and lambda. GoodmanKruskalGamma and SomersDelta, Details: tied-pair exclusions and the directional denominator
[ref]Ordinal association measures in the DescTools documentation. KendallTauB and StuartTauC: tie and table-size adjustments
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.
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]
Pearson's Chi-squared Test for Count Data in the R documentation. Details: independence null, asymptotic reference distribution and observed/expected counts
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 givesIts 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 isWith 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.
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 asThe 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 throughThere 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 isIt 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. HenceTrust 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.
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. HereThe 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 giveswhich 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]
https://andrisignorell.github.io/DescTools/reference/SomersDelta.html. DescTools documentation, Details: column response given row predictor and the row-total denominator
Stuart's tau-c 2026-10-25
For an contingency table of two ordinal categorical variables, write , for the sample size and for concordant pairs and discordant pairs. The coefficient isIt provides an ordinal association measure whose normalization accounts for the table dimensions. It generally differs from Kendall's tau-b and Goodman and Kruskal's gamma on a table with tied pairs. An association sign presupposes the chosen category ordering and is not a causal direction. The eponym is associated with Alan Stuart.[ref]
Ordinal association measures in the DescTools documentation. StuartTauC, Details: formula, minimum table dimension and ordinal-data requirement