; The probability that the sum of the squares of k independent random normal deviates is less than x is F(x; k). (define t (let ((sc 1000)) (let ((F ((fileVal "Chi2") 'F))(sg ((fileVal "RND") "murlcrt"))) (lambda (x k) (let ((sv (let w ((n sc) (s 0)) (if (zero? n) s (w (- n 1) (+ s (if (< (let r ((n k)) (if (zero? n) 0 (let ((w (sg))) (+ (* w w) (r (- n 1)))))) x) 1 0))))))) (list sv (* sc (F x k)))))))) (t 2.31 2) => (684 684.9424630965867) (t 2.31 5) => (181 195.2029710744003) (t 7.4 5) => (788 807.4495669205999) (t 9.1 4) => (952 941.352015669624)