• incanter

1.2.3-SNAPSHOT

# pdf-t

## incanter.stats

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

Options:
:df (default 1)

See also:
cdf-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/Probability_density_function

Example:
(pdf-t 1.2 :df 10)

### 0 Examples top

Log in to add / edit an example.

### See Also top

Log in to add a see also.

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

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

Options:
:df (default 1)

See also:
cdf-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/Probability_density_function

Example:
(pdf-t 1.2 :df 10)
"
([x & options]
(let [opts (when options (apply assoc {} options))
df (or (:df opts) 1)
dist (StudentT. df (DoubleMersenneTwister.))]
(if (coll? x)
(map #(.pdf dist %) x)
(.pdf dist x)))))```
Vars in incanter.stats/pdf-t: coll? defn let map
Used in 0 other vars