D'Agostino-Pearson Normality Test Calculator

Inputs

K-squared statistic9.48
Z1 (skewness)2.481
Z2 (kurtosis)1.824
p-value0.0087
How this was calculated
  1. Inputs: sample skewness 0.85, excess kurtosis 1.20, sample size 50.
  2. D'Agostino's transform of the skewness gives Z1 = 2.481 (W = 1.1021 from the exact null kurtosis of g1).
  3. The Anscombe-Glynn transform of the kurtosis gives Z2 = 1.824 (A = 20.543).
  4. K^2 = Z1^2 + Z2^2 = 9.48 on 2 degrees of freedom, p = 0.0087: normality is rejected.

Most normality tests look at one aspect of shape. The D'Agostino-Pearson test looks at two - skewness and kurtosis - transforms each into an approximately standard normal score, and adds their squares into a single K^2 statistic on 2 degrees of freedom. It is the omnibus test implemented as normaltest in SciPy. This calculator takes the sample skewness, excess kurtosis and sample size, and returns K^2, both component scores Z1 and Z2, and the p-value.

Worked examples

Skew and kurtosis both off

(0.85 · 1.2 · 50)

K-squared statistic9.48
Z1 (skewness)2.481
Z2 (kurtosis)1.824
p-value0.0087

Near-normal sample

(0.12 · 0.1 · 120)

K-squared statistic0.60
Z1 (skewness)0.564
Z2 (kurtosis)0.528
p-value0.7419

Strongly non-normal sample

(1.9 · 4.5 · 35)

K-squared statistic26.73
Z1 (skewness)3.991
Z2 (kurtosis)3.287
p-value<0.0001

Two transforms, one statistic

Raw sample skewness and kurtosis are awkward test ingredients: their sampling distributions are themselves skewed, bounded and sample-size dependent in complicated ways. The D'Agostino-Pearson solution is to transform each into something close to standard normal under the null, then combine. Z1 handles skewness through D'Agostino's 1971 inverse-hyperbolic-sine transform, whose constants come from the exact mean and kurtosis of the sample skewness under normality. Z2 handles kurtosis through the Anscombe-Glynn (1983) cube-root transform, built on the kurtosis's own exact null moments.

Because the transforms are calibrated to finite-sample null distributions rather than asymptotic ones, the test behaves respectably at moderate sample sizes where cruder moment tests misfire. The K^2 statistic is then simply Z1^2 + Z2^2, chi-square on 2 degrees of freedom, with the particularly convenient p-value exp(-K^2/2).

  • Inputs: sample skewness g1, excess kurtosis g2, sample size n
  • Z1: D'Agostino's asinh transform of the skewness
  • Z2: Anscombe-Glynn cube-root transform of the kurtosis
  • K^2 = Z1^2 + Z2^2, chi-square on 2 df; p = exp(-K^2/2)

The D'Agostino skewness transform

The skewness transform starts from the exact null moments of g1: its variance is 6(n - 2)/((n + 1)(n + 3)) and its kurtosis a longer rational expression in n. From those, a scaling constant W is built, and the standardised skewness is passed through an inverse hyperbolic sine with a correction factor - the asinh shape straightens the skewness's own skewed sampling distribution into something near normal. In the first worked example a sample skewness of 0.85 at n of 50 becomes Z1 = 2.481: the asymmetry alone is more than two standard errors from normal.

Note what the transform does to intuition: the same skewness of 0.85 in a sample of 500 would produce a far larger Z1, because the null variance of g1 shrinks with n. Skewness values are not interpretable without the sample size attached, which is why the calculator demands n as an input rather than treating the moments as self-contained.

Worked examples

Example 1: Sample skewness g1 0.85; Sample excess kurtosis g2 1.2; Sample size (n) 50. K-squared statistic = 9.48. Supporting values: Z1 (skewness) 2.481; Z2 (kurtosis) 1.824; p-value 0.0087. Inputs: sample skewness 0.85, excess kurtosis 1.20, sample size 50. D'Agostino's transform of the skewness gives Z1 = 2.481 (W = 1.1021 from the exact null kurtosis of g1). The Anscombe-Glynn transform of the kurtosis gives Z2 = 1.824 (A = 20.543). K^2 = Z1^2 + Z2^2 = 9.48 on 2 degrees of freedom, p = 0.0087: normality is rejected.

Example 2: Sample skewness g1 0.12; Sample excess kurtosis g2 0.1; Sample size (n) 120. K-squared statistic = 0.60. Supporting values: Z1 (skewness) 0.564; Z2 (kurtosis) 0.528; p-value 0.7419. Inputs: sample skewness 0.12, excess kurtosis 0.10, sample size 120. D'Agostino's transform of the skewness gives Z1 = 0.564 (W = 1.0581 from the exact null kurtosis of g1). The Anscombe-Glynn transform of the kurtosis gives Z2 = 0.528 (A = 30.340). K^2 = Z1^2 + Z2^2 = 0.60 on 2 degrees of freedom, p = 0.7419: normality is not rejected at the 5% level.

Example 3: Sample skewness g1 1.9; Sample excess kurtosis g2 4.5; Sample size (n) 35. K-squared statistic = 26.73. Supporting values: Z1 (skewness) 3.991; Z2 (kurtosis) 3.287; p-value <0.0001. Inputs: sample skewness 1.90, excess kurtosis 4.50, sample size 35. D'Agostino's transform of the skewness gives Z1 = 3.991 (W = 1.1184 from the exact null kurtosis of g1). The Anscombe-Glynn transform of the kurtosis gives Z2 = 3.287 (A = 18.847). K^2 = Z1^2 + Z2^2 = 26.73 on 2 degrees of freedom, p = <0.0001: normality is rejected.

