IDEAS home Printed from https://ideas.repec.org/p/osf/metaar/zj5pc_v1.html

Large Language Models for Statistical Analysis: Can they Replace Domain-Specific Software Packages?

Author

Listed:
  • Ajayi, David

Abstract

Large language models (LLMs) represent one of the most significant advances in artificial intelligence in recent decades. Although LLMs are widely used to generate statistical code in domain-specific languages such as R, Python, and SAS, they are increasingly employed to perform data analysis directly. Prior studies have examined the use of LLMs in statistical analysis, but important gaps remain, including limited evidence on their proficiency in data manipulation and Bayesian statistical modeling. The present study was designed to evaluate the performance of common LLMs across a wide range of data analysis tasks, including data reading, data manipulation, descriptive statistics, contingency table analysis, mean comparison tests, correlation analysis, regression modeling, and Bayesian inference. Six large language models were assessed: ChatGPT 5.3, Gemini 3.1, Claude Sonnet 4.6, Microsoft Copilot GPT 5.1, Grok 4.2, and DeepSeek 3.2. All models were tested using their free-tier access, except for ChatGPT, which was evaluated through a paid subscription. Fully or partially simulated datasets were used in this study, and strict scoring criteria were implemented, in that the outputs from the LLMs must be consistent with those from R, and they must be reproducible upon re-run. Gemini, ChatGPT, and Claude achieved 100% accuracy in data reading and descriptive statistics. Gemini and Claude generated correct results for mean comparison tests. ChatGPT and Claude produced accurate outputs in correlation and regression analyses. None of the LLMs achieved 100% accuracy in data manipulation, contingency table analyses, and Bayesian modeling. On average, no LLM achieved perfect accuracy. The overall performance of Gemini, ChatGPT, and Claude was comparable, whereas Grok, Copilot, and DeepSeek performed poorly. Limitations in data manipulation and some inferential statistical methods suggest that LLMs cannot yet replace domain-specific software packages. Therefore, LLMs are better suited as complementary tools rather than standalone applications for rigorous statistical analysis.

Suggested Citation

  • Ajayi, David, 2026. "Large Language Models for Statistical Analysis: Can they Replace Domain-Specific Software Packages?," MetaArXiv zj5pc_v1, Center for Open Science.
  • Handle: RePEc:osf:metaar:zj5pc_v1
    DOI: 10.31219/osf.io/zj5pc_v1
    as

    Download full text from publisher

    File URL: https://osf.io/download/6a0ca29f34406a10992c36db/
    Download Restriction: no

    File URL: https://libkey.io/10.31219/osf.io/zj5pc_v1?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:osf:metaar:zj5pc_v1. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: OSF (email available below). General contact details of provider: https://osf.io/preprints/metaarxiv .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.