# 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

- $\displaystyle \operatorname{uniform\_distribution}(a, b)$

  `uniform_distribution(a, b)`[Open in the solver](https://hilberon.com/?q=uniform_distribution%28a%2C%20b%29)
- $\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](https://hilberon.com/?q=probability%281%2F2%20%3C%20x%20%3C%203%2F2%2C%20distributed%28x%2C%20uniform_distribution%280%2C%202%29%29%29)

## Functions its examples use

- [probability](https://hilberon.com/library/probability)

  The probability that a condition holds for a variable with a distribution.
- [distributed](https://hilberon.com/library/distributed)

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

## Related functions

- [stationary_distribution](https://hilberon.com/library/stationary_distribution)

  The law a process settles into over time, when it has one.
- [weibull_distribution](https://hilberon.com/library/weibull_distribution)

  The lifetime of a unit whose chance of surviving to time x is e^(-(x/scale)^shape).
- [binomial_distribution](https://hilberon.com/library/binomial_distribution)

  The number of successes in n independent trials that each succeed with chance p.
- [poisson_distribution](https://hilberon.com/library/poisson_distribution)

  The number of events in a period when they come at an average rate lambda.
- [normal_distribution](https://hilberon.com/library/normal_distribution)

  The normal distribution with mean mu and standard deviation sigma.
- [exponential_distribution](https://hilberon.com/library/exponential_distribution)

  The waiting time for events that come at rate lambda.

---
Source: https://hilberon.com/library/uniform_distribution
