tttrlib
A library for time-tagged time resolved data
Loading...
Searching...
No Matches
Functions
statistics Namespace Reference

Functions

double neyman (double *data, double *model, int start, int stop)
 
double poisson (double *data, double *model, int start, int stop)
 
double pearson (double *data, double *model, int start, int stop)
 
double gauss (double *data, double *model, int start, int stop)
 
double cnp (double *data, double *model, int start, int stop)
 
double sswr (double *data, double *model, double *data_noise, int start, int stop)
 Sum of squared weighted residuals.
 
double chi2_counting (std::vector< double > &data, std::vector< double > &model, std::vector< double > &weights, int x_min=-1, int x_max=-1, const char *type="neyman")
 Computes different chi2 measures for counting data.
 

Function Documentation

◆ chi2_counting()

double statistics::chi2_counting ( std::vector< double > & data,
std::vector< double > & model,
std::vector< double > & weights,
int x_min = -1,
int x_max = -1,
const char * type = "neyman" )

Computes different chi2 measures for counting data.

Reference: https://arxiv.org/pdf/1903.07185.pdf

Parameters
dataVector containing the data.
modelVector containing the model.
weightsVector containing the weights.
x_minMinimum index for computation.
x_maxMaximum index for computation.
typeType of chi2 measure (default is "neyman").
Returns
The computed chi2 value.

◆ cnp()

double statistics::cnp ( double * data,
double * model,
int start,
int stop )
inline

◆ gauss()

double statistics::gauss ( double * data,
double * model,
int start,
int stop )
inline

◆ neyman()

double statistics::neyman ( double * data,
double * model,
int start,
int stop )
inline

◆ pearson()

double statistics::pearson ( double * data,
double * model,
int start,
int stop )
inline

◆ poisson()

double statistics::poisson ( double * data,
double * model,
int start,
int stop )
inline

◆ sswr()

double statistics::sswr ( double * data,
double * model,
double * data_noise,
int start,
int stop )
inline

Sum of squared weighted residuals.