03 · What You Need to Know
How Generative AI Calculates Descriptive Statistics and Where Errors Arise
Does AI Actually Calculate Descriptive Statistics?
That depends on the system and how the analysis is performed.
A language model may generate numerical answers directly from a prompt without executing a calculation. Even when the response looks mathematically plausible, the numbers should not automatically be treated as verified results.
Some AI systems can execute code using computational environments. OpenAI's documented data-analysis functionality, for example, can use Python to process uploaded spreadsheets, calculate statistics, and produce charts.
Language-generated numerical answer
A number produced in the AI response without an independently inspectable calculation. Its accuracy should not be assumed.
Computationally generated statistic
A statistic calculated by executing code or another numerical procedure against specified data. It can be reproduced and checked, although the calculation may still use incorrect inputs or settings.
For research reporting, reproducible computational results provide a stronger basis for verification than unsupported numerical answers.
This distinction also applies to statistical analysis performed with generative AI more broadly.
Which Descriptive Statistics Can AI Calculate?
AI systems with suitable computational capabilities can calculate common descriptive measures for numerical and categorical variables.
| Statistic |
What it describes |
Common source of error |
| Frequency |
Number of observations in a category. |
Duplicate records, inconsistent category labels, or incorrect filtering. |
| Percentage |
Proportion of a defined denominator expressed per hundred. |
Using the wrong denominator or inconsistent missing-data rules. |
| Mean |
Arithmetic average of numerical observations. |
Including missing-value codes or averaging inappropriate variables. |
| Median |
Middle value of an ordered distribution. |
Incorrect sorting, filtering, or treatment of missing observations. |
| Mode |
Most frequently occurring value or category. |
Ignoring ties or inconsistently coded categories. |
| Standard deviation |
Dispersion of observations around their mean. |
Confusing sample and population formulas. |
| Minimum and maximum |
Smallest and largest observed values. |
Unrecognized data-entry errors or invalid values. |
| Quartiles and interquartile range |
Distributional position and spread. |
Different quantile definitions or software defaults. |
These measures are not equally appropriate for every variable. For example, calculating a mean of arbitrary category codes may produce a number without a meaningful interpretation.
AI should first identify whether each variable is numerical, categorical, ordinal, or otherwise structured.
Can AI Calculate the Mean Correctly?
The arithmetic mean is calculated by adding the observations and dividing by their number.
The mean of 80 describes the average score of these five observations. It does not establish that every student scored 80 or that the distribution is symmetric.
Although the formula is simple, errors may arise if AI includes missing-value codes such as 999, accidentally duplicates records, or calculates the mean for the wrong group.
Researchers should verify the number of observations included and the variable used in the calculation.
Can AI Calculate Standard Deviation Correctly?
Standard deviation summarizes the dispersion of numerical observations around their mean.
One important distinction is whether the researcher intends to describe the complete population of interest or calculate a sample standard deviation.
The result describes the spread of these scores around their mean. It does not mean that every score differs from the mean by 15.81 points.
If the population standard deviation formula were used instead, the denominator would be 5, producing approximately 14.14.
Neither result is inherently a computational error. They represent different definitions.
AI should identify which definition was used and why it is appropriate for the intended summary.
Can AI Calculate Medians and Quartiles Correctly?
The median divides an ordered dataset into two halves. For an odd number of observations, it is the middle value. For an even number, it is conventionally the average of the two middle values.
For example, the median of 60, 70, 80, 90, and 100 is 80.
Quartiles are more complicated because statistical software packages may use different conventions for calculating sample quantiles.
Different interpolation methods can produce slightly different first and third quartiles for the same small dataset.
Therefore, a discrepancy between AI and statistical software does not necessarily indicate an arithmetic mistake. It may reflect different quantile definitions.
Researchers should document the quantile method when the distinction materially affects the reported results.
Why Are Percentages Especially Easy to Misreport?
Percentages depend on the denominator. The arithmetic may be correct while the interpretation is wrong.
Suppose 200 students were invited to answer a survey question. Of these, 180 provided valid responses, and 90 selected "Agree."
| Calculation |
Result |
Interpretation |
| 90 / 200 × 100 |
45% |
Percentage of all 200 students who selected Agree. |
| 90 / 180 × 100 |
50% |
Percentage of the 180 valid respondents who selected Agree. |
Both calculations are mathematically correct. However, they answer different questions.
AI may report 50% without explaining that 20 students were excluded from the denominator because they did not provide valid responses.
For research reporting, the denominator should be explicit, particularly when item-level missingness varies across survey questions.
Can AI Handle Missing Values Correctly?
Missing data are among the most consequential sources of descriptive-statistics errors.
Spreadsheets may represent missing values using empty cells, text labels such as NA, or numerical codes such as 99, 999, or -1.
AI may recognize some conventions, but it should not assume that every unusual number represents missing data.
For example, 99 might be a legitimate examination score on a 100-point assessment, while 999 might be a designated missing-value code.
If missing-value codes are included in the mean, the result can become severely distorted.
Researchers should provide a data dictionary identifying valid ranges, missing-value codes, and the intended treatment of incomplete observations.
It is also important to distinguish between the number of participants in the dataset and the number contributing to each statistic.
Can AI Calculate Grouped Descriptive Statistics?
Yes. Computational AI tools can calculate descriptive summaries separately for groups, such as male and female students, instructional conditions, academic programs, or schools.
However, grouping introduces additional opportunities for error.
For example, a variable may contain category labels such as "BSIT," "BS IT," and "Information Technology." These may represent the same academic program but appear as separate categories unless standardized.
Similarly, AI may accidentally apply a filter to one summary but not another, producing inconsistent denominators.
Researchers should inspect group definitions and verify that each reported statistic corresponds to the intended subset of observations.
When the data involve repeated observations or clustering, the researcher must also distinguish between summaries of records and summaries of unique participants or groups.
Can AI Correctly Calculate Descriptive Statistics for Likert-Scale Data?
AI can calculate frequencies, medians, means, and standard deviations for numerically coded Likert responses. Whether a particular summary is appropriate depends on what the variable represents and the intended interpretation.
A single Likert-type item, such as a five-category agreement response, is ordinal. Frequencies, percentages, and medians can describe its ordered categories without assuming equal distances between them.
Means and standard deviations are also commonly reported for such items in some research traditions, but their interpretation relies on treating the numerical coding as sufficiently meaningful for the intended purpose.
A composite scale formed from several items raises additional questions about scoring, reverse coding, missing items, and measurement properties.
AI may calculate a mean of 4.2 correctly while overlooking that a negatively worded item should have been reverse-coded.
The arithmetic result would be accurate for the supplied numbers but potentially misleading as a measure of the intended construct.
Can AI Calculate Descriptive Statistics Directly From an Uploaded Spreadsheet?
Some AI systems can read CSV and Excel files, identify columns, and generate statistical summaries using computational tools.
However, spreadsheet structure can create difficulties. Multiple header rows, merged cells, inconsistent formats, hidden records, and formulas may complicate data extraction.
A dataset that looks straightforward to a human reader may be interpreted differently by an automated parser.
When asking AI to analyze an uploaded research spreadsheet, first request a data inventory showing variable names, data types, row counts, missing values, and detected irregularities.
Confirm that inventory before allowing the system to calculate and interpret the descriptive statistics.
How Should Researchers Verify AI-Generated Descriptive Statistics?
Verification should focus on both the arithmetic and the observations included in the calculation.
For a small dataset, researchers may manually check selected values. For larger datasets, independently reproduce the summaries using suitable statistical software or a reviewed script.
Compare the number of valid observations, means, standard deviations, frequencies, and percentages. Investigate discrepancies rather than assuming one system is correct.
Some differences may arise from software defaults, rounding, quantile definitions, or missing-data handling.
The broader requirement to verify AI-generated statistical results independently applies even to descriptive summaries.
Although descriptive statistics are often easier to reproduce than complex inferential models, their apparent simplicity should not obscure errors in data selection or interpretation.