{"id":15168549,"url":"https://github.com/antononcube/raku-statistics-distributions","last_synced_at":"2026-01-20T08:09:00.609Z","repository":{"id":250731185,"uuid":"835028358","full_name":"antononcube/Raku-Statistics-Distributions","owner":"antononcube","description":"Raku package for statistical distributions and related random variates generations.","archived":false,"fork":false,"pushed_at":"2024-08-26T14:26:03.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T09:33:50.149Z","etag":null,"topics":["bernoulli-distribution","beta-distribution","binomial-distribution","chi-square-distribution","exponential-distribution","gamma-distribution","mixture-distributions","normal-distribution","probability","probability-distributions","raku","rakulang","statistics"],"latest_commit_sha":null,"homepage":"https://raku.land/zef:antononcube/Statistics::Distributions","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antononcube.png","metadata":{"files":{"readme":"README-work.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":"2024-07-29T02:33:49.000Z","updated_at":"2025-01-20T18:52:30.000Z","dependencies_parsed_at":"2024-07-29T20:38:45.354Z","dependency_job_id":"86e921c4-a9f5-483e-a469-1e9f1ec5ab6b","html_url":"https://github.com/antononcube/Raku-Statistics-Distributions","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"171e214122cdaa70c3f067672eb5573e44f00cdb"},"previous_names":["antononcube/raku-statistics-distributions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Statistics-Distributions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Statistics-Distributions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Statistics-Distributions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FRaku-Statistics-Distributions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antononcube","download_url":"https://codeload.github.com/antononcube/Raku-Statistics-Distributions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248059079,"owners_count":21040881,"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":["bernoulli-distribution","beta-distribution","binomial-distribution","chi-square-distribution","exponential-distribution","gamma-distribution","mixture-distributions","normal-distribution","probability","probability-distributions","raku","rakulang","statistics"],"created_at":"2024-09-27T06:22:21.473Z","updated_at":"2026-01-20T08:09:00.605Z","avatar_url":"https://github.com/antononcube.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Statistics::Distributions\n\nRaku package for statistical distributions and related random variates generations.\n\nThe distributions and random variate functions of the generations of \"Statistics::Distributions\"\nare automatically exported when [\"Data::Generators\"](https://raku.land/zef:antononcube/Data::Generators), [AAp1] is loaded.\n\n-----\n\n## Installation\n\nFrom Zef ecosystem:\n\n```\nzef install Statistics::Distributions\n```\n\nFrom GitHub:\n\n```\nzef install https://github.com/antononcube/Raku-Statistics-Distributions.git\n```\n\n\n------\n\n## Random reals\n\nThis module provides the function `random-real` that can be used to generate lists of real numbers\nusing the uniform distribution.\n\nHere is a random real:\n\n```perl6\nuse Statistics::Distributions;\nsay random-real(); \n```\n\nHere is a random real between 0 and 20:\n\n```perl6\nsay random-real(20); \n```\n\nHere are six random reals between -2 and 12:\n\n```perl6\nsay random-real([-2,12], 6);\n```\n\nHere is a 4-by-3 array of random reals between -3 and 3:\n\n```perl6\nsay random-real([-3,3], [4,3]);\n```\n\n\n**Remark:** The signature design follows Mathematica's function\n[`RandomReal`](https://reference.wolfram.com/language/ref/RandomVariate.html).\n\n\n------\n\n## Random variates\n\nThis module provides the function `random-variate` that can be used to generate lists of real numbers\nusing distribution specifications.\n\nHere are examples:\n\n```perl6\nsay random-variate(BernoulliDistribution.new(:p(0.3)), 1000).BagHash.Hash; \n```\n\n```perl6\nsay random-variate(BinomialDistribution.new(:n(10), :p(0.2)), 10); \n```\n\n```perl6\nsay random-variate(NormalDistribution.new( µ =\u003e 10, σ =\u003e 20), 5); \n```\n\n```perl6\nsay random-variate(UniformDistribution.new(:min(2), :max(60)), 5);\n```\n\n**Remark:** Only Normal distribution and Uniform distribution are implemented at this point.\n\n**Remark:** The signature design follows Mathematica's function\n[`RandomVariate`](https://reference.wolfram.com/language/ref/RandomVariate.html).\n\nHere is an example of 2D array generation:\n\n```perl6\nsay random-variate(NormalDistribution.new, [3,4]);\n```\n\n**Remark:** The Markdown document \n[\"Random-variate-generation-examples.md\"](https://github.com/antononcube/Raku-Statistics-Distributions/blob/main/docs/Random-variate-generation-examples.md),\nis a guide to generating random variates with the distributions of this package.\n\n---------\n\n## Quantile calculations with different methods \n\nThe sub `quantile` provided by the package can take parameters that cover 10 different methods commonly used in\nstatistics. (That is similar to [`Quantile`](https://reference.wolfram.com/language/ref/Quantile.html), [WRI1], of Wolfram Language.)\n\nFor example:\n\n\n```raku\nmy @values = 3.2, 1.5, 7.8, 4.1, 9.9, 2.3, 6.5, 0.8, 5.5, 8.7;\nquantile(@values, probs =\u003e (0.2, 0.4 ... 0.8), params =\u003e [[0,1],[0,1]])\n```\n\n---------\n\n## References\n\n[AAp1] Anton Antonov\n[Data::Generators Raku package](https://github.com/antononcube/Raku-Data-Generators),\n(2021-2024),\n[GitHub/antononcube](https://github.com/antononcube).\n\n[WRI1] Wolfram Research, \n[Quantile](https://reference.wolfram.com/language/ref/Quantile.html), Wolfram Language function, \n(2003), (updated 2024).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fraku-statistics-distributions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantononcube%2Fraku-statistics-distributions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fraku-statistics-distributions/lists"}