Skip to content
此计算器目前以英文显示,翻译正在准备中。

统计与概率

已验证计算器,公式透明

统计与概率

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.

结果随输入实时更新。
ƒ

您的输入

工作原理

  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

常见问题

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.

浏览此计算器类别

结果

公式已检查

Probability P(X = x)

0.167

询问任何问题

估算仅供参考——重要决策请咨询专业人士。

工作原理

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.

公式

此计算器背后的数学公式,供您核对结果。

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

实际应用场景

此计算在日常生活中的应用。

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

  • 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.

假设与限制

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