Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Calculate Population Variance

statistics.population_variance

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

Overview

Calculate bounded exact-decimal population variance with an explicit denominator and audit trace. Observation order is preserved, null and non-decimal members are rejected, and no missing-value or business policy is inferred.

You receive the exact formula result, denominator, bounds, and trace fields needed to reproduce population variance.

Reliability

Exact BigDecimal accumulation uses a fixed 100-digit HALF_EVEN context. DECIMAL_INVALID means a malformed or over-limit decimal; correct that value. SERIES_INVALID means too few observations; add the required observations. LENGTH_MISMATCH means x and y counts differ; align the paired rows. ZERO_VARIANCE means Pearson correlation has a constant series; provide varying observations. ITEM_LIMIT_EXCEEDED means more than 10,000 observations; split them. This guidance applies specifically to statistics.population_variance.

Context footprint

One bounded request replaces repeated prompt arithmetic and returns its denominator trace. This guidance applies specifically to statistics.population_variance. A successful call costs 1 execution credit.

When to use it

Use when one decimal series needs population variance with denominator n.

When you want sample variance (n-1) or the standard deviation instead of population variance.

Scope

Note
Calculate bounded exact-decimal population variance with an explicit denominator and audit trace

Non-goals

  • Does not infer sampling, missing-value, weighting, unit, or materiality policy This guidance applies specifically to statistics.population_variance.
  • Does not accept binary floating point, null observations, files, or unbounded series This guidance applies specifically to statistics.population_variance.

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysismath

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input64 KB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
valuesarrayYesRequired 1 to 10,000 plain-decimal strings; sample variance requires at least 2.

Output schema

FieldTypeRequiredDescription
variancestringYesVariance under the declared n or n-1 denominator.
meanstringYesArithmetic mean used for centered differences.
countintegerYesNumber of observations.
denominatorstringYesExactly n for population or n-1 for sample.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"statistics.population_variance","input":{"values":["2","4","6"]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("statistics.population_variance", {"values":["2","4","6"]});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
DECIMAL_INVALID400NoThe request payload failed this skill's input validation.
SERIES_INVALID400NoThe request payload failed this skill's input validation.
ITEM_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not infer sampling, missing-value, weighting, unit, or materiality policy This guidance applies specifically to statistics.population_variance.
  • Does not accept binary floating point, null observations, files, or unbounded series This guidance applies specifically to statistics.population_variance.
  • Datasets requiring missing-value imputation or statistical inference
  • Inputs above 10,000 observations or requiring streaming This guidance applies specifically to statistics.population_variance.

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "statistics.population_variance",
  "input": {
    "values": [
      "2",
      "4",
      "6"
    ]
  }
}

Examples

Primary decimal series

Inputjson
{
  "values": [
    "2",
    "4",
    "6"
  ]
}
Expected outputjson
{
  "mean": "4",
  "denominator": "n",
  "count": 3,
  "variance": "2.666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667"
}

Signed or alternative denominator series

Inputjson
{
  "values": [
    "-1.5",
    "0",
    "1.5"
  ]
}
Expected outputjson
{
  "mean": "0",
  "denominator": "n",
  "count": 3,
  "variance": "1.5"
}
  • Auditable exact-decimal population variance
  • Bounded fund-accounting controls and reconciliations This guidance applies specifically to statistics.population_variance.

Avoid for

  • Datasets requiring missing-value imputation or statistical inference
  • Inputs above 10,000 observations or requiring streaming This guidance applies specifically to statistics.population_variance.

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

analysismath