| Crates.io | confi |
| lib.rs | confi |
| version | 0.1.4 |
| created_at | 2024-11-06 18:13:57.86344+00 |
| updated_at | 2024-12-13 15:09:26.103464+00 |
| description | confidence intervals and significance levels for statistical computation |
| homepage | |
| repository | https://github.com/cgubbin/confi |
| max_upload_size | |
| id | 1438658 |
| size | 25,176 |
A simple crate for dealing with confidence levels, significance levels and confidence intervals.
The significance level describes the evidence present in a sample under test which allows for rejection of the null hypothesis (the state when two outcomes or possibilities are the same). In a measurement model the null hypothesis under test is typically whether a given reading is indistinguishable from another, or whether it is indistinguishable from the system response at zero stimulus (the minimum detectable value).
use confi::SignificanceLevel;
let from_fraction = SignificanceLevel::fractional(0.1).unwrap();
let from_percentage = SignificanceLevel::percentage(10.0).unwrap();
assert_eq!(from_fraction, from_percentage);
The confidence level describes the probability of obtaining the same result in repeated data collection processes.
use confi::ConfidenceLevel;
let from_fraction = ConfidenceLevel::fractional(0.1).unwrap();
let from_percentage = ConfidenceLevel::percentage(10.0).unwrap();
assert_eq!(from_fraction, from_percentage);
A confidence interval is a range of results which can be deemed to contain a measured value to a given confidence level.
use confi::{ConfidenceLevel, ConfidenceInterval, Confidence};
let from_fraction = ConfidenceLevel::fractional(0.1).unwrap();
let interval = ConfidenceInterval::new(1.0..=3.0, from_fraction);
assert!(interval.contains(2.0));