think-bayes
Version:
An algorithm framework of probability and statistics for browser and Node.js environment.
35 lines (18 loc) • 756 B
Markdown
# Pdf()
Represents a probability density function (PDF).
**:**
## .density(x)
Evaluates this pdf at x.
This method needs implement by children class, if not there is an <code>UnimplementedMethodException</code> would be throw when the method is called
**:**
| param | type | description |
|-------|--------|-------------|
| x | number | number |
**:** float probability density
## .makePmf(xs, name)
Makes a discrete version of this pdf, evaluated at xs.
**:**
| param | type | description |
|-------|-------------------------|-----------------------------------|
| xs | string | array | object | equally-spaced sequence of values |
**:** new pmf