{"id":15703611,"url":"https://github.com/redzic/statistics","last_synced_at":"2025-03-30T14:46:12.228Z","repository":{"id":115743831,"uuid":"233530766","full_name":"redzic/statistics","owner":"redzic","description":"Statistical library written in Rust","archived":false,"fork":false,"pushed_at":"2020-02-09T14:07:30.000Z","size":115,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T16:37:02.198Z","etag":null,"topics":["statistics"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redzic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2020-01-13T06:53:32.000Z","updated_at":"2021-04-16T15:48:13.000Z","dependencies_parsed_at":"2023-07-03T10:46:49.815Z","dependency_job_id":null,"html_url":"https://github.com/redzic/statistics","commit_stats":{"total_commits":63,"total_committers":1,"mean_commits":63.0,"dds":0.0,"last_synced_commit":"f06900b81e815a7a0b803763456a327c4cbe5bbd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redzic%2Fstatistics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redzic%2Fstatistics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redzic%2Fstatistics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redzic%2Fstatistics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redzic","download_url":"https://codeload.github.com/redzic/statistics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246334347,"owners_count":20760639,"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":["statistics"],"created_at":"2024-10-03T20:03:40.557Z","updated_at":"2025-03-30T14:46:12.211Z","avatar_url":"https://github.com/redzic.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Statistics\n\nStatistical library written in Rust.\n\n## Examples\n\nCompute various statistical measures of a data set.\n\n```rust\nuse statistics::*;\n\nlet dist = Normal::new(0.0, 1.0);\nassert_eq!(dist.cdf(0.0), 0.5);\nassert_eq!(dist.cdf(1.96), 0.9750021048517796);\n\nlet data = vec![0.0, 1.0, 2.5, 5.3, 0.2, -4.2];\n\nprintln!(\"{}\", data.mean());\nprintln!(\"{}\", data.median());\nprintln!(\"{}\", data.variance());\nprintln!(\"{}\", data.stdev());\nprintln!(\"{}\", data.min());\nprintln!(\"{}\", data.max());\n```\n\nPrint an approximation of the inverse t-distribution table. Right now, it is more accurate for small `df` values.\n\n```rust\nuse statistics::*;\n\nfn main() {\n    let values = [0.9, 0.95, 0.975, 0.99, 0.995, 0.999, 0.9995];\n\n    println!(\"Inverse t-distribution table\");\n\n    print!(\"df↓ / P→\\t\");\n    for i in values.iter() {\n        print!(\"{}\\t\\t\", i);\n    }\n\n    const N: i32 = 120;\n\n    println!();\n\n    for i in 1..=N {\n        print!(\n            \"{: \u003e#width$}\\t\\t\",\n            i,\n            width = (N as f64).log(10.0).floor() as usize + 1\n        );\n        let dist = T::new(i);\n        for j in values.iter() {\n            print!(\"{:.3}\\t\\t\", dist.ppf(*j));\n        }\n        println!();\n    }\n\n    let dist = Normal::new(0.0, 1.0);\n    print!(\n        \"{: \u003e#width$}\\t\\t\",\n        \"∞\",\n        width = (N as f64).log(10.0).floor() as usize + 1\n    );\n\n    for i in values.iter() {\n        print!(\"{:.3}\\t\\t\", dist.ppf(*i));\n    }\n\n    println!();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredzic%2Fstatistics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredzic%2Fstatistics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredzic%2Fstatistics/lists"}