How about Statistics Library ?
Hello
I know a simple and free c/c++ library for statistcal library.
you can download this at
Statistics Library by Sgt. Pepper
FYI, the content of header file is as following:
/* statistics interface -------------------------------------- */
/* return sum of values in datalist */
double sum(double *datalist, int listsize);
/* return pointer to an array containing
the min and max values in datalist */
double* min_max(double *datalist, int listsize);
/* return range of values in datalist */
double range(double *datalist, int listsize);
/* return arithmetic mean of values in datalist */
double a_mean(double *datalist, int listsize);
/* return geometric mean of values in datalist */
double g_mean(double *datalist, int listsize);
/* return the harmonic mean of values in datalist */
double h_mean(double *datalist, int listsize);
/* harmonic mean using log transformations */
double logt_hmean(double *datalist, int listsize);
/* Return Tukey's trimean of values in datalist */
double tukeys_trimean(double *datalist, int listsize);
/* Return a trimmed mean */
double trimmed_mean(double *datalist, int listsize, double P);
/* Return the arithmetic-geometric mean of 2 numbers */
double agm(double a, double b);
/* return midrange of values in datalist */
double midrange(double *datalist, int listsize);
/* return mode of values in datalist */
double mode(double *datalist, int listsize);
/* return median of values in datalist */
double median(double *datalist, int listsize);
/* return kth percentile of values in datalist */
double percentile(double *datalist, int listsize, double ptile);
/* return the quartiles of the values in datalist */
double* quartiles(double *datalist, int listsize);
/* return the interquartile range */
double interquartile_range(double *datalist, int listsize);
/* return the sample variance
of values in datalist */
double svar(double *datalist, int listsize);
/* return the population variance
of values in datalist */
double pvar(double *datalist, int listsize);
/* return sample standard deviation
of values in datalist */
double s_stdev(double *datalist, int listsize);
/* return the population standard deviation
of values in datalist */
double p_stdev(double *datalist, int listsize);
/* return the root mean square of values in datalist */
double rms(double *datalist, int listsize);
/* return the coefficient of variability
of the values in datalist */
double coeff_var(double *datalist, int listsize);
/* return the mean deviation of
values in datalist */
double mean_dev(double *datalist, int listsize);
/* return Kth central moment */
double central_moment(double *datalist, int listsize, double k);
/* return the standard error of the mean */
double std_err_mean(double *datalist, int listsize);
/* returns chi square of values in datalist */
double chi_square(double *datalist, int listsize);
/* return the skewness of the values in datalist */
double skewness1(double *datalist, int listsize);
/* return the skewness of the values in datalist */
double skewness2(double *datalist, int listsize);
/* return the kurtosis of the values in datalist */
double kurtosis1(double *datalist, int listsize);
/* return the kurtosis of the values in datalist */
double kurtosis2(double *datalist, int listsize);
/* return the Pierson product moment coefficient
of correlation of a set of x,y data */
double corr_coeff(double *xlist, double *ylist, int xn, int yn);
/* return the slope of the line of best fit
of a set of x,y data */
double slope_bf_line(double *xlist, double *ylist, int xn, int yn);
/* return the y-intercept of the line of
best fit of a set of x,y data */
double y_intercept(double *xlist, double *ylist, int xn, int yn);
/* return the standard deviation of the
points around the line of best fit
of a set of x,y data */
double stdev_points(double *xlist, double *ylist, int xn, int yn);
/* return the standard error of the
regression coefficient (slope) */
double stderr_reg_coeff(double *xlist, double *ylist, int xn, int yn);
/* Return the covariance of 2 data sets. */
double covariance(double *xlist, double *ylist, int xn, int yn);
/* return the Fisher transformation of x */
double fisher(double x);
/* return binomial probability */
double binom_prob(double p, double n, double x);
/* return the standardized random variable */
double stdx(double mean, double sdev, double x);
/* return the standardized random
variable for a large sample: n >= 30 */
double stdx_lg(double xbar,
double mu,
double sdev,
double n);
/* return the normal probability density of x */
double norm_pdf(double mean, double stdev, double x);
/* return the normal cumulative probability of x */
double norm_cdf(double mean, double stdev, double x);
/* return an approximation of the area under the
standard normal curve between X1 and X2. */
double std_ncurve_area(double X1, double X2);
/* Return the kth percentile of the std normal distribution */
double std_norm_ptile(double k);
/* Return the Anderson-Darling statistic */
double anderson_darling_norm(double *datalist, int listsize);
/* return a boolean value indicating whether the normal
distribution can be used to approximate the binomial */
int norm_approx_ok(double p, double n);
/* return a pointer to an array containing mean and
variance for a normal approximation to the
binomial distribution */
double* norm_approx_mv(double p, double n);
/* Return a z-score for a hypothesis test. */
double rndz(double EP, double op, double n);
/* Return log normal probability density at x.
mu=a_mean(ln(X)); sigma=s_stdev(ln(X)) */
double log_norm_pdf(double x, double mu, double sigma);
/* Return gamma(x) */
double gamma(double x);
/* Return the natural log of gamma(x) */
double log_gamma(double x);
/* Return beta(a, b) */
double beta(double a, double b);
/* Return standard beta dist p.d.f. */
double std_betapdf(double x, double a, double b);
/* Return beta dist p.d.f where A < x < B. */
double betapdf(double x, double a, double b, double A, double B);
/* Return area under beta curve in the interval [X1, X2] */
double beta_curve_area(double a, double b, double A,
double B, double X1, double X2);
/* Return probability density of the t-distribution */
double tdist(double t, double v);
/* Return t-distribution cumulative probability */
double tdist_cum(double X1, double X2, double v);
/* Return Student's t for 1 sample*/
double t_test1(double *datalist, int listsize, double mu);
/* Return Student's t for 2 samples */
double t_test2(double *X1, double *X2, double n1, double n2);
/* return t-test degrees of freedom */
int df(double n1, double n2);
/* return a pointer to an array containing the limits
of the 95% confidence interval around a sample mean */
double* confidence_95(double *datalist, int listsize);
/* return a pointer to an array containing the limits
of the 99% confidence interval around a sample mean */
double* confidence_99(double *datalist, int listsize);
/* misc utility -------------------------------------- */
/* qsort comparison function */
int compare(const void *a, const void *b);
/* return rth root of n */
double root(double n, double r);