Statistics & Probability

Verified calculator with a transparent formula

Statistics & Probability

Discrete Uniform Distribution Calculator.

Calculates the probability of a specific outcome or a range of outcomes for a discrete uniform distribution, where each outcome is equally likely.

Results update live as you type.
ƒ

Your inputs

How it works

  1. 1

    Enter the minimum value a and maximum value b of the distribution.

  2. 2

    Enter the value x for which you want the probability.

  3. 3

    Check if x is between a and b inclusive.

  4. 4

    If yes, divide 1 by the number of outcomes (b - a + 1); otherwise the probability is 0.

(x >= a && x <= b) ? 1/(b - a + 1) : 0

Frequently asked questions

What is a discrete uniform distribution?

It's a distribution where each of the finite number of outcomes has an equal probability. For example, a fair die has outcomes 1 to 6 each with probability 1/6.

How do I calculate the probability of a range?

For a range from x1 to x2, the probability is (x2 - x1 + 1) / (b - a + 1) if the range is within [a, b]. This calculator gives the probability for a single value.

What if x is outside the range?

The probability is 0 because the outcome is impossible.

Explore this calculator category

Results

Formula checked

Probability P(X = x)

0

Ask Anything

Estimate for general guidance only — verify important decisions with an appropriate professional.

How it works

Calculates the probability of a specific outcome or a range of outcomes for a discrete uniform distribution, where each outcome is equally likely.

  1. Enter the minimum value a and maximum value b of the distribution.
  2. Enter the value x for which you want the probability.
  3. Check if x is between a and b inclusive.
  4. If yes, divide 1 by the number of outcomes (b - a + 1); otherwise the probability is 0.

Formulas

The math behind this calculator, written out so you can verify the result.

Probability mass function

P(X = x) = 1 / (b - a + 1) for a ≤ x ≤ b, else 0

Each outcome in the range from a to b is equally likely, so the probability of any specific value is one divided by the total number of outcomes.

Example:

Input: a = 1, b = 6, x = 3

Calculation: 1 / (6 - 1 + 1) = 1/6

Result: ≈ 0.1667

Real-world use cases

Where this calculation shows up in everyday life.

Fair dice rolls

Determine the probability of rolling a specific number on a fair die.

Example: P(roll a 4) = 1/6 ≈ 0.1667

Random selection

When picking a random integer from a set, find the chance of picking a particular one.

Example: From numbers 1 to 10, P(5) = 0.1

Quality control

If defects are uniformly distributed across a batch, estimate the probability of a specific defect location.

Example: Batch of 100 items, P(item 50 is defective) = 1/100 = 0.01

Tips and common mistakes

Tips

  • Ensure a ≤ b; otherwise the distribution is invalid.
  • The number of outcomes is b - a + 1, so the probability is 1 divided by that count.
  • For ranges, multiply the single-value probability by the number of values in the range.
  • Use this calculator for discrete integer outcomes only, not continuous values.

Common Mistakes to Avoid

  • Forgetting that the range is inclusive, so the count is b - a + 1, not b - a.
  • Using a probability greater than 1 when the range is small.
  • Assuming x must be an integer; it can be any number, but if it's not an integer, the probability is 0.

Assumptions and limitations

  • Use the stated inputs and units.
  • Results are estimates for planning and education.
  • Check measurements and source data before making an important decision.