{
  "category": "Statistical functions",
  "display_name": "SKEW.P",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.SKEW.P",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 6 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 6 recorded answers",
    "workbook_corpus": {
      "cells": 6,
      "matched": 6
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/statistics.rs#L394-L396",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/ported/moment_stats_family.rs#L73-L99"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/statistics::all",
        "ported/moment_stats_family::mean"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/statistics.rs#L394-L396",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 6 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.SKEW.P.json",
  "name": "SKEW.P",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n\n- **[SKEW](FUNC.SKEW.md)** is the bias-corrected sibling, related by the exact identity above.\n  They are two estimators of the same population quantity, not a legacy/modern pair; neither\n  supersedes the other. Note the asymmetry of the naming: `SKEW` is the *older* function and\n  `SKEW.P` the newer one, so the usual \"prefer the dotted name\" migration advice does not apply\n  to this pair.\n- **[KURT](FUNC.KURT.md)** is the fourth-moment companion. Excel publishes only the\n  bias-corrected kurtosis; there is no `KURT.P`, which makes the `SKEW`/`SKEW.P` pair the only\n  place in the category where both moment conventions are exposed.\n- **[STDEV.P](FUNC.STDEV.P.md)** supplies the `sigma` in the denominator; `SKEW.P` is undefined\n  exactly where `STDEV.P` is zero. **[AVERAGE](FUNC.AVERAGE.md)** supplies `xbar`.\n- **[STANDARDIZE](FUNC.STANDARDIZE.md)** performs the same `(x - mu)/sigma` map one value at a\n  time.\n- **`SKEW.P` has no Compatibility-category predecessor.** It was added with the dotted-name\n  reorganisation as a genuinely new function rather than as a rename.\n- Readers confuse `SKEW.P` with a normality test. It is not one, and the sampling variability of\n  `g1` is large at the sample sizes spreadsheets usually hold.\n\n\n",
    "how-to-implement": "\n### Numerical notes\n\n\nThe kernel is the same two-pass centred construction as [SKEW](FUNC.SKEW.md)'s, with `n` in place\nof `n-1` in the standard deviation and `1/n` in place of `n/((n-1)(n-2))` in the scaling.\nEverything said there about algorithm choice applies here; the points specific to `SKEW.P` are\nthese.\n\n**Two-pass centring, not raw power sums.** The kernel computes `xbar`, then accumulates the\ncentred sum of squares and the standardised cubes from stored deviations. The alternative — build\n`m_3` from `sum x`, `sum x^2`, `sum x^3` algebraically — cancels catastrophically when the mean\nis large relative to the spread, and loses digits in proportion to the *cube* of that ratio. A\nthird moment computed that way on data with a large offset can come out with the wrong sign.\nChan, Golub and LeVeque (1983) analyse the variance case; the third moment is strictly worse.\n\n**Per-element standardisation.** Each deviation is divided by `sigma` before cubing rather than\ncubing first and scaling the total by `sigma^3`. This keeps the cubed quantities near unit scale\nand avoids the overflow that `(x - xbar)^3` reaches at deviations beyond roughly `10^102`, at the\ncost of `n` divisions.\n\n**The population divisor is the numerically friendlier one.** `sigma^2 = sumsq/n` needs no\n`n-1` and no guard against `n = 1` beyond the zero-variance test, and `g1 = standardised_sum/n`\nis one division by an exact integer. There is no `(n-1)(n-2)` product to overflow or to lose\nprecision in, and no compound rational factor. `SKEW.P` is, arithmetic for arithmetic, the\ncleaner of the two skewness functions — which is worth noting because the bias correction that\nmakes [SKEW](FUNC.SKEW.md) statistically preferable also makes it numerically busier.\n\n**What remains.** The mean and both accumulations are naive left-to-right sums, so error grows\nwith `n` rather than being bounded; compensated summation is not used. The zero-variance guard is\nan exact comparison, not a tolerance, so data with a real but vanishing spread divides by a\ndenormal and produces an enormous result rather than a diagnostic. Summation order is part of the\nanswer, so two correct implementations traversing differently will disagree in the last bits.\n\n**The identity as a cross-check.** `SKEW = SKEW.P * sqrt(n(n-1))/(n-2)` is exact in real\narithmetic. Computing both and comparing against the closed form exercises the two kernels\nagainst each other without an external oracle, and any disagreement localises immediately to one\nof the two scaling paths — which is exactly the kind of self-consistency check a vector suite for\nthis family should carry.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns `Number`, dimensionless.\n\n- **All values equal.** `m_2 = 0`, the standardisation is `0/0`, and the result is `#DIV/0!`.\n- **A symmetric sample.** Zero, and exactly zero when the positive and negative cubes cancel exactly — which for a symmetric set in binary64 they usually do, each `+d^3` having an exact\n  `-d^3` partner. The exactness follows from the data and the summation order, not from a\n  guarantee.\n- **A single value.** `m_2 = 0` for one point, so the zero-variance guard fires and the answer is\n  `#DIV/0!` regardless of the minimum-count question.\n- **Non-numeric cells in a scanned range** are skipped and do not enlarge `n`.\n- **Errors anywhere** propagate as themselves.\n\n\n",
    "sources": "- Microsoft, *SKEW.P function* —\n  <https://support.microsoft.com/en-us/office/skew-p-function-76530a5c-99b9-48a1-8392-26632d542fcb>\n  (signature, the stated equation, and the documented error conditions). Retrieval was blocked by\n  the upstream host for this page; the documented behaviour above is stated as documented\n  behaviour and must be re-checked against the page. The minimum-data-point condition is left\n  open on this page for that reason.\n- M. Abramowitz and I. A. Stegun, *Handbook of Mathematical Functions*, chapter 26 section 26.1 —\n  the moment and standardised-moment vocabulary.\n- D. N. Joanes and C. A. Gill, \"Comparing measures of sample skewness and kurtosis\", *Journal of\n  the Royal Statistical Society, Series D (The Statistician)* 47(1), 1998, pp. 183–189 — the\n  competing estimators and the exact relations between them.\n- T. F. Chan, G. H. Golub and R. J. LeVeque, \"Algorithms for Computing the Sample Variance:\n  Analysis and Recommendations\", *The American Statistician* 37(3), 1983, pp. 242–247.\n- Handbook [coercion and lifting](../model/02-coercion-and-lifting.md) — the direct-argument\n  versus range-scan dual policy.\n- Handbook `data/functions/FUNC.SKEW.P.json`, `data/presence/FUNC.SKEW.P.json`.\n\n",
    "version-differences": "No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.",
    "what-it-does": "\n`SKEW.P(number1, [number2], …)` returns the **population skewness** of the values it is given:\nthe third standardised moment computed with the population standard deviation and no bias\ncorrection.\n\nFor values `x_1, …, x_n` with mean `xbar`, define the central moments\n\n    m_k  =  (1/n) * sum_{i=1..n} (x_i - xbar)^k\n\nand the population standard deviation `sigma = sqrt(m_2)`. Then\n\n    SKEW.P  =  g1  =  m_3 / m_2^(3/2)  =  (1/n) * sum ( (x_i - xbar) / sigma )^3\n\nThis is the plain third standardised moment about the sample mean — the estimator textbooks\nusually write as `b1` or `g1`. It treats the supplied values as the *whole population* rather\nthan as a sample drawn from a larger one, which is what the `.P` names throughout Excel's\nstatistical category mean.\n\nThe interpretation is the classical one from the moment vocabulary of Abramowitz & Stegun chapter\n26: zero for a symmetric distribution, positive when the right tail is longer, negative when the\nleft one is. It is invariant under any positive affine change of units, and it is dimensionless.\n\n**The relationship to [SKEW](FUNC.SKEW.md) is an exact algebraic identity**, not an\napproximation:\n\n    SKEW  =  SKEW.P  *  sqrt( n (n-1) ) / (n - 2)\n\nfor `n >= 3`. `SKEW` applies the bias correction that makes the estimator unbiased for a normal\npopulation; `SKEW.P` does not. The correction factor exceeds `1` always and decays toward `1` as\n`n` grows, so the two agree asymptotically and can differ noticeably on small samples. Joanes and\nGill (1998) catalogue both, together with a third variant, and give the relations among them.\nNeither convention is wrong; a reader comparing Excel against another package must first\nestablish which convention that package uses.\n\n`g1` is **bounded**, and by a tighter bound than [SKEW](FUNC.SKEW.md)'s:\n\n    |SKEW.P|  <=  (n - 2) / sqrt(n - 1)\n\nwith equality when one observation stands apart from `n-1` identical ones. A population of five\ncannot report a skewness beyond `1.5`, however lopsided it looks. Small-sample skewness is\nstructurally limited, not merely noisy.\n\n\n\n### Arguments\n\n\n| Argument | Meaning | Required |\n|---|---|---|\n| `number1` | The first value, range or array. | yes |\n| `number2`, … | Further values, ranges or arrays. | optional, up to the declared maximum |\n\nThe arguments form a flat bag: everything is flattened and concatenated, and the argument\nboundaries have no effect on the answer.\n\n`SKEW.P` is an **aggregate**, not a lift kernel, and it carries the dual coercion policy of\n[coercion and lifting](../model/02-coercion-and-lifting.md): values reached by scanning a range\nare used only if they are numbers, with text, logicals and blank cells skipped rather than\nconverted, while values passed directly as scalar arguments go through ordinary to-number\ncoercion. `SKEW.P(1,2,\"3\")` therefore admits `\"3\"` where the same text in a cell would be ignored.\n\n\n"
  },
  "signature": {
    "display": "SKEW.P(number1, [number2], ...)",
    "parameters": [
      {
        "description": null,
        "name": "number1",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "number2",
        "optional": true,
        "repeats": true
      }
    ],
    "trailing_repeats": true
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 255,
        "min": 1
      },
      "category": "Statistical functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "AggregateDirectAndRangeDualPolicy",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "None",
        "host_interaction_class": "None",
        "kernel_signature_class": "NumsToNum",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "RefOnly",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Population skewness",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Returns the skewness of a distribution based on a population: a characterization of the degree of asymmetry of a distribution around its mean",
        "microsoft_url": "https://support.microsoft.com/en-us/office/skew-p-function-76530a5c-99b9-48a1-8392-26632d542fcb"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "SKEW.P"
        },
        {
          "locale": "bg-BG",
          "name": "SKEW.P"
        },
        {
          "locale": "cs-CZ",
          "name": "SKEW.P"
        },
        {
          "locale": "da-DK",
          "name": "SKÆVHED.P"
        },
        {
          "locale": "de-DE",
          "name": "SKEW.P"
        },
        {
          "locale": "el-GR",
          "name": "SKEW.P"
        },
        {
          "locale": "en-AU",
          "name": "SKEW.P"
        },
        {
          "locale": "en-GB",
          "name": "SKEW.P"
        },
        {
          "locale": "en-US",
          "name": "SKEW.P"
        },
        {
          "locale": "es-ES",
          "name": "COEFICIENTE.ASIMETRIA.P"
        },
        {
          "locale": "et-EE",
          "name": "SKEW.P"
        },
        {
          "locale": "fi-FI",
          "name": "JAKAUMAN.VINOUS.POP"
        },
        {
          "locale": "fr-FR",
          "name": "COEFFICIENT.ASYMETRIE.P*"
        },
        {
          "locale": "he-IL",
          "name": "SKEW.P"
        },
        {
          "locale": "hr-HR",
          "name": "SKEW.P"
        },
        {
          "locale": "hu-HU",
          "name": "FERDESÉG.P"
        },
        {
          "locale": "id-ID",
          "name": "SKEW.P"
        },
        {
          "locale": "it-IT",
          "name": "SKEW.P"
        },
        {
          "locale": "ja-JP",
          "name": "SKEW.P"
        },
        {
          "locale": "ko-KR",
          "name": "SKEW.P"
        },
        {
          "locale": "lt-LT",
          "name": "SKEW.P"
        },
        {
          "locale": "lv-LV",
          "name": "SKEW.P"
        },
        {
          "locale": "nb-NO",
          "name": "SKEW.P"
        },
        {
          "locale": "nl-NL",
          "name": "SCHEEFHEID.P"
        },
        {
          "locale": "pl-PL",
          "name": "SKOŚNOŚĆ.P"
        },
        {
          "locale": "pt-BR",
          "name": "SKEW.P"
        },
        {
          "locale": "pt-PT",
          "name": "DISTORÇÃO.P"
        },
        {
          "locale": "ro-RO",
          "name": "SKEW.P"
        },
        {
          "locale": "ru-RU",
          "name": "СКОС.Г"
        },
        {
          "locale": "sk-SK",
          "name": "SKEW.P"
        },
        {
          "locale": "sl-SI",
          "name": "SKEW.P"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "SKEW.P"
        },
        {
          "locale": "sv-SE",
          "name": "SNEDHET.P"
        },
        {
          "locale": "th-TH",
          "name": "SKEW.P"
        },
        {
          "locale": "tr-TR",
          "name": "ÇARPIKLIK.P"
        },
        {
          "locale": "uk-UA",
          "name": "SKEW.P"
        },
        {
          "locale": "vi-VN",
          "name": "SKEW.P"
        },
        {
          "locale": "zh-CN",
          "name": "SKEW.P"
        },
        {
          "locale": "zh-HK",
          "name": "SKEW.P"
        },
        {
          "locale": "zh-TW",
          "name": "SKEW.P"
        }
      ],
      "signature": {
        "display": "SKEW.P(number1, [number2], ...)",
        "parameters": [
          {
            "description": null,
            "name": "number1",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "number2",
            "optional": true,
            "repeats": true
          }
        ],
        "trailing_repeats": true
      },
      "surface_name": "SKEW.P",
      "version_marker": null,
      "xlcall": {
        "code": "576",
        "symbol": "xlfSkew_p"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/skew-p-function-76530a5c-99b9-48a1-8392-26632d542fcb"
  },
  "try_it": {
    "formula": "=SKEW.P(1,2,\"3\")"
  },
  "url": "https://handbook.dnacalc.com/functions/SKEW.P.html",
  "variants": [],
  "versions": []
}