Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Mean (mean)

The average of a list of numbers, or the expected value of a distribution.

How to write it

mean(data)

The sum of the data divided by how many there are.

data
The numbers to average. Symbols are allowed. Takes a list.

mean(distribution)

The expected value of a distribution.

distribution
A distribution such as normal_distribution(mu, sigma). Takes an expression.

mean(process)

The expected value of a stochastic process at a time.

process
A process at a time, written construct(p, t), or p(t) for a stored process p. Takes an expression.

mean(process, t)

The same, with the time written beside the process.

process
A process such as geometric_brownian_motion_process(mu, sigma, x0). Takes an expression.
t
The time, a variable or a number. Takes an expression.

Examples

  • 2,4,4,4,5,5,7,9=5\displaystyle 2, 4, 4, 4, 5, 5, 7, 9 = 5
    mean([2, 4, 4, 4, 5, 5, 7, 9])

    In the solver, mean([2, 4, 4, 4, 5, 5, 7, 9]) gives 5.

    Open in the solver
  • a,b,c=a+b+c3\displaystyle a, b, c = \frac{a+b+c}{3}
    mean([a, b, c])

    In the solver, mean([a, b, c]) gives (a + b + c)/3.

    Open in the solver
  • E[X], X∼N(μ,σ)=μ\displaystyle E[X],\ X \sim \mathcal{N}(\mu, \sigma) = \mu
    mean(normal_distribution(mu, sigma))

    In the solver, mean(normal_distribution(mu, sigma)) gives mu.

    Open in the solver
  • E[X], X∼B(10,14)=52\displaystyle E[X],\ X \sim \mathrm{B}\left(10, \frac{1}{4}\right) = \frac{5}{2}
    mean(binomial_distribution(10, 1/4))

    In the solver, mean(binomial_distribution(10, 1/4)) gives 5/2.

    Open in the solver
  • construct⁡(GBM⁡(μ,σ,x0),t)=x0eμt\displaystyle \operatorname{construct}(\operatorname{GBM}(\mu, \sigma, x_{0}), t) = x_{0} e^{\mu t}
    mean(construct(geometric_brownian_motion_process(mu, sigma, x0), t))

    In the solver, mean(construct(geometric_brownian_motion_process(mu, sigma, x0), t)) gives x0*e^(mu*t).

    Open in the solver
  • E[Xt], X∼GBM⁡(μ,σ,x0)=x0eμt\displaystyle E[X_{t}],\ X \sim \operatorname{GBM}(\mu, \sigma, x_{0}) = x_{0} e^{\mu t}
    mean(geometric_brownian_motion_process(mu, sigma, x0), t)

    In the solver, mean(geometric_brownian_motion_process(mu, sigma, x0), t) gives x0*e^(mu*t).

    Open in the solver
  • E[Xt], X∼OU⁡(μ,σ,θ,x0)=x0−μetθ+μ\displaystyle E[X_{t}],\ X \sim \operatorname{OU}(\mu, \sigma, \theta, x_{0}) = \frac{x_{0}-\mu}{e^{t \theta}}+\mu
    mean(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t)

    In the solver, mean(ornstein_uhlenbeck_process(mu, sigma, theta, x0), t) gives e^(-t*theta)*(x0 - mu) + mu.

    Open in the solver

Functions its examples use

  • median

    The middle value of a list of numbers, or the mean of the two middle ones.

  • ito_process

    A process given by its drift and diffusion: dX = drift dt + diffusion dW.

  • mode

    The most frequent value of a list, or a list of them when several are equally frequent.

  • ito_integral

    The Itô integral of an expression of the Wiener value w and the time s, from 0 to t.

  • ito_formula_data

    The certified record behind ito_formula: its result, validity, certificate and theorem.

  • ito_formula

    Itô's lemma: the differential of an expression of states that follow an Itô process.