Efficient computation of statistical measures using C programming
Abstract
Accurate computation of statistical measures such as mean, median, mode, variance, and standard deviation is fundamental to data analysis and decision making. Many traditional approaches rely on manual calculations or high-level languages like R and Python, which may not be applicable or feasible in resource-constrained environments or for educational reasons. In this paper, we present a C language implementation capable of calculating central tendency and dispersion measures on a dataset. The program is implemented to take user input dynamically, using loops and functions present results for maximum computational efficiency. A dataset is analyzed using Python to compare the statistical results with those obtained from the C programs. We compared the execution times of Excel and C for large datasets. The results, measured in seconds, show that C is significantly faster than Excel for big data.
Fields of Study & Subjects
Computational Physics and Python Applications
Teaching and Learning Programming
Engineering and Information Technology
Publication details
- Journal / source
- Journal of Statistical Sciences and Computational Intelligence
- Volume
- 2
- Issue
- 1
- Publication date
- 7 February 2026