Macaulay2 » Documentation
Packages » Probability » ProbabilityDistribution » continuousProbabilityDistribution » uniformDistribution
next | previous | forward | backward | up | index | toc

# uniformDistribution -- continuous uniform distribution

- Usage:
    `uniformDistribution(a, b)`
- Inputs:
  - a, a number,
  - b, a number, greater than a;
- Outputs:
  - a continuous probability distribution,

## Description

The continuous uniform distribution.

    i1 : X = uniformDistribution(3, 7)

    o1 = U(3,7)

    o1 : ContinuousProbabilityDistribution

    i2 : density_X 4

         1
    o2 = -
         4

    o2 : QQ

    i3 : probability_X 5

         1
    o3 = -
         2

    o3 : QQ

    i4 : quantile_X 0.6

    o4 = 5.4

    o4 : RR (of precision 53)

    i5 : random X

    o5 = 6.570847367387662

    o5 : RR (of precision 53)

With no arguments, the standard uniform distribution on [0, 1] is returned.

    i6 : uniformDistribution()

    o6 = U(0,1)

    o6 : ContinuousProbabilityDistribution

## Ways to use uniformDistribution:

- `uniformDistribution()`
- `uniformDistribution(Number,Number)`

## For the programmer

The object uniformDistribution is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Probability.m2:1087:0.