stats

Assorted statistical functions.

Descriptive statistics

boxcox(x, lmbda)

Box-Cox transformation of x.

boxcox1p(x, lmbda)

Box-Cox transformation of 1 + x.

boxcox_llf(lam, x)

Log-likelihood for maximum likelihood estimation of the Box-Cox parameters.

boxcox_mle(x[, lam0])

Maximum likelihood estimate of lambda in the Box-Cox transformation.

gmean(x[, weights])

Geometric mean of the values in the sequence x.

hmean(x)

Harmonic mean of the values in the sequence x.

inv_boxcox(y, lmbda)

Inverse with respect to x of boxcox(x, lmbda).

inv_boxcox1p(y, lmbda)

Inverse with respect to x of boxcox1p(x, lmbda).

inv_yeojohnson(x, lmbda)

Inverse Yeo-Johnson transformation.

mean(x[, weights])

Mean of the values in the sequence x.

pmean(x, p)

Power (or generalized) mean of the values in the sequence x.

std(x[, ddof])

Standard deviation of the values in the sequence x.

var(x[, ddof])

Variance of the values in the sequence x.

variation(x[, ddof])

The variation of x.

yeojohnson(x, lmbda)

Yeo-Johnson transformation of x.

yeojohnson_llf(lam, x)

The log-likelihood function for the Yeo-Johnson transformation.

yeojohnson_mle(x[, lam0])

Compute the maximum likelihood estimate of the Yeo-Johnson parameter.

Statistical tests

anova_oneway(*args)

One-way analysis of variance (ANOVA) test.

chisquare(observed, expected)

Pearson's chi-square test.

fisher_exact(table[, alternative])

Compute Fisher's exact test on the 2x2 table.

gtest(observed, expected)

G-test (likelihood-ratio test, maximum likelihood test).

odds_ratio(table[, kind, alternative])

Compute the odds ratio for a 2x2 contingency table.

pearsonr(x, y[, alternative])

Pearson's correlation coefficient.

pearsonr_ci(r, n, alpha[, alternative])

Confidence interval of Pearson's correlation coefficient.