The statistician has a very good case for being included, but not absolutely clear-cut.
The British Sociological Association (BSA) lists a number of criteria for deserving authorship. The BSA criteria are quoted below (emphasis mine). They are similar to the Vancouver Protocol, which relates to medical research but is often referred to beyond medicine.
Everyone who is listed as an author should have made a substantial
direct academic contribution (i.e. intellectual responsibility and
substantive work) to at least two of the four main components of a
typical scientific project or paper:
a) Conception or design.
b) Data collection and processing.
c) Analysis and interpretation of the data.
d) Writing substantial sections of the paper (e.g. synthesising findings in the literature review or the findings/results section).
Everyone who is listed as an author should have critically reviewed
successive drafts of the paper and should approve the final version.
Everyone who is listed as author should be able to defend the paper
as a whole (although not necessarily all the technical details).
If a contributor fulfills each main criterion, they must be included as author.
If a contributor does not fulfill each main criterion, they must not be included as author.
If a contributor fulfills some criteria but not others, they should be acknowledged. (This is how I interpret the clause "all those who make a substantial contribution to a paper without fulfilling the criteria for authorship should be acknowledged.")
Paraphrasing from the question and comments:
- The statistician wrote half of the paper
- The statistician designed the analysis and ran all of the calculations
The statistician clearly fulfills criterion 1, as they contributed to design, data processing, analysis, and writing.
Since they contributed a crucial component of the paper, they arguably would be able to defend the remainder too, as in criterion 3.
It's not clear whether the statistician approved the final version, as in criterion 2. But it seems likely.
Obviously, the statistician should at least be acknowledged, since they fulfill some criteria. But all things considered, the statistician has a pretty good case for being included as co-author as well, in particular when comparing their contribution to that of the sociologists (which I have not done here).