Rebuilding a survey's headline scores from its own answer counts
A 2026 survey of 598 lung cancer patients reports knowledge, attitude and practice scores. From its published answer counts, fibub's Likert chart tool rebuilds all three, and recovers the reliability the paper never reports for them.
A knowledge-attitude-practice survey, or KAP survey, is one of the commonest designs in health research: ask people what they know, what they think and what they do, add each block of answers into a score, and report the three totals. A 2026 paper in Frontiers in Nutrition ran one with 598 lung cancer patients on chemotherapy and reports knowledge 12.07 out of 20, attitude 35.89 out of 45 and practice 23.28 out of 30. It also prints, as most KAP papers do, how many of the 598 chose each answer to each of its 25 items. Those two things have to fit together, and the likert chart checks that they do. It also squeezes out something the paper does not report: how reliable the three scales were in the 598, not in the pilot. For the reliability itself see the reliability and agreement, and for scoring your own instrument the questionnaire scorer.
The paper in brief
Six hundred and thirty-nine patients at one hospital were approached and 598 usable questionnaires came back. The instrument has ten knowledge items answered on three levels (not clear, heard of it, very familiar; scored 0, 1 and 2, so the knowledge score runs from 0 to 20), nine attitude items on a five-point agree-disagree scale (9 to 45) and six practice items on a five-point never-to-always scale (6 to 30). A pilot of 36 people gave Cronbach’s alpha of 0.895 overall and 0.887, 0.788 and 0.809 for the three blocks.
The authors’ reading is that knowledge is the weak link: 12.07 of 20 is about 60 % of the maximum, while attitude is 80 % and practice 78 %. In other words these patients are willing and mostly doing the right things, but do not know much about nutrition during chemotherapy — the standard KAP conclusion that knowledge is where to intervene.
Checked with the tools
The tool’s summarise function takes one item’s counts, most negative answer first, and returns the percentage choosing each answer, the share who agree, the share who disagree, the median and the mean with its standard deviation. Run it over all 25 published items and the paper’s own arithmetic appears.
Step 1: the counts are clean. Every one of the 25 items has counts adding to exactly 598, with no missing answers anywhere. The 45 percentages printed beside the nine attitude items all equal the count divided by 598, the largest disagreement being 0.005 of a percentage point. Nothing has been transcribed wrongly.
Step 2: all three headline scores come straight back out. A domain score is the sum of its items, so its mean must be the sum of the item means. Adding the item means the tool works out:
| Domain | Items | Sum of the tool’s item means | Score in the paper |
|---|---|---|---|
| Knowledge (scored 0-2) | 10 | 12.0686 | 12.07 |
| Attitude (scored 1-5) | 9 | 35.8880 | 35.89 |
| Practice (scored 1-5) | 6 | 23.2826 | 23.28 |
All three land on the published value, to the last digit the paper prints. (The tool codes answers 1 to k, so for the knowledge items it reports means between 1 and 3; subtract one per item, 22.0686 − 10, to get the paper’s 0-to-2 scoring.) A KAP paper that fails this check has either mis-added its items or dropped cases from some of them.
Step 3: the chart says what the score cannot. All nine attitude items have a median of exactly 4, “Agree”, so the median ranks nothing. The means are nearly as flat, 3.68 to 4.10. What separates the items is the tail: item A1 has 14.7 % disagreeing, three times the next highest, and only 66.4 % agreeing against 82.1 % for item A8. On the knowledge side the spread is wide and useful: 43.0 % are “very familiar” with the subject of item K1 but only 24.2 % with item K4, whose mean of 0.93 out of 2 is the lowest of the ten. A single “knowledge 12.07/20” hides the fact that one item is doing most of the damage.
Step 4: the reliability of the real sample, which the paper does not give. The paper’s alphas come from the 36-person pilot. But a scale’s alpha depends only on the item variances and the variance of the total, and the paper publishes enough to recover both: the item variances come from the counts and the total’s standard deviation is printed beside each score. Cronbach’s formula α = k/(k−1) · (1 − Σσᵢ²/σ²_total) then gives, for the 598:
| Domain | Σ item variances | SD if the items were unrelated | SD in the paper | Alpha from the 598 | Alpha in the 36-person pilot | Average correlation between items |
|---|---|---|---|---|---|---|
| Knowledge | 4.686 | 2.165 | 4.69 | 0.874 | 0.887 | 0.41 |
| Attitude | 6.614 | 2.572 | 4.98 | 0.825 | 0.788 | 0.34 |
| Practice | 5.414 | 2.327 | 4.12 | 0.817 | 0.809 | 0.43 |
Three results worth having. First, the pilot’s alphas hold up in the full sample: the largest change is attitude, 0.788 to 0.825. Second, the reason the totals spread so widely is that the items agree with each other: if the ten knowledge items were unrelated, the score would have a standard deviation of 2.17, not the 4.69 reported. Third, that pins the average correlation between items at about 0.41, 0.34 and 0.43 — high enough to be measuring one thing each, not so high that the items are repetitive.
This also doubles as a check on the printed standard deviations. An SD below the “unrelated” line would be impossible unless items were negatively correlated, and an SD near the sum of the item SDs (6.83 for knowledge) would mean the items are the same question asked ten times. The paper’s three values sit comfortably between.
How we made the graphs
Both figures and every number come from scripts/blog-figures/lung-cancer-nutrition-kap-item-scores-from-response-counts.mjs in fibub’s public code. It calls summarise, sortItems, chartHeight, palette and drawLikert from src/lib/sci/likert.ts, the maths and the drawing behind the likert chart. Figure 1 is drawn by drawLikert itself through the same SVG painter the tool uses for its SVG download, so it is the tool’s own chart in the page’s colours.
The inputs are the 75 response counts of the paper’s Tables 2, 3 and 4, its sample size of 598, the three domain scores with their standard deviations, and the pilot alphas. Nothing is assumed. Figure 2’s curves use the identity σ²_total = Σσᵢ² + r̄ ((Σσᵢ)² − Σσᵢ²), which holds when every pair of items shares the same correlation r̄; real items vary around that average, so r̄ is an average, not a claim about any particular pair.
How we test the maths
On every change to fibub, tests/sci.mjs runs tests/sci-tools/likert-chart.mjs, which pins the summaries against hand-worked and pandas values:
- On made-up counts, the percentages, % agree, median, mean and SD of each item must match the independent calculation, and the diverging segments must be centred so that half of the middle answer sits either side of zero.
- An item whose answers are given as labels rather than codes must give the same summary, and an answer that is neither must be refused by name.
- New with this article: the 25 published items must give item-mean sums of 22.0686 (knowledge, on the tool’s 1-3 codes), 35.8880 (attitude) and 23.2826 (practice), every item must have n = 598, and the item variances must give Cronbach alphas of 0.8744, 0.8250 and 0.8173 against the paper’s printed standard deviations.
Check it yourself
On the likert chart:
- Press Counts per answer at the top of the Your answers card.
- Replace the box with these ten lines, the paper’s nine attitude items (tab or comma separated):
Statement, Strongly disagree, Disagree, Neutral, Agree, Strongly agreeItem A1, 12, 76, 113, 285, 112Item A2, 5, 21, 98, 267, 207Item A3, 5, 20, 89, 282, 202Item A4, 10, 26, 92, 285, 185Item A5, 3, 21, 111, 279, 184Item A6, 4, 31, 104, 278, 181Item A7, 7, 26, 132, 281, 152Item A8, 3, 21, 83, 299, 192Item A9, 1, 25, 126, 296, 150 - Leave Answer options on 5 and Order of statements on Most agreement first.
- The chart puts Item A8 at the top with 82.1 % agreeing and Item A1 at the bottom with 66.4 %, and every bar’s n in the summary table reads 598.
- In the Summary table, add up the Mean (SD) column: 4.10 + 4.10 + 4.09 + 4.02 + 4.04 + 4.01 + 3.95 + 3.91 + 3.68 = 35.90, which is the paper’s attitude score of 35.89 plus the rounding of nine two-decimal means (unrounded they add to 35.888). The SD column gives 0.80, 0.83, 0.85, 0.89, 0.82, 0.86, 0.80, 0.86 and 0.98; squared and added they come to 6.60, against 6.614 from the unrounded SDs, which is the figure Step 4 needs.
What researchers can use it for
- Check a KAP or scale paper before citing it: the sum of the item means must equal the reported domain mean. It takes a minute and it catches dropped cases and mis-added blocks.
- Recover reliability from a published table. Item counts plus the total’s SD give Cronbach’s alpha for the sample that was actually analysed, even when the paper reports only a pilot’s alpha.
- Sanity-check a printed standard deviation. It must lie between the square root of the summed item variances and the sum of the item SDs; outside that range something is wrong.
- Find the item that is dragging a score down, which a total never shows: here one knowledge item out of ten.
- Report percentages, not just means. When every median is 4 and every mean is near 4, the share who disagree is the only number that separates the items.
The fine print
- We did not have the item wordings, only the paper’s labels K1 to K10, A1 to A9 and P1 to P6, so the chart names the items by their labels.
- Treating the five answers as the numbers 1 to 5 is what the paper does when it adds them up; strictly, Likert answers are ordered categories, and the tool says so under its own summary table.
- The average inter-item correlation and the alphas assume the paper’s printed standard deviations are the SDs of the summed scores, which is how it labels them.
- The tool’s Answer options menu offers 4, 5, 6 and 7, so the three-answer knowledge items cannot be charted in the page as it stands; our script calls the same
summarisefunction directly for those, and the chart here uses the five-answer attitude items. - This is one hospital’s patients at one time, with no control group. Nothing here tests whether the survey’s conclusions generalise, only whether its own numbers hold together.
Sources
- Cao, J., Xiang, F., Zhang, J., Tang, Y., Hu, M. and Li, F. (2026), Knowledge, attitudes, and practices of lung cancer patients regarding nutritional management during chemotherapy, Frontiers in Nutrition 13: 1678612, doi:10.3389/fnut.2026.1678612. Licence CC BY 4.0, taken from the Crossref record (api.crossref.org/works?filter=doi:10.3389/fnut.2026.1678612), checked 2026-11-24; no correction or retraction on the record. Values used here: N = 598; the response counts and percentages of the ten knowledge items (3 answers each), nine attitude items and six practice items (5 answers each); the domain scores 12.07 ± 4.69 (range 0-20), 35.89 ± 4.98 (9-45) and 23.28 ± 4.12 (6-30); and Cronbach's alpha from a 36-person pilot (0.895 overall, 0.887, 0.788, 0.809).
- Methods: Likert, R. (1932), A technique for the measurement of attitudes, Archives of Psychology 140; diverging stacked bars as in Robbins, N. B. and Heiberger, R. M. (2011), Plotting Likert and other rating scales, JSM Proceedings; Cronbach, L. J. (1951), Coefficient alpha and the internal structure of tests, Psychometrika 16: 297-334.
If you are an author or publisher and want a credit or a passage changed or removed, tell us and we will act quickly.