{"id":36911998,"url":"https://github.com/alcortesm/sample","last_synced_at":"2026-01-12T15:59:43.047Z","repository":{"id":57483943,"uuid":"48610451","full_name":"alcortesm/sample","owner":"alcortesm","description":"Utility functions for statistical population samples.","archived":false,"fork":false,"pushed_at":"2018-08-24T14:34:52.000Z","size":41,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T08:04:41.087Z","etag":null,"topics":["confidence-interval","confidence-intervals","statistics"],"latest_commit_sha":null,"homepage":"","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/alcortesm.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}},"created_at":"2015-12-26T12:50:05.000Z","updated_at":"2023-11-07T10:28:18.000Z","dependencies_parsed_at":"2022-08-28T17:01:23.410Z","dependency_job_id":null,"html_url":"https://github.com/alcortesm/sample","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/alcortesm/sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcortesm%2Fsample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcortesm%2Fsample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcortesm%2Fsample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcortesm%2Fsample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alcortesm","download_url":"https://codeload.github.com/alcortesm/sample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alcortesm%2Fsample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T15:50:39.657Z","status":"ssl_error","status_checked_at":"2026-01-12T15:49:49.297Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["confidence-interval","confidence-intervals","statistics"],"created_at":"2026-01-12T15:59:38.599Z","updated_at":"2026-01-12T15:59:43.037Z","avatar_url":"https://github.com/alcortesm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/alcortesm/sample?status.svg)](https://godoc.org/github.com/alcortesm/sample)\n[![Build Status](https://travis-ci.org/alcortesm/sample.png)](https://travis-ci.org/alcortesm/sample)\n[![codecov.io](https://codecov.io/github/alcortesm/sample/coverage.svg?branch=master)](https://codecov.io/github/alcortesm/sample?branch=master)\n\n# Sample\n\nSample is a Go package to calculate useful values from samples of statistical\npopulations, including:\n\n- the sample mean\n\n- the sample-based unbiased estimation of the standard deviation of the\n  population\n\n- the standard error of the mean\n\n- the confidence intervals of the mean, assuming the samples comes from a Normal\n  distribution of unknown variance\n\nThe standard Go float64 type is used in all computations.\n\nThis package does *not* take advantage of multicore architectures.\n\n## Import\n\n```\nimport \"github.com/alcortesm/sample\"\n```\n\n## Examples\n\n```Go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/alcortesm/sample\"\n)\n\nfunc main() {\n\tdata := []float64{1.1, 0.9, 1.1, 1.3, 1.0}\n\n\t// ignoring errors for demonstration purposes\n\tmean, _ := sample.Mean(data)\n\tfmt.Println(mean) // 1.08\n\n\tsd, _ := sample.StandardDeviation(data)\n\tfmt.Println(sd) // 0.15\n\n\tse, _ := sample.StandardError(data)\n\tfmt.Println(se) // 0.07\n\n\tconfidence := 0.95\n\tci, _ := sample.MeanConfidenceIntervals(data, confidence)\n\tfmt.Printf(\"[%1.2f, %1.2f]\\n\", ci[0], ci[1]) // [0.90, 1.26]\n}\n```\n\n## Author\n\n- Alberto Cortés \u003calcortesm@gmail.com\u003e.\n\n## License\n\nThis project is licensed under the MIT License - see the\n[LICENSE](LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falcortesm%2Fsample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falcortesm%2Fsample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falcortesm%2Fsample/lists"}