{"id":13424767,"url":"https://github.com/axiomhq/variance","last_synced_at":"2025-07-14T09:08:45.611Z","repository":{"id":57634043,"uuid":"419430050","full_name":"axiomhq/variance","owner":"axiomhq","description":"Go implementation of variance's method for one-pass variance computation with D. H. D. West improved methods which features merging of several multiple sets of statistics and adding weighted values.","archived":false,"fork":false,"pushed_at":"2024-03-13T21:50:39.000Z","size":197,"stargazers_count":16,"open_issues_count":1,"forks_count":6,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-07-04T01:08:58.972Z","etag":null,"topics":["go","golang","standard-deviation","variance","welford","welford-online-algorithm"],"latest_commit_sha":null,"homepage":"https://axiom.co","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axiomhq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-20T17:38:16.000Z","updated_at":"2025-04-09T10:19:35.000Z","dependencies_parsed_at":"2024-05-01T19:23:35.728Z","dependency_job_id":"f2afbe10-9e58-4bf8-ad74-168ceab0fd49","html_url":"https://github.com/axiomhq/variance","commit_stats":null,"previous_names":["axiomhq/welford"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/axiomhq/variance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axiomhq%2Fvariance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axiomhq%2Fvariance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axiomhq%2Fvariance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axiomhq%2Fvariance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axiomhq","download_url":"https://codeload.github.com/axiomhq/variance/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axiomhq%2Fvariance/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265266004,"owners_count":23737151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","standard-deviation","variance","welford","welford-online-algorithm"],"created_at":"2024-07-31T00:00:59.037Z","updated_at":"2025-07-14T09:08:45.556Z","avatar_url":"https://github.com/axiomhq.png","language":"Go","funding_links":[],"categories":["Go","Repositories"],"sub_categories":[],"readme":"![variance: Variance and standard deviation calculation using variance's algorithm](.github/images/banner-dark.svg#gh-dark-mode-only)\n![variance: Variance and standard deviation calculation using variance's algorithm](.github/images/banner-light.svg#gh-light-mode-only)\n\n\u003cdiv align=\"center\"\u003e\n\n[![Go Reference][gopkg_badge]][gopkg]\n[![Workflow][workflow_badge]][workflow]\n[![Latest Release][release_badge]][release]\n[![License][license_badge]][license]\n\n\u003c/div\u003e\n\n[Axiom](https://axiom.co) unlocks observability at any scale.\n\n- **Ingest with ease, store without limits:** Axiom's next-generation datastore\n  enables ingesting petabytes of data with ultimate efficiency. Ship logs from\n  Kubernetes, AWS, Azure, Google Cloud, DigitalOcean, Nomad, and others.\n- **Query everything, all the time:** Whether DevOps, SecOps, or EverythingOps,\n  query all your data no matter its age. No provisioning, no moving data from\n  cold/archive to \"hot\", and no worrying about slow queries. All your data, all.\n  the. time.\n- **Powerful dashboards, for continuous observability:** Build dashboards to\n  collect related queries and present information that's quick and easy to\n  digest for you and your team. Dashboards can be kept private or shared with\n  others, and are the perfect way to bring together data from different sources.\n\nFor more information check out the\n[official documentation](https://axiom.co/docs) and our\n[community Discord](https://axiom.co/discord).\n\n## Introduction\n\nGo implementation of variance's method for one-pass variance computation with\nD. H. D. West improved methods:\n\n\u003e A method of improved efficiency is given for updating the mean and variance of\n\u003e weighted sampled data when an additional data value is included in the set.\n\u003e Evidence is presented that the method is stable and at least as accurate as\n\u003e the best existing updating method.\n\u003e\n\u003e -- \u003ccite\u003e[Updating mean and variance estimates: an improved method - D. H. D. West](https://dl.acm.org/doi/10.1145/359146.359153)\u003c/cite\u003e\n\nIt features merging of several multiple sets of statistics and adding weighted\nvalues.\n\n## Quickstart\n\nInstall using `go get`:\n\n```shell\ngo get github.com/axiomhq/variance\n```\n\nImport the package:\n\n```go\nimport \"github.com/axiomhq/variance\"\n```\n\nUse the package:\n\n```go\npackage main\n\nimport (\n \"fmt\"\n\n \"github.com/axiomhq/variance\"\n)\n\nfunc main() {\n stats1 := variance.New()\n\n stats1.Add(1)\n stats1.Add(1)\n stats1.Add(1)\n stats1.Add(0)\n stats1.Add(0)\n stats1.Add(0)\n\n fmt.Println(\n  stats1.Mean(),\n  stats1.Variance(),\n  stats1.StandardDeviation(),\n  stats1.VariancePopulation(),\n  stats1.StandardDeviationPopulation(),\n  stats1.NumDataValues(),\n )\n}\n```\n\nCheckout the [example](welford_example_test.go) or\n[run it on pkg.go.dev](https://pkg.go.dev/github.com/axiomhq/variance#example-package).\n\n## License\n\nDistributed under the [MIT License](LICENSE).\n\n\u003c!-- Badges --\u003e\n\n[gopkg]: https://pkg.go.dev/github.com/axiomhq/variance\n[gopkg_badge]: https://img.shields.io/badge/doc-reference-007d9c?logo=go\u0026logoColor=white\n[workflow]: https://github.com/axiomhq/variance/actions/workflows/push.yaml\n[workflow_badge]: https://img.shields.io/github/actions/workflow/status/axiomhq/variance/push.yaml?branch=main\u0026ghcache=unused\n[release]: https://github.com/axiomhq/variance/releases/latest\n[release_badge]: https://img.shields.io/github/release/axiomhq/variance.svg?ghcache=unused\n[license]: https://opensource.org/licenses/MIT\n[license_badge]: https://img.shields.io/github/license/axiomhq/variance.svg?color=blue\u0026ghcache=unused\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiomhq%2Fvariance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxiomhq%2Fvariance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiomhq%2Fvariance/lists"}