Learn R Programming

algebraic.dist (version 0.9.1)

mean.univariate_dist: Method for obtaining the mean of univariate_dist object x.

Description

Method for obtaining the mean of univariate_dist object x.

Usage

# S3 method for univariate_dist
mean(x, ...)

Value

Numeric scalar; the mean of the distribution.

Arguments

x

The distribution object.

...

Additional arguments to pass into expectation.

Examples

Run this code
mean(normal(5, 2))    # 5
mean(exponential(2))  # 0.5

Run the code above in your browser using DataLab