Uniform Distribution Probability Calculator
Results:
Probability P(x1 ≤ X ≤ x2):
Mean (Expected Value):
Variance:
Standard Deviation:
Understanding the Uniform Distribution
The uniform distribution, also known as the rectangular distribution, is a type of probability distribution where all outcomes are equally likely over a defined interval. This means that for any two intervals of the same length within the distribution's range, the probability of an outcome falling into either interval is the same.
Key Characteristics
- Parameters: A continuous uniform distribution is defined by two parameters: 'a' (the minimum value) and 'b' (the maximum value) of the interval.
- Probability Density Function (PDF): The PDF is constant over the interval [a, b] and zero elsewhere. Specifically, f(x) = 1 / (b – a) for a ≤ x ≤ b.
- Equal Probability: Every value within the interval [a, b] has an equal chance of occurring.
Formulas Used in This Calculator
For a random variable X following a uniform distribution U(a, b):
- Probability P(x1 ≤ X ≤ x2): This is calculated as (x2 – x1) / (b – a), provided that a ≤ x1 ≤ x2 ≤ b. If x1 or x2 fall outside the [a, b] range, the calculator intelligently adjusts them to the boundaries of the distribution to find the probability within the valid range. For example, if x1 is less than 'a', 'a' is used as the effective lower bound. If x2 is greater than 'b', 'b' is used as the effective upper bound.
- Mean (Expected Value): E(X) = (a + b) / 2. This is simply the midpoint of the interval.
- Variance: Var(X) = (b – a)2 / 12. This measures the spread of the distribution.
- Standard Deviation: σ(X) = √Var(X). This is the square root of the variance.
Practical Applications
Uniform distributions are often used in various fields:
- Random Number Generation: Many computer programs generate random numbers that are uniformly distributed between 0 and 1.
- Waiting Times: If a bus arrives every 10 minutes, and you arrive at the stop at a random time, your waiting time might be uniformly distributed between 0 and 10 minutes.
- Simulation: Used as a building block for more complex simulations, where initial conditions or parameters are assumed to be uniformly distributed.
How to Use This Calculator
- Minimum Value (a): Enter the lowest possible value for your uniform distribution.
- Maximum Value (b): Enter the highest possible value for your uniform distribution. Ensure this is greater than 'a'.
- Lower Bound for Probability (x1): Enter the lower limit of the specific range for which you want to calculate the probability.
- Upper Bound for Probability (x2): Enter the upper limit of the specific range for which you want to calculate the probability.
- Click "Calculate Probability" to see the probability P(x1 ≤ X ≤ x2), along with the mean, variance, and standard deviation of the distribution.
Example Scenario
Imagine a random number generator that produces numbers uniformly distributed between 0 and 10. You want to find the probability that a generated number falls between 2 and 7.
- Minimum Value (a): 0
- Maximum Value (b): 10
- Lower Bound for Probability (x1): 2
- Upper Bound for Probability (x2): 7
Using the calculator with these values, you would find:
- Probability P(2 ≤ X ≤ 7): (7 – 2) / (10 – 0) = 5 / 10 = 0.5
- Mean: (0 + 10) / 2 = 5
- Variance: (10 – 0)2 / 12 = 100 / 12 ≈ 8.3333
- Standard Deviation: √8.3333 ≈ 2.8868
This calculator provides a quick and accurate way to perform these calculations for any uniform distribution.