pub struct ProbPlot { /* private fields */ }Expand description
A normal probability plot (Q-Q plot against the standard normal).
Mirrors the reference ProbPlot for the default standard-normal
distribution: the theoretical percentiles are the plotting positions
(i - a) / (n + 1 - 2a) for i = 1..=n, the theoretical quantiles are the
normal inverse-CDF of those percentiles, and the sample quantiles are simply
the sorted data.
Implementations§
Source§impl ProbPlot
impl ProbPlot
Sourcepub fn new(data: &[f64]) -> Self
pub fn new(data: &[f64]) -> Self
Build a probability plot from data, using plotting-position parameter
a = 0 (the reference default).
Sourcepub fn with_a(data: &[f64], a: f64) -> Self
pub fn with_a(data: &[f64], a: f64) -> Self
Build a probability plot with an explicit plotting-position parameter a.
Common choices: 0.0 (Weibull, the default), 0.375 (Blom),
0.5 (Hazen).
Sourcepub fn theoretical_percentiles(&self) -> Array1<f64>
pub fn theoretical_percentiles(&self) -> Array1<f64>
The theoretical plotting positions (percentiles in (0, 1)).
p_i = (i - a) / (n + 1 - 2a) for i = 1..=n.
Sourcepub fn theoretical_quantiles(&self) -> Array1<f64>
pub fn theoretical_quantiles(&self) -> Array1<f64>
The theoretical quantiles: the standard-normal inverse CDF of the plotting positions.
Sourcepub fn sample_quantiles(&self) -> Array1<f64>
pub fn sample_quantiles(&self) -> Array1<f64>
The sample quantiles: the sorted data.
Sourcepub fn qqline_regression(&self) -> QqLine
pub fn qqline_regression(&self) -> QqLine
The regression reference line (“r”): an ordinary least-squares fit of the sample quantiles on the theoretical quantiles (with intercept).
Sourcepub fn qqline_standardized(&self) -> QqLine
pub fn qqline_standardized(&self) -> QqLine
The standardized reference line (“s”): slope = sample standard deviation
(population, 1/n), intercept = sample mean.
Sourcepub fn qqline_quartile(&self) -> QqLine
pub fn qqline_quartile(&self) -> QqLine
The quartile reference line (“q”): the line through the first and third quartiles of the sample versus the theoretical normal quartiles.