Handbook
Glossary
chi2 ( actual expected -- n )
Vocabulary
math
.
extras
Inputs
actual
a
sequence
expected
a
sequence
Outputs
n
a
real
Word description
Return the chi-squared metric between
actual
and
expected
observations.
Definition
USING:
kernel
math
sequences
;
IN:
math.extras
:
chi2
( actual expected -- n )
0
[
dup
0
>
[
[
-
sq
]
keep
/
+
]
[
2drop
]
if
]
2reduce
;