• incanter

1.2.3-SNAPSHOT

# cdf-t

## incanter.stats

• (cdf-t x & options)
Returns the Student's t cdf for the given value of x. It will return a sequence
of values, if x is a sequence. Same as R's pt function.

Options:
:df (default 1)

pdf-t, quantile-t, and sample-t

References:
http://incanter.org/docs/parallelcolt/api/cern/jet/random/tdouble/StudentT.html
http://en.wikipedia.org/wiki/Student-t_distribution
http://en.wikipedia.org/wiki/Cumulative_distribution_function

Example:
(cdf-t 1.2 :df 10)

### Source incanter/stats.clj:761 top

```(defn cdf-t
" Returns the Student's t cdf for the given value of x. It will return a sequence
of values, if x is a sequence. Same as R's pt function.

Options:
:df (default 1)

pdf-t, quantile-t, and sample-t

References:
http://incanter.org/docs/parallelcolt/api/cern/jet/random/tdouble/StudentT.html
http://en.wikipedia.org/wiki/Student-t_distribution
http://en.wikipedia.org/wiki/Cumulative_distribution_function

Example:
(cdf-t 1.2 :df 10)
"
([x & options]
(let [opts (when options (apply assoc {} options))
df (or (:df opts) 1)
lower-tail? (if (false? (:lower-tail opts)) false true)
cdf-fx (if lower-tail?
(fn [x1] (Probability/studentT df x1))
(fn [x1] (- 1 (Probability/studentT df x1))))]
(if (coll? x)
(map cdf-fx x)
(cdf-fx x)))))```
Vars in incanter.stats/cdf-t: coll? defn let map
Used in 0 other vars