The Anscombe-Glynn kurtosis transform

Excess kurtosis under normality does not even average zero in finite samples: its exact null mean is -6/(n + 1), and the transform centres on that value, not on zero. Anscombe and Glynn standardise g2 by its exact null variance, then apply a Wilson-Hilferty-style cube root with a constant A built from the kurtosis's own skewness. Cube roots of negative quantities are taken as real roots - a detail that matters in code, where a naive fractional power of a negative number returns an error or a complex value.

In the first worked example the excess kurtosis of 1.2 becomes Z2 = 1.824, so K^2 = 2.481^2 + 1.824^2 = 9.48 with p = 0.0087: both components contribute, skewness the more. The second example's mild moments (0.12 and 0.1 at n of 120) give Z values of 0.564 and 0.528 and K^2 of 0.60, p = 0.7419 - a thoroughly normal-looking sample. The third example's 1.9 skewness and 4.5 excess kurtosis at n of 35 produce K^2 of 26.73, beyond argument.

Exampleg1g2nZ1Z2K^2p
10.851.2502.4811.8249.480.0087
20.120.11200.5640.5280.600.7419
31.94.5353.9913.28726.73<0.0001

Choosing between normality tests

The normality-test shelf is crowded: Shapiro-Wilk, Anderson-Darling, Jarque-Bera, Kolmogorov-Smirnov with Lilliefors correction. D'Agostino-Pearson's niche is the moment-based omnibus: it is powerful against alternatives that show up as skewness or kurtosis - which is most of them - and its two components tell you which shape failed, diagnostic information a single Anderson-Darling statistic does not provide. Jarque-Bera uses the same two moments but with asymptotic variances and no transforms, and is noticeably less accurate at the sample sizes where the question is usually asked.

Shapiro-Wilk remains the stronger pure test at small samples, and Anderson-Darling the more tail-sensitive. The honest practice in applied work is to run one omnibus test, look at the components and a quantile plot, and remember that at very large n every test rejects - the question becomes whether the departure matters for the procedure the normality was meant to license, which no p-value can answer.

Practical notes

The kurtosis input is excess kurtosis - the normal value is 0, not 3 - and the skewness and kurtosis must be the plain sample moments g1 and g2 (the Fisher definitions most software reports), computed on the same sample whose size is n. Samples below about 20 stretch the transforms past their design range; the calculator will still return numbers, but Shapiro-Wilk is the better instrument there.

A last interpretive discipline: the test's null is exact normality, and real data are never exactly normal. The p-value measures the evidence that the shape departs from Gaussian in its third and fourth moments, at this sample size - the first example's 0.0087 at n of 50 is a real shape signal, while the same moments at n of 20 would be unremarkable. Report n with the result, as the examples do, or the number cannot be weighed.

In software practice this test is most often met as scipy's normaltest, and its implementation there follows the same transforms this page computes - which makes the calculator a useful cross-check on code rather than only on data. Feeding the three worked examples' moments through both and comparing K^2 values to the decimals shown is the kind of verification that catches the two classic implementation bugs: using raw kurtosis where excess kurtosis belongs (a shift of 3 that swamps the statistic) and taking a fractional power of a negative cube-root argument, which some languages answer with an error and others, worse, with a silently wrong sign.

Power comparisons among normality tests repay a moment's attention, because they explain this test's survival. Against alternatives that depart from normality mainly in the tails, tail-weighted tests like Anderson-Darling can edge it out; against the much commoner alternatives - skewed error distributions, mixtures, moderately heavy tails - the moment-based omnibus is at or near the front, and it is the only common test whose failure comes with a diagnosis attached: Z1 or Z2, skewness or kurtosis, printed on the face of the result.

A word on what a rejection should trigger in a modelling workflow, since the test is so often run as a gatekeeper for procedures that assume normality. The valuable response is rarely to abandon the procedure - most are robust to the mild departures this test detects at moderate n - but to ask which component failed and whether the downstream method cares. A regression whose errors fail on Z2 alone, with kurtosis the complaint, keeps its coefficient estimates and most of its inference; a failure on Z1 warns that transformations of the response deserve consideration. The components, once again, are the diagnosis; K^2 is only the door they stand behind.

FAQs

What K-squared does the first example give?

Z1 of 2.481 and Z2 of 1.824 combine to K^2 = 9.48 on 2 degrees of freedom.

What is the skewness component Z1?

Z1 is 2.481 - a sample skewness of 0.85 at n of 50 is well beyond normal sampling variation.

What is the kurtosis component Z2?

Z2 is 1.824, from the Anscombe-Glynn transform of the excess kurtosis of 1.2.

What p-value does the first example give?

The p-value is 0.0087, so normality is rejected - both shape components contribute to the verdict.

What K-squared does the near-normal second example give?

It gives K^2 = 0.60 with p = 0.7419: moments of 0.12 and 0.1 at n of 120 are entirely normal-looking.

What K-squared does the heavy-tailed third example give?

It gives K^2 = 26.73, p below 0.0001, from skewness of 1.9 and excess kurtosis of 4.5.

Sources

Related calculators

Skewness Calculator
How lopsided is your data? Pearson's moment coefficient of skewness with mean, median, standard deviation and the Fisher-Pearson adjusted value.
Chi-Square Test Calculator (2x2)
The chi-square test of independence for a 2x2 contingency table: statistic, p-value at 1 degree of freedom, and the phi effect size.
Bowley Skewness Calculator
Compute Bowley's quartile skewness coefficient (Q3 + Q1 - 2 Q2) / (Q3 - Q1) - a robust skewness measure built only from quartiles, bounded between -1 and +1.