Claude Code and the Kolmogorov-Smirnov test detected anomalies in a children's olympiad
A friend asked an anti-fraud expert to look at the results of a children's olympiad: the scores looked strange. The expert applied the Kolmogorov-Smirnov…
AI-processed from Habr AI; edited by Hamidun News
An anti-fraud expert received an unexpected request from an acquaintance: check the results of a children's science olympiad where his son participated. The scores looked "strange" — and the specialist got to work, armed with Claude Code and the classical Kolmogorov-Smirnov test.
Anti-fraud
Goes Beyond Banks In the banking sector, statistical methods have been working for years: transaction analysis, search for anomalous patterns, distribution verification. The same tools apply anywhere there's data and a potential incentive for manipulation — whether financial transactions or school grades. The acquaintance came with a simple request: "something about the results seems off". The expert didn't limit himself to intuition. The task was formalized: there's a set of participant scores, there's an expected honest distribution — we need to check statistically whether they match. This is exactly the question that anti-fraud systems ask every day, just with different input data.
Why the KS
Test The Kolmogorov-Smirnov test is one of the most powerful non-parametric tools for comparing two distributions. It doesn't need to be trained on data, it doesn't require assumptions about normality. It's enough to ask: "Could this data have been generated by the same random process?"
— and the test gives an answer in the form of a p-value. For olympiad scores, the logic is simple: if participants honestly solved problems, the results will be distributed according to the actual spread of knowledge. A distribution that's too "correct", too uniform, or anomalously skewed — a statistical warning signal.
Claude Code took on routine coding at each step of the analysis: Loading and normalizing data in Python Calculating KS-statistic via scipy.stats Visualization: histograms, Q-Q plots, CDF curves Analysis of clusters of identical answers across different participants * Interpretation of p-value and formulation of conclusions in plain language ## What Was Found in the Data The distribution of scores across a number of problems looked suspicious. In a fair olympiad, the spread of results reflects real differences in preparation: strong participants tackle difficult problems, weak ones don't.
This generates a characteristic "tail" in the distribution. The KS-test recorded a statistically significant deviation: the p-value turned out to be below the threshold level. Clusters of identical answers among different participants and too uniform a distribution of correct scores across problems — all of this adds up to a picture that statistics rejects as random.
"Three hundred rubles for an imported one — that's a serious claim.
Well, three hundred it is. Let's go," — the author writes, emphasizing: professional tools activate automatically, regardless of the task's scale.
Claude
Code as Co-author of the Analysis The special value of this story is demonstrating the workflow. The expert didn't ask the model to "check the olympiad" — he conducted a structured dialogue: formulated a hypothesis, received ready-made code, ran it, interpreted the result, corrected the approach, and moved forward. The expert didn't write code from scratch — he set the direction: which metric to calculate, how to visualize, what the result means. Claude Code handled syntactic details and routine, freeing up mental space for interpretation and decision-making. For a one-off analytical project — exactly like checking an olympiad at an acquaintance's request — this is especially valuable: instead of days of work, you get a few hours.
What This Means Statistical anti-fraud methods have long gone beyond the financial sector.
School olympiads, competitions, tenders, opinion polls — everywhere there's data and a motive for manipulation, the same tools work. Claude Code lowers the barrier to entry: for serious statistical analysis, you no longer need to be a programmer — you just need to understand the task and formulate the right questions.
Want to stop reading about AI and start using it?
AI News is a curated feed of AI/tech news. Hamidun Academy teaches you to use AI systematically in your work.