How to Use This Calculator
Step 1: Enter Your Parameters
- Lower Bound (a): The minimum value of your uniform distribution interval (e.g., 0 for a bus that arrives immediately)
- Upper Bound (b): The maximum value of your uniform distribution interval (e.g., 10 for a 10-minute waiting window)
- Interval Start (m): The starting point of the specific range you want to calculate probability for
- Interval End (n): The ending point of the specific range you want to calculate probability for
Step 2: Click "Calculate"
The calculator will instantly show you:
- P(m ≤ X ≤ n): The probability that X falls within your specified interval, displayed as both an integral and final value
- PDF Value f(x): The constant probability density across the [a, b] interval
- Statistical measures: mean (expected value), variance, and standard deviation
- Visual charts: PDF showing the rectangular distribution with your probability area shaded, and CDF showing the cumulative probability
Step 3: Export Your Results
Use the buttons below the results to:
- Save as PNG: Download charts and summary as an image for reports or presentations
- Save as PDF: Generate a complete report with all calculations and visualizations
- More Calculators: Explore other probability distribution calculators on our site
💡 Quick Tip: If your interval [m, n] extends outside the bounds [a, b], the calculator will automatically clamp the values to the valid range and show you a notice. If m > n, the values will be swapped automatically.
Understanding the Continuous Uniform Distribution
The Continuous Uniform Distribution, often called the Rectangular Distribution, is a probability distribution that describes an experiment where an outcome is equally likely to occur anywhere within a specified interval \([a, b]\). Because every outcome has the same probability, the graph of its probability density function (PDF) is a simple rectangle.
Key Formulas
- Probability Density Function (PDF): The height of the rectangle.
$$f(x) = \begin{cases} \frac{1}{b-a} & \text{for } a \le x \le b \\ 0 & \text{for } x < a \text{ or } x > b \end{cases}$$
- Cumulative Distribution Function (CDF): The probability that a random variable \(X\) is less than or equal to a value \(x\).
$$F(x) = \begin{cases} 0 & \text{for } x < a \\ \frac{x-a}{b-a} & \text{for } a \le x \le b \\ 1 & \text{for } x > b \end{cases}$$
- Mean / Expected Value: The midpoint of the interval.
\(E[X] = \frac{a+b}{2}\)
- Variance: A measure of the spread of the distribution.
\(Var(X) = \frac{(b-a)^2}{12}\)
Examples with Step-by-Step Answers
Example 1: Bus Waiting Time
Problem: A city bus arrives at a bus stop precisely every 20 minutes. If you arrive at the stop at a random moment, your waiting time is uniformly distributed. What is the probability you will wait between 5 and 12 minutes?
1. Identify the parameters:
- The interval is from 0 to 20 minutes, so \(a = 0\) and \(b = 20\).
- We want to find the probability for the sub-interval \(m=5\) to \(n=12\).
2. Calculate the PDF height: \(f(x) = \frac{1}{20-0} = \frac{1}{20} = 0.05\)
3. Calculate the probability: Probability is the area of the rectangle for the sub-interval. Area = height × width.
\(P(5 \le X \le 12) = f(x) \times (n - m) = 0.05 \times (12 - 5) = 0.05 \times 7 = 0.35\)
Answer: There is a 35% chance you will wait between 5 and 12 minutes for the bus.
Example 2: Random Number Generator
Problem: A computer's random number generator produces numbers that are uniformly distributed between 0 and 1. What is the probability that a generated number is greater than 0.8?
1. Identify the parameters:
- The interval is \([0, 1]\), so \(a = 0\) and \(b = 1\).
- We want to find \(P(X > 0.8)\), which is the same as \(P(0.8 \le X \le 1)\).
2. Calculate the PDF height: \(f(x) = \frac{1}{1-0} = 1\)
3. Calculate the probability:
\(P(0.8 \le X \le 1) = f(x) \times (1 - 0.8) = 1 \times 0.2 = 0.2\)
Answer: There is a 20% probability that the generated number will be greater than 0.8.