Home / Statistical Tools / Analysis Tools / Summarystats / Math Details
Math Details¶
This page gives the exact formulas Quantum XL uses to compute descriptive statistics. Each equation lists what it computes and where it appears in the output. (Elementary outputs — count, sum, minimum, maximum, range, mode — are omitted.)
Notation¶
| Term | Description |
|---|---|
| \(x_{(1)} \le \dots \le x_{(n)}\) | the data values sorted ascending |
| \(x_i, w_i\) | value and its frequency weight (\(w_i = 1\) when no frequency column is used) |
| \(n\) | effective sample size, \(n = \sum_i w_i\) |
| \(\bar{x}\) | weighted mean, \(\bar{x} = \dfrac{\sum_i w_i x_i}{\sum_i w_i}\) |
| \(M_k\) | weighted central moment sum, \(M_k = \sum_i w_i (x_i - \bar{x})^k\) |
| \(\Phi\) | standard normal cumulative distribution function |
Variance and standard deviation¶
The sample forms use the \(n-1\) (Bessel) denominator; both population and sample versions are reported.
Skewness (Fisher–Pearson standardized, \(G_1\))¶
Requires \(n > 2\); undefined for constant data. This is the bias-adjusted (\(G_1\)) form used by most statistical packages.
Kurtosis (excess, \(G_2\))¶
Excess kurtosis (a normal distribution gives \(0\)). Requires \(n > 3\).
Quantiles, quartiles, and percentiles¶
All percentiles, including the median and quartiles, use the Hyndman-Fan Type 8 estimator, which interpolates between the two order statistics nearest a fractional rank and is approximately median-unbiased. The median is \(Q(0.5)\), the first quartile is \(Q_1 = Q(0.25)\), and the third quartile is \(Q_3 = Q(0.75)\); Summary Statistics also reports the 1, 5, 10, 90, 95, and 99 percentiles and any custom percentiles. Frequency-weighted data uses the same estimator applied to the virtual weighted sample.
For the exact position formula, interpolation, and frequency-weighted form, see Type 8 (Hyndman-Fan) Quantiles.
Confidence intervals¶
Summary Statistics reports a confidence interval for the mean, using the Student t distribution, and a confidence interval for the standard deviation, using the chi-square distribution. Both use \(\alpha = 1 - \text{(confidence level)}\) and the sample standard deviation with the \(n - 1\) denominator.
For the exact interval formulas, see Student t Distribution for the mean and Chi-Square Distribution for the standard deviation.
Normality tests¶
Anderson-Darling¶
Quantum XL reports the Anderson-Darling statistic and its p-value as the primary normality check. The statistic compares the sorted, standardized data against the normal CDF; Quantum XL evaluates a frequency-weighted form, applies Stephens' finite-sample correction, and obtains the p-value from Stephens' approximation.
For the exact statistic, the finite-sample correction, and the p-value formula, see Anderson-Darling Test.
Shapiro–Wilk¶
The constants \(a_i\) are derived from the expected values and covariances of standard-normal order statistics; Quantum XL computes them using Royston's Algorithm AS R94, and obtains the p-value from Royston's transformation.
Kolmogorov–Smirnov (with Lilliefors correction)¶
where \(F_n\) is the empirical (cumulative-frequency) CDF and \(z_{(i)}\) standardizes with the sample mean and standard deviation. Because the parameters are estimated from the data, the p-value uses the Lilliefors correction.
Shared Math Details used here¶
This tool uses shared formulas defined once in Shared Math Details. See those pages for the exact definitions.
| Shared concept | Used here for | Reference |
|---|---|---|
| Anderson-Darling test | the normality test statistic and p-value | Anderson-Darling Test |
| Type 8 quantiles | the median, quartiles, and percentiles | Type 8 (Hyndman-Fan) Quantiles |
| Student t distribution | the confidence interval for the mean | Student t Distribution |
| Chi-square distribution | the confidence interval for the standard deviation | Chi-Square Distribution |
| Standard normal distribution | the normality tests | Standard Normal Distribution |
See Also¶
References¶
- Snedecor, G. W., & Cochran, W. G. (1989). Statistical Methods (8th ed.). Ames, IA: Iowa State University Press.
- Joanes, D. N., & Gill, C. A. (1998). Comparing measures of sample skewness and kurtosis. Journal of the Royal Statistical Society: Series D (The Statistician), 47(1), 183–189.
- Hyndman, R. J., & Fan, Y. (1996). Sample quantiles in statistical packages. The American Statistician, 50(4), 361–365.
- Anderson, T. W., & Darling, D. A. (1952). Asymptotic theory of certain goodness-of-fit criteria based on stochastic processes. Annals of Mathematical Statistics, 23(2), 193–212.
- Stephens, M. A. (1974). EDF statistics for goodness of fit and some comparisons. Journal of the American Statistical Association, 69(347), 730–737.
- D'Agostino, R. B., & Stephens, M. A. (Eds.). (1986). Goodness-of-Fit Techniques. New York: Marcel Dekker.
- Shapiro, S. S., & Wilk, M. B. (1965). An analysis of variance test for normality (complete samples). Biometrika, 52(3/4), 591–611.
- Royston, P. (1995). Remark AS R94: A remark on Algorithm AS 181: The W test for normality. Journal of the Royal Statistical Society: Series C (Applied Statistics), 44(4), 547–551.
- Lilliefors, H. W. (1967). On the Kolmogorov–Smirnov test for normality with mean and variance unknown. Journal of the American Statistical Association, 62(318), 399–402.
- Massey, F. J. (1951). The Kolmogorov–Smirnov test for goodness of fit. Journal of the American Statistical Association, 46(253), 68–78.