No matching definitions.

stats/test

src/stats/test.tur
defn

alt-two-sided

(alt-two-sided :)

alt-tag constant for two-sided tests.

Since: ST5

defn

alt-less

(alt-less :)

alt-tag constant for one-sided less tests.

Since: ST5

defn

alt-greater

(alt-greater :)

alt-tag constant for one-sided greater tests.

Since: ST5

defn

make-test-result

(make-test-result [name : cstr statistic : float df1 : float df2 : float p-value : float alt-tag : int estimate : float ci-low : float ci-high : float conf-level : float] :)

construct a test-result from components.

Since: ST5

defn

test-result-free

(test-result-free [r : int] :)

free a test-result.

Since: ST5

defn

test-result-name

(test-result-name [r : int] :)
defn

test-result-statistic

(test-result-statistic [r : int] :)
defn

test-result-df1

(test-result-df1 [r : int] :)
defn

test-result-df2

(test-result-df2 [r : int] :)
defn

test-result-p-value

(test-result-p-value [r : int] :)
defn

test-result-alt-tag

(test-result-alt-tag [r : int] :)
defn

test-result-estimate

(test-result-estimate [r : int] :)
defn

test-result-ci-low

(test-result-ci-low [r : int] :)
defn

test-result-ci-high

(test-result-ci-high [r : int] :)
defn

test-result-conf-level

(test-result-conf-level [r : int] :)
defn

t-test-1samp

(t-test-1samp [col : int mu : float alt-tag : int conf-level : float] :)

one-sample t-test: is mean(col) == mu?

col:int float64 column
mu:float hypothesized mean
alt-tag:int (alt-two-sided), (alt-less), or (alt-greater)
conf-level:float e.g. 0.95

:int test-result handle.

Since: ST5

defn

t-test-2samp

(t-test-2samp [a : int b : int pooled : int alt-tag : int conf-level : float] :)

two-sample t-test (Welch when pooled?=0).

a:int first column
b:int second column
pooled:int 0=Welch, 1=pooled
alt-tag:int
conf-level:float

:int test-result handle.

Since: ST5

defn

t-test-paired

(t-test-paired [a : int b : int alt-tag : int conf-level : float] :)

paired t-test.

a:int column of first observations
b:int column of second (same length as a)
alt-tag:int
conf-level:float

:int test-result handle.

Since: ST5

defn

var-test

(var-test [a : int b : int alt-tag : int conf-level : float] :)

F-test for equality of variances.

a b alt-tag conf-level

:int test-result with statistic=F, df1=na-1, df2=nb-1.

Since: ST5

defn

cor-test

(cor-test [a : int b : int alt-tag : int conf-level : float] :)

Pearson correlation test.

a b alt-tag conf-level

:int test-result with estimate=r, statistic=t.

Since: ST5

defn

anova-oneway

(anova-oneway [cols : int] :)

one-way ANOVA on a list of group columns.

colscons list of :int (float64 columns, one per group)

:int test-result with statistic=F, df1=k-1, df2=N-k.

Since: ST6

defn

chi2-gof

(chi2-gof [observed : int expected : int] :)

chi-squared goodness-of-fit test.

observed:int column of observed counts
expected:int column of expected counts (same length)

:int test-result with statistic=chi^2, df=k-1.

Since: ST6

defn

chi2-contingency

(chi2-contingency [f : int] :)

chi-squared test of independence on a contingency frame.

f:int frame where each column is one category and each row is
another; cell values are counts (float64).

:int test-result.

Since: ST6

defn

mann-whitney

(mann-whitney [a : int b : int alt-tag : int] :)

Mann-Whitney U rank-sum test.

a b alt-tag

:int test-result with statistic=U.

Since: ST6

defn

wilcoxon-signed-rank

(wilcoxon-signed-rank [a : int b : int alt-tag : int] :)

Wilcoxon signed-rank test on paired observations.

a b alt-tag

:int test-result with statistic=W.

Since: ST6

defn

ks-test-1samp

(ks-test-1samp [col : int d-dist : int alt-tag : int] :)

one-sample Kolmogorov-Smirnov test against a continuous distribution.

col:int float64 column
d-dist:int distribution handle (from stats/dist)
alt-tag:int

:int test-result with statistic=D.

Since: ST6

defn

ks-test-2samp

(ks-test-2samp [a : int b : int alt-tag : int] :)

two-sample Kolmogorov-Smirnov test.

a b alt-tag

:int test-result with statistic=D.

Since: ST6

Internal definitions
int->float-- cast an integer to float (int64_t -> double).
sqrt-- square root (delegates to C sqrt).
nan-- return a float NaN value.
__tr-alloc
__p-t-two
__p-t-sided
__p-chi2-sided