Learn R Programming

boostmath (version 1.0.0)

uniform_distribution: Uniform Distribution Functions

Description

Functions to compute the probability density function, cumulative distribution function, and quantile function for the Uniform distribution.

Usage

uniform_pdf(x, lower = 0, upper = 1)

uniform_lpdf(x, lower = 0, upper = 1)

uniform_cdf(x, lower = 0, upper = 1)

uniform_lcdf(x, lower = 0, upper = 1)

uniform_quantile(p, lower = 0, upper = 1)

Value

A single numeric value with the computed probability density, log-probability density, cumulative distribution, log-cumulative distribution, or quantile depending on the function called.

Arguments

x

quantile

lower

lower bound of the distribution (default is 0)

upper

upper bound of the distribution (default is 1)

p

probability (0 <= p <= 1)

See Also

Boost Documentation for more details on the mathematical background.

Examples

Run this code
# Uniform distribution with lower = 0, upper = 1
uniform_pdf(0.5)
uniform_lpdf(0.5)
uniform_cdf(0.5)
uniform_lcdf(0.5)
uniform_quantile(0.5)

Run the code above in your browser using DataLab