Artificial Intelligence in Statistics Education: Leveraging LLMs for Analysis and Learning
Open Access
- 7 May 2026
- journal article
- research article
- Published by MDPI AG in Trends in Higher Education
- Vol. 5 (2) , 39
Abstract
Large Language Models (LLMs), such as GPT (GPT-5.5) by OpenAI and Gemini (Gemini 3.2 Pro) by Google DeepMind, have shown impressive capabilities in text generation and code assistance. This study evaluates their performance in generating R code—that is, computer scripts written in the R programming language for statistical analysis—using both classic educational datasets, including “The Lady Tasting Tea”, “Titanic”, “Iris”, and more recent datasets likely not included in the models’ training data. We assess the accuracy, readability, and educational relevance of the generated code, providing both quantitative and qualitative evaluations that highlight strengths and limitations of LLMs. Our findings suggest that while LLMs generate correct and interpretable R code in many cases, critical human oversight remains essential when integrating AI into educational contexts to ensure rigor and avoid potential misuse.Keywords
This publication has 25 references indexed in Scilit:
- Artificial Intelligence in Education (AIED): Towards More Effective RegulationEuropean Journal of Risk Regulation, 2025
- Can we Use GPT-4 as a Mathematics Evaluator in Education?: Exploring the Efficacy and Limitation of LLM-based Automatic Assessment System for Open-ended Mathematics QuestionInternational Journal of Artificial Intelligence in Education, 2024
- Artificial Intelligence in Education: Implications for Policymakers, Researchers, and PractitionersTechnology, Knowledge and Learning, 2024
- A History of Artificial IntelligenceClinics in Dermatology, 2024
- Pair programming with ChatGPT for sampling and estimation of copulasComputational Statistics, 2023
- Out of the BLEU: How should we assess quality of the Code Generation models?Journal of Systems and Software, 2023
- Conceptualizing AI literacy: An exploratory reviewComputers and Education: Artificial Intelligence, 2021
- Deep learningNature, 2015
- The Elements of Statistical Learning2009
- Silhouettes: A graphical aid to the interpretation and validation of cluster analysisJournal of Computational and Applied Mathematics, 1987