1#ifndef GAUSSIANAPPROX_H
2#define GAUSSIANAPPROX_H
54 os << std::setprecision(4) << gs.
mu <<
" +- " << gs.
sigma <<
" (skew = " << std::setprecision(2) << gs.
skew <<
")";
56 os << std::setprecision(4) << gs.
mode <<
" + " << gs.
sigma_p <<
" - " << gs.
sigma_m <<
" (skew = " << std::setprecision(2) << gs.
skew <<
")";
77 std::vector<GaussianSummary> out;
78 for (
const auto& col : cols) {
82 col.second.std_unbiased,
87 std::fabs(col.second.b1_skew) < skew_abs_threshold
std::ostream & operator<<(std::ostream &os, const GaussianSummary &gs)
Streams a human-readable Gaussian summary.
std::vector< GaussianSummary > gaussian_fit(const ObsSamples &S, double skew_abs_threshold=0.2)
Builds Gaussian or split-Gaussian summaries for observable samples.
Statistical helpers for Monte Carlo observable samples.
std::vector< std::map< BinnedObservableId, double > > ObsSamples
std::map< BinnedObservableId, ColumnStats > summarize_columns_obs(const ObsSamples &S)
Computes per-observable summary statistics from Monte Carlo samples.
static std::string str(const IdOf< ObservableTag > &id)
Returns the string representation of an identifier.
Identifies an observable together with a numerical bin.
std::pair< double, double > p
double sigma_m
Left-side standard deviation for an asymmetric approximation.
double skew
Sample skewness estimator.
BinnedObservableId id
Binned observable identifier.
double mode
Estimated population mode.
bool symmetric
True when the distribution is treated as sufficiently symmetric.
double sigma_p
Right-side standard deviation for an asymmetric approximation.
double sigma
Symmetric population standard deviation.