Skip to content

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

Léela en español

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

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

uniform_distribution function

The continuous distribution that is equally likely anywhere between a and b.

How to write it

uniform_distribution(a, b)

a
The lower end. Takes an expression.
b
The upper end, above a. Takes an expression.

Examples

  • uniform_distribution⁡(a,b)\displaystyle \operatorname{uniform\_distribution}(a, b)
    uniform_distribution(a, b)Open in the solver
  • P(12<x<32), x∼U(0,2)=12\displaystyle P\left(\frac{1}{2} < x < \frac{3}{2}\right),\ x \sim \mathrm{U}(0, 2) = \frac{1}{2}
    probability(1/2 < x < 3/2, distributed(x, uniform_distribution(0, 2)))

    In the solver, probability(1/2 < x < 3/2, distributed(x, uniform_distribution(0, 2))) gives 1/2.

    Open in the solver

Functions its examples use

  • probability

    The probability that a condition holds for a variable with a distribution.

  • distributed

    A variable and the distribution it follows, as probability and expectation read it.