Quantitative Research and Statistical ReasoningIntroduction and ContextQuantitative research uses numerical data to describe phenomena, examine relationships, estimate unknown quantities, and evaluate claims. In artificial intelligence and machine learning (AI/ML), quantitative reasoning supports dataset evaluation, model comparison, experiment design, performance reporting, and evidence-based technical decisions. Statistical methods do not replace subject-matter knowledge or research design; rather, they provide disciplined ways to reason under uncertainty. A central distinction is between a sample, which is the observed subset of a population, and a population, which is the complete group about which conclusions are intended. A statistic, such as a sample mean, describes a sample. A parameter, such as a population mean, describes the population. Inferential statistics use sample evidence to make cautious claims about population parameters. Statistical reasoning requires more than calculating a number. A researcher must ask: How were observations obtained? Are measurements valid and independent? What assumptions are appropriate? How large is the uncertainty? Is an observed difference important in practice, or merely statistically detectable? These questions are essential when reporting AI experiments, user studies, or operational analytics. Learning ObjectivesBy the end of this chapter, students should be able to: 1. Distinguish populations, samples, parameters, statistics, variables, and measurement scales. 2. Summarize data using appropriate descriptive statistics and visualizations. 3. Explain probability, sampling distributions, estimation, and confidence intervals. 4. Formulate and interpret null and alternative hypotheses. 5. Apply and interpret common hypothesis tests, effect sizes, correlation, and regression. 6. Explain statistical power, practical significance, assumptions, and sources of bias. 7. Report quantitative findings accurately and ethically in technical writing. 1. Foundations of Quantitative EvidenceVariables and measurementA variable is a characteristic that can take different values. In an ML experiment, examples include training time, model accuracy, number of features, and prediction latency. A categorical variable represents groups, such as algorithm type. A numerical variable represents quantities. Numerical variables may be discrete, such as the number of errors, or continuous, such as response time. Measurement scales affect which analyses are defensible: - Nominal: labels without meaningful order, such as operating system.
- Ordinal: ordered categories where intervals are not necessarily equal, such as satisfaction ratings.
- Interval: equal numerical intervals but no meaningful zero, such as temperature in Celsius.
- Ratio: equal intervals and a meaningful zero, such as runtime or memory usage.
A dependent variable is the outcome being measured. An independent variable or predictor is a factor used to explain or influence the outcome. A confounder is a variable associated with both a predictor and an outcome that can create a misleading relationship. Randomization, stratification, matching, and statistical adjustment can help address confounding, although no method automatically repairs poor measurement or biased sampling. Descriptive and inferential statisticsDescriptive statistics summarize observed data. Inferential statistics quantify uncertainty when generalizing beyond the observed data. Descriptive analysis should normally precede inferential analysis because it reveals skewness, outliers, missing values, subgroup differences, and possible data errors. A good quantitative report identifies the unit of analysis. For example, five measurements from one user are not equivalent to five independent users. Treating repeated observations as independent can make standard errors too small and p-values misleading. 2. Descriptive Statistics and Data VisualizationFor observations \(x_1,x_2,\ldots,x_n\), the sample mean is \[ \bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_i. \] Here, \(n\) is the number of observations and \(\bar{x}\) is the arithmetic average. The mean is informative for roughly symmetric data but can be strongly affected by outliers. The median is the middle ordered observation, or the average of the two middle observations when \(n\) is even. It is often preferable for skewed variables such as income or latency. The mode is the most frequent value and is especially relevant for categorical data. The sample variance is \[ s^2=\frac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar{x})^2, \] and the sample standard deviation is \(s=\sqrt{s^2}\). The denominator \(n-1\), called Bessel's correction, provides an unbiased estimate of population variance under random sampling when the mean is estimated from the same data. Standard deviation has the same units as the observations. The range is maximum minus minimum. The interquartile range (IQR) is the third quartile minus the first quartile and describes the central 50% of observations. The coefficient of variation, \(s/\bar{x}\), can compare relative variability when the variable has a meaningful positive zero and the mean is not close to zero. For a sample with values 2, 4, 4, 6, and 9, the mean is \(25/5=5\), the median is 4, and the range is 7. The difference between mean and median suggests mild right skew. A complete description should not report only the mean when distributional shape matters. Useful displays include: - bar charts for categorical frequencies;
- histograms or density plots for numerical distributions;
- box plots for medians, quartiles, and possible outliers;
- scatterplots for relationships between two numerical variables;
- line charts for ordered time observations.
Three-dimensional charts, truncated axes, excessive decoration, and inappropriate dual axes can mislead readers. Graphs should show units, sample sizes where useful, clear labels, and uncertainty when the purpose is comparison. 3. Probability and Sampling DistributionsProbability expresses uncertainty. For an event \(A\), its probability \(P(A)\) lies between 0 and 1. The complement rule is \(P(A^c)=1-P(A)\). For events \(A\) and \(B\), the addition rule is \[ P(A\cup B)=P(A)+P(B)-P(A\cap B). \] If events are independent, \(P(A\cap B)=P(A)P(B)\). Independence is a substantive or design assumption, not something established merely because two variables appear unrelated in a small dataset. A random variable assigns numerical values to outcomes. Its expected value is a probability-weighted average. The binomial model applies to a fixed number \(n\) of independent trials, each having two outcomes, with constant success probability \(p\). If \(X\) is the number of successes, \[ P(X=k)=\binom{n}{k}p^k(1-p)^{n-k}. \] The assumptions of fixed trials, independence, binary outcomes, and constant probability must be considered before using this model. A sampling distribution is the probability distribution of a statistic across repeated samples. The standard error of the sample mean, under independent observations with finite variance, is \[ SE(\bar{x})=\frac{s}{\sqrt n}. \] The standard error measures sampling variability of the mean; it is not the same as the standard deviation of individual observations. Increasing sample size generally reduces the standard error at a rate proportional to \(1/\sqrt n\), although it does not correct systematic bias. The central limit theorem states, under suitable conditions, that the sampling distribution of a mean approaches normality as sample size increases, even when the population is not normal. The required sample size depends on skewness, dependence, and the precision required. It is not a universal rule that a particular small number guarantees normality. 4. Estimation and Confidence IntervalsA point estimate is a single value used to estimate a parameter. An interval estimate gives a range of plausible parameter values under a stated procedure. For a mean with unknown population standard deviation, a commonly used confidence interval is \[ \bar{x}\pm t_{1-\alpha/2,n-1}\frac{s}{\sqrt n}, \] where \(t_{1-\alpha/2,n-1}\) is a critical value from the t distribution with \(n-1\) degrees of freedom, \(s\) is the sample standard deviation, and \(1-\alpha\) is the confidence level. This interval assumes independent observations and is most reliable when the mean is appropriate and the sampling distribution is reasonably well behaved. For a proportion \(\hat p=x/n\), a simple large-sample interval is \(\hat p\pm z_{1-\alpha/2}\sqrt{\hat p(1-\hat p)/n}\). This approximation can be poor for small samples or proportions near 0 or 1; Wilson or exact methods may be preferable. A 95% confidence interval does not mean that there is a 95% probability that a fixed parameter lies in this particular interval. In repeated sampling, a correctly constructed 95% confidence procedure would contain the true parameter in approximately 95% of repeated samples. In practical writing, it is acceptable to say that the interval provides a range of values compatible with the data and method, but not that it assigns a probability to a fixed parameter. Worked example: confidence intervalSuppose an algorithm is evaluated on 25 independently sampled tasks. Its mean completion time is 42 seconds and its sample standard deviation is 10 seconds. Using the approximate 95% critical value \(t_{0.975,24}=2.064\), \[ SE=10/\sqrt{25}=2\text{ seconds}, \] so the margin of error is \(2.064(2)=4.128\) seconds. The interval is \[ 42\pm4.128=(37.872,46.128)\text{ seconds}. \] The sample supports an estimated mean completion time between approximately 37.9 and 46.1 seconds under the stated assumptions. The interval describes uncertainty due to sampling; it does not account automatically for measurement error, dataset shift, or biased task selection. 5. Hypothesis TestingHypothesis testing formalizes comparison between a null hypothesis \(H_0\) and an alternative hypothesis \(H_1\). The null often represents no difference or no association. A test statistic measures how far the observed result is from what would be expected under \(H_0\). The p-value is the probability, assuming \(H_0\) and the model assumptions are true, of obtaining a result at least as extreme as the observed result. A p-value is not the probability that the null hypothesis is true, nor is it the probability that the result occurred by chance. Statistical decisions should combine the p-value with effect size, confidence interval, design quality, and practical consequences. A typical workflow is: 1. Define the population, outcome, comparison, and estimand. 2. State directional or nondirectional hypotheses before examining results. 3. Select a test based on design, measurement scale, and assumptions. 4. Set a significance level \(\alpha\), often 0.05, before analysis. 5. Calculate the estimate, test statistic, p-value, and confidence interval. 6. Interpret statistical and practical significance together. 7. Report exclusions, missing data, multiple comparisons, and deviations from the plan. A Type I error rejects a true null hypothesis; its probability is controlled approximately by \(\alpha\) under the model. A Type II error fails to reject a false null hypothesis. Statistical power is \(1-\beta\), where \(\beta\) is the probability of a Type II error for a specified effect, sample size, variability, and significance level. “Failing to reject” is not proof that no effect exists. Common tests include the one-sample t-test, independent-samples t-test, paired t-test, chi-square tests for categorical data, and analysis of variance (ANOVA) for comparing means across more than two groups. The independent-samples t-test requires attention to independence and variance assumptions; Welch's version is often safer when group variances differ. A paired test is appropriate when each observation in one condition is naturally matched to an observation in another condition, such as the same tasks evaluated by two models. ANOVA tests whether at least one group mean differs, but a significant omnibus result does not identify which groups differ. Planned contrasts or multiplicity-adjusted post-hoc comparisons are needed. Running many tests increases the chance of false positives; methods such as Bonferroni or false discovery rate control address different multiplicity goals. 6. Effect Sizes and Practical SignificanceStatistical significance depends strongly on sample size. With a sufficiently large dataset, a trivial difference can produce a small p-value. With a small dataset, a meaningful effect can fail to reach conventional significance. Effect sizes describe magnitude independently, or partly independently, of sample size. For two independent group means, Cohen's d is commonly defined as \[ d=\frac{\bar{x}_1-\bar{x}_2}{s_p}, \] where the pooled standard deviation is \[ s_p=\sqrt{\frac{(n_1-1)s_1^2+(n_2-1)s_2^2}{n_1+n_2-2}}. \] This standardized measure is useful when the outcome is measured on a meaningful interval scale and the groups are reasonably comparable. For paired data, the effect should generally be based on the standard deviation of within-pair differences rather than the pooled between-group standard deviation. Other effect measures include mean difference, percentage-point difference, risk ratio, odds ratio, and \(R^2\). The best measure depends on the question and audience. A mean latency reduction of 20 milliseconds may be highly valuable in a real-time system but irrelevant in an offline batch process. Researchers should define a minimally important difference using domain, user, safety, or economic considerations before interpreting results. 7. Correlation and RegressionThe Pearson correlation coefficient is \[ r=\frac{\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y})}{\sqrt{\sum_{i=1}^{n}(x_i-\bar{x})^2\sum_{i=1}^{n}(y_i-\bar{y})^2}}. \] It measures the strength and direction of a linear association, ranging from -1 to 1. Correlation is sensitive to outliers and does not establish causation. A nonlinear relationship can have a correlation near zero, and a third variable can explain an observed association. Simple linear regression models an outcome as \[ y_i=\beta_0+\beta_1x_i+\varepsilon_i, \] where \(\beta_0\) is the intercept, \(\beta_1\) is the expected change in the outcome for a one-unit increase in \(x\), and \(\varepsilon_i\) is an error term. Ordinary least squares estimates coefficients by minimizing the sum of squared residuals. Interpretation requires attention to the range of observed data; extrapolation beyond that range may be unsafe. Multiple regression adds predictors, for example \(y=\beta_0+\beta_1x_1+\beta_2x_2+\varepsilon\). A coefficient describes the association with one predictor while holding the other included predictors constant, not necessarily a causal effect. Important assumptions include appropriate functional form, independent errors, no severe multicollinearity, and reasonably stable error variance. Residual plots can reveal nonlinearity, heteroscedasticity, and influential observations. \(R^2\) is the proportion of sample variation in the outcome explained by the fitted model relative to an intercept-only model. A high \(R^2\) does not establish causality, guarantee predictive performance on new data, or imply that the model is ethically appropriate. For prediction, validation data and out-of-sample metrics are essential. 8. Power Analysis and Sample SizePower analysis plans a study rather than merely interpreting it afterward. Required sample size depends on the significance level, desired power, variability, design, allocation, and smallest effect considered important. For a two-sided comparison of two independent means with equal group sizes, a rough planning expression is \[ n_{\text{per group}}\approx \frac{2(z_{1-\alpha/2}+z_{1-\beta})^2\sigma^2}{\Delta^2}, \] where \(\sigma\) is the assumed common standard deviation, \(\Delta\) is the target mean difference, and \(n\) is the number per group. This approximation assumes independent observations, approximately normal means, equal group sizes, and a two-sided test. Software should be used for exact designs, and anticipated attrition or unusable observations should be incorporated. Power is not a fixed property of a test. It changes with the true effect and variability. Post hoc power calculated from an observed effect is often unhelpful; confidence intervals and the precision of the estimate usually communicate evidence more effectively. In ML, repeated tuning on a test set can inflate apparent performance, so power calculations do not substitute for strict train-validation-test separation. 9. A Detailed Applied CaseBackgroundThe following is an illustrative case. A university research team develops a classifier for identifying defective components from sensor images. The existing model uses a convolutional neural network, while a proposed transfer-learning model is expected to improve recall without increasing inference latency excessively. ProblemThe team must determine whether the proposed model offers a meaningful improvement. It evaluates both models on the same 600 previously unseen images, with expert labels treated as the reference standard. Because both models classify the same images, the observations are paired. Analysis and approachThe primary outcome is image-level recall, defined as the proportion of defective images correctly identified. The team also records precision, F1 score, false-negative count, and median latency. It specifies recall improvement as the primary comparison before inspecting results and defines a 5-percentage-point improvement as operationally meaningful. The team first examines a confusion matrix for each model and reports point estimates with confidence intervals. For paired binary predictions, it uses a paired comparison based on discordant outcomes rather than treating the two sets of 600 predictions as independent. It reports the absolute recall difference, its interval estimate, and a p-value. Latency is summarized separately because it has a different unit and operational meaning. Suppose the baseline correctly identifies 480 of 600 defective images, giving recall \(480/600=0.80\). The new model correctly identifies 510, giving recall \(510/600=0.85\). The absolute improvement is 0.05, or 5 percentage points. This meets the predefined operational threshold, but the team must still examine uncertainty, the pattern of paired disagreements, image subgroups, and whether latency remains acceptable. The team does not claim that the new architecture causes all improvement merely because its p-value is below 0.05. Both models were evaluated on one dataset, possible label errors may remain, and performance may change under deployment shift. It tests subgroup recall for lighting conditions and component types, labels these analyses as secondary, and controls or transparently reports multiple comparisons. The final report includes the test-set selection process, preprocessing, random seeds, confidence intervals, effect sizes, and code or configuration sufficient for reproduction. Outcome and learning pointsThe result is potentially both statistically and practically important because the observed improvement equals the predefined threshold. If the confidence interval is wide and includes improvements below the operational threshold, the correct conclusion is promising but uncertain, not definitive. If latency rises beyond the service-level requirement, the recall improvement may not justify deployment. The case demonstrates that paired design, prespecified outcomes, effect sizes, uncertainty, subgroup analysis, and deployment constraints should be interpreted together. 10. Assumptions, Bias, and LimitationsStatistical procedures rely on assumptions. Independence may fail with repeated users, clustered institutions, time series, or related images. Normal approximations may fail with small or highly skewed samples. Missing data may be informative rather than random. Outliers may reflect errors, rare but important cases, or legitimate observations. Removing them without a documented rule can bias results. Sampling bias occurs when the observed sample systematically differs from the target population. Selection bias, survivorship bias, measurement bias, label bias, and confirmation bias are common in AI research. A large biased dataset can produce precise but wrong conclusions. Researchers should define eligibility criteria, document exclusions, compare included and excluded cases where possible, and report generalizability limits. Statistical significance should not be used as a threshold for scientific worth. Conversely, practical importance should not be asserted without quantifying consequences. Researchers should report estimates, uncertainty, sample sizes, assumptions, missingness, and sensitivity analyses. Reproducibility requires versioned data or data documentation, analysis scripts, software versions, and a clear distinction between confirmatory and exploratory analyses. 11. Ethical, Governance, and Contemporary ConsiderationsQuantitative research involving people requires informed consent or an appropriate ethical review pathway, privacy protection, secure data handling, and proportional collection. Sensitive attributes should not be collected or analyzed without a legitimate purpose and safeguards. Fairness analysis may compare error rates across groups, but subgroup sample sizes, measurement validity, intersectionality, and possible harms must be considered. Equal statistical metrics do not automatically imply equitable outcomes. Modern AI research increasingly uses resampling, bootstrap confidence intervals, cross-validation, Bayesian estimation, causal inference, and hierarchical models. These tools are valuable when matched to the research question. Automated analysis can also create risks: indiscriminate p-value searching, leakage between training and test data, benchmark overfitting, and opaque preprocessing. Statistical software calculates results but cannot determine whether the design supports a causal claim or whether a variable was measured appropriately. Best practice is to register or document the analysis plan where feasible, separate development data from final evaluation data, use uncertainty-aware reporting, validate on representative data, and communicate limitations in language proportionate to the evidence. Chapter SummaryQuantitative research turns observations into structured evidence, but valid inference depends on design, measurement, assumptions, and transparent reporting. Descriptive statistics summarize distributions, while inferential statistics estimate population quantities and evaluate hypotheses. Probability and sampling distributions explain uncertainty; confidence intervals quantify estimation precision; and hypothesis tests assess compatibility with a null model. Effect sizes and domain-defined thresholds are necessary for judging practical significance. Correlation describes association, whereas regression models conditional relationships and requires careful diagnostic reasoning. Power analysis supports efficient study planning. In AI/ML, paired evaluations, held-out test data, subgroup analysis, reproducibility, privacy, and fairness are central to credible technical conclusions. Key TermsPopulation: The complete group to which a study aims to generalize. Sample: The observed subset drawn from a population. Parameter: A numerical characteristic of a population. Statistic: A numerical summary calculated from a sample. Variable: A measurable characteristic that can take different values. Mean: The arithmetic average of observations. Median: The middle value in an ordered dataset. Standard deviation: A measure of dispersion in the same units as the data. Standard error: The estimated sampling variability of a statistic. Confidence interval: An interval produced by a procedure designed to contain a parameter at a stated long-run rate. Null hypothesis: A formal claim commonly representing no difference or association. P-value: The probability, under the null model and assumptions, of results at least as extreme as observed. Type I error: Rejecting a true null hypothesis. Type II error: Failing to reject a false null hypothesis. Effect size: A measure of the magnitude of a difference or association. Correlation: A standardized measure of linear association between two variables. Regression: A model relating an outcome to one or more predictors. Statistical power: The probability of detecting a specified effect under a chosen design. Confounder: A variable that can distort an observed relationship between variables. Practical significance: Importance of a result in its real-world context. Review QuestionsShort Answer Questions1. Distinguish a parameter from a statistic and provide one example of each. 2. Why is the standard error not the same as the standard deviation? 3. What does a p-value represent, and what does it not represent? 4. Explain the difference between statistical significance and practical significance. 5. Why does correlation not by itself establish causation? Long Answer Questions1. Explain how descriptive statistics and visualizations should guide subsequent inferential analysis. 2. Describe the assumptions and interpretation of a confidence interval for a population mean. 3. Compare Type I error, Type II error, statistical power, and sample size. 4. Explain how effect sizes improve the interpretation of hypothesis-test results. 5. Discuss major threats to validity in quantitative AI/ML research and methods for reducing them. Analytical / Application Questions1. A model's mean latency falls from 120 ms to 116 ms in a very large evaluation, with p < 0.001. Explain what additional information is needed to decide whether deployment is worthwhile. 2. Two classifiers are tested on exactly the same images. Identify an appropriate comparison design, explain why independent-group analysis may be inappropriate, and state what effect should be reported. 3. A regression model has a high \(R^2\) but performs poorly on a held-out dataset. Give several statistical or methodological explanations and propose diagnostic checks. Multiple Choice Questions with AnswersQuestion 1Which statistic is generally most resistant to a single extreme outlier? A. Mean B. Median C. Variance D. Range Correct Answer: B. Median Question 2For independent observations, the standard error of a sample mean is estimated by: A. s multiplied by square root of n B. s divided by square root of n C. n divided by s D. s divided by n squared Correct Answer: B. s divided by square root of n Question 3A 95% confidence interval is best interpreted as: A. A 95% probability that the fixed parameter is in this calculated interval B. A range produced by a method that captures the parameter in about 95% of repeated samples C. Proof that 95% of observations lie in the interval D. A statement that the null hypothesis has a 5% probability Correct Answer: B. A range produced by a method that captures the parameter in about 95% of repeated samples Question 4A p-value is the probability of: A. The null hypothesis being true B. The alternative hypothesis being false C. Data at least as extreme as observed, assuming the null model and assumptions D. Making a Type II error Correct Answer: C. Data at least as extreme as observed, assuming the null model and assumptions Question 5Which measure directly describes the magnitude of a standardized difference between two means? A. Cohen's d B. The p-value C. The sample size D. The confidence level Correct Answer: A. Cohen's d Question 6When the same images are classified by two models, the comparison is naturally: A. Paired B. Independent with unrelated samples C. A one-sample comparison to zero only D. A time-series comparison Correct Answer: A. Paired Question 7Which statement about correlation is correct? A. A correlation of zero proves no relationship of any kind B. Correlation alone establishes causation C. Pearson correlation measures linear association and can be affected by outliers D. Correlation can only be positive Correct Answer: C. Pearson correlation measures linear association and can be affected by outliers Question 8In the regression equation y = beta0 + beta1x + error, beta1 represents: A. The expected change in y for a one-unit increase in x, under the model B. The sample size C. The unexplained variance only D. The probability that the model is causal Correct Answer: A. The expected change in y for a one-unit increase in x, under the model Question 9Statistical power is: A. The probability of a Type I error B. The probability of detecting a specified effect under the design C. The probability that the null hypothesis is true D. The proportion of variance explained by regression Correct Answer: B. The probability of detecting a specified effect under the design Question 10Why can a statistically significant result still be practically unimportant? A. Significance tests ignore sample size completely B. A very large sample can detect a very small effect C. Confidence intervals always exclude zero D. Effect sizes are unrelated to research questions Correct Answer: B. A very large sample can detect a very small effect
|