Performance Evaluation of Large Language Models in Statistical Programming

Xinyi Song, Kexin Xie, Lina Lee, Ruizhe Chen, Jared M. Clark +8 more
2/18/2025
stat.APcs.AI

No official code found. Best implementation: yili-hong/StatLLM (7 stars, last commit 2025-12-11).

Abstract

The programming capabilities of large language models (LLMs) have revolutionized automatic code generation and opened new avenues for automatic statistical analysis. However, the validity and quality of these generated codes need to be systematically evaluated before they can be widely adopted. Despite their growing prominence, a comprehensive evaluation of statistical code generated by LLMs remains scarce in the literature. In this paper, we assess the performance of LLMs, including two versions of ChatGPT and one version of Llama, in the domain of SAS programming for statistical analysis. Our study utilizes a set of statistical analysis tasks encompassing diverse statistical topics and datasets. Each task includes a problem description, dataset information, and human-verified SAS code. We conduct a comprehensive assessment of the quality of SAS code generated by LLMs through human expert evaluation based on correctness, effectiveness, readability, executability, and the accuracy of output results. The analysis of rating scores reveals that while LLMs demonstrate usefulness in generating syntactically correct code, they struggle with tasks requiring deep domain understanding and may produce redundant or incorrect results. This study offers valuable insights into the capabilities and limitations of LLMs in statistical programming, providing guidance for future advancements in AI-assisted coding systems for statistical analysis.

View on arXivView PDF

Code Implementations(1)

yili-hong/StatLLMCommunity100%

A Dataset for Evaluating the Performance of Large Language Models in Statistical Analysis

73SAS, Jupyter NotebookFeb 7, 202510 months ago

Similar Papers

Cite this paper

@article{song2025performance,
  title  = {Performance Evaluation of Large Language Models in Statistical Programming},
  author = {Xinyi Song and Kexin Xie and Lina Lee and Ruizhe Chen and Jared M. Clark and Hao He and Haoran He and Jie Min and Xinlei Zhang and Simin Zheng and Zhiyang Zhang and Xinwei Deng and Yili Hong},
  year   = {2025},
  eprint = {2502.13117},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.13117v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.13117.svg)](https://codeofpaper.com/paper/2502.13117)

Discussion