Uniform Distribution Calculator

Uniform Distribution Calculator

Use this calculator to determine the Probability Density Function (PDF), Cumulative Distribution Function (CDF), Mean, Variance, and Standard Deviation for a continuous uniform distribution.

Enter values and click a button to see results.

What is a Uniform Distribution?

In probability theory and statistics, a uniform distribution (also known as a rectangular distribution) is a type of probability distribution in which all outcomes are equally likely. This means that every interval of the same length on the distribution's support has an equal probability. It's a fundamental concept, especially for understanding random processes where there's no reason to prefer one outcome over another within a given range.

There are two main types: discrete uniform distribution (e.g., rolling a fair die) and continuous uniform distribution. This calculator specifically focuses on the continuous uniform distribution.

Parameters of the Continuous Uniform Distribution

A continuous uniform distribution is defined by two parameters:

  • a (Minimum Value): The smallest possible value of the random variable.
  • b (Maximum Value): The largest possible value of the random variable.

The random variable X is said to be uniformly distributed over the interval [a, b], denoted as X ~ U(a, b).

Key Properties and Formulas

1. Probability Density Function (PDF)

The PDF, denoted as f(x), describes the relative likelihood for a random variable to take on a given value. For a continuous uniform distribution:

f(x) = 1 / (b - a) for a ≤ x ≤ b

f(x) = 0 otherwise

This means that within the interval [a, b], the probability density is constant. Outside this interval, it's zero.

2. Cumulative Distribution Function (CDF)

The CDF, denoted as F(x), gives the probability that the random variable X will take a value less than or equal to x. It's the integral of the PDF.

  • If x < a: F(x) = 0
  • If a ≤ x ≤ b: F(x) = (x - a) / (b - a)
  • If x > b: F(x) = 1

The CDF essentially tells you the accumulated probability up to a certain point x.

3. Mean (Expected Value)

The mean, or expected value (E[X]), is the average value of the distribution. For a uniform distribution, it's simply the midpoint of the interval:

E[X] = (a + b) / 2

4. Variance

Variance (Var[X]) measures how far the numbers in a set are spread out from their average value. A higher variance indicates a wider spread.

Var[X] = (b - a)^2 / 12

5. Standard Deviation

The standard deviation (SD[X]) is the square root of the variance. It provides a more interpretable measure of spread in the same units as the data.

SD[X] = √((b - a)^2 / 12) = (b - a) / √12

Real-World Applications of Uniform Distribution

While seemingly simple, uniform distributions are crucial in many fields:

  • Random Number Generation: Most computer-generated random numbers are designed to follow a uniform distribution between 0 and 1.
  • Waiting Times: If the arrival of an event is completely unpredictable within a certain time frame, the waiting time might be uniformly distributed.
  • Simulation: Uniform distributions are often used as building blocks for more complex simulations, as other distributions can be generated from a uniform one.
  • Quality Control: If a machine is supposed to produce items of a certain dimension, and any deviation within a specific tolerance is equally likely, this could be modeled uniformly.

How to Use This Calculator

  1. Enter Minimum Value (a): Input the lower bound of your uniform distribution.
  2. Enter Maximum Value (b): Input the upper bound of your uniform distribution. Ensure 'b' is greater than 'a'.
  3. Enter Value for X (x): If you want to calculate the PDF or CDF for a specific point, enter that value here. This field is not needed for Mean, Variance, or Standard Deviation.
  4. Click a Button: Choose whether you want to calculate the PDF, CDF, Mean, Variance, or Standard Deviation.
  5. View Results: The calculated value will appear in the result area below the buttons.

This calculator provides a quick and accurate way to explore the properties of continuous uniform distributions, helping you understand their behavior and apply them in various statistical and practical scenarios.