Changeset 32983 in project


Ignore:
Timestamp:
12/15/15 23:12:27 (6 years ago)
Author:
Ivan Raikov
Message:

fixed unit tests of statistics

Location:
release/4/statistics/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/statistics/trunk/statistics.scm

    r25160 r32983  
    14981498             (ts (if (= 1 rs) 1 (/ (* rs (sqrt (- n 2))) (sqrt (- 1 (square rs))))))
    14991499             (p (t-significance ts (- n 2) #:tails ':both)))
    1500         (format #t "~%Spearman correlation coefficient ~f, p = ~f~%" rs p)
     1500        (format #t "~%Spearman correlation coefficient ~A, p = ~A~%" rs p)
    15011501        (values rs p))))
    15021502
  • release/4/statistics/trunk/tests/run.scm

    r21860 r32983  
    33(require-extension srfi-42)
    44(require-extension srfi-78)
     5(require-extension numbers)
    56(require-extension statistics)
    67
     
    264265
    265266(let-values (((s p) (spearman-rank-correlation '((4 5) (10 8) (3 6) (1 2) (9 10) (2 3) (6 9) (7 4) (8 7) (5 1)))))
    266             (check s (=> =5) 0.684848484848485)
    267             (check p (=> =5) 0.0288827975067328))
     267  (check s (=> =5) (/ 113 165))
     268  (check p (=> =5) 0.0288827975067328))
    268269
    269270;; -- tests of sample size estimates
Note: See TracChangeset for help on using the changeset viewer.