Tutorials › VEE Mathematical Statistics › Discrete Uniform Distributions on Consecutive Integers

VEE Mathematical Statistics · Hypergeometric and Discrete Uniform Models · Tutorial 138 of 880

Discrete Uniform Distributions on Consecutive Integers

Learn to identify the inclusive integer endpoints, count the support, and find the probability assigned to any individual outcome.

Intermediate 9 min read

What You'll Learn

  • Identify the integer endpoints of a consecutive discrete uniform support.
  • Calculate the number of support values using the inclusive-endpoint rule.
  • Write the probability mass function for a discrete uniform variable.
  • Find the probability of a specified supported or unsupported value.
  • Recognize when integer bounds do not themselves give the support endpoints.

What Makes a Discrete Uniform Distribution?

A discrete uniform model assigns the same probability to every value in a finite support. When the possible values are consecutive integers, the support has an especially useful parameterization: its first integer is \(a\), and its last integer is \(b\). Both endpoints are included. The number of possible values is therefore one more than the difference between the endpoints.

This inclusive count matters in applications. If a device can display any whole-number setting from 4 through 11, the possible settings are \(4,5,6,7,8,9,10,11\), which is eight values—not seven. Since a discrete uniform model gives equal probability to each possible value, this count determines the probability at every point.

Definition: A random variable \(X\) has a discrete uniform distribution on the consecutive integers from \(a\) to \(b\) if \(a\) and \(b\) are integers, \(a\leq b\), and each integer in the set \(\{a,a+1,\ldots,b\}\) is equally likely. The support size is \(n=b-a+1\), and the probability mass function is
$$ P(X=k)= \begin{cases} \dfrac{1}{b-a+1}, & k\in\{a,a+1,\ldots,b\},\\[6pt] 0, & \text{otherwise}. \end{cases} $$

The word consecutive means there are no gaps between the integer values in the support. The word uniform means every supported value has the same probability. Thus, to use this model, the assumptions are that the possible values are exactly the stated consecutive integers and that the mechanism makes each of those values equally likely. Merely knowing that a variable is integer-valued does not establish either assumption.

Counting the Support and Writing the PMF

For endpoints \(a\) and \(b\), the support is the complete list of integers beginning at \(a\) and increasing by one until \(b\). The endpoint difference \(b-a\) counts the unit gaps between the endpoints. There is one more integer value than there are gaps, so the support size is \(b-a+1\).

Once the support size is known, the probability of each supported value is its reciprocal. A value outside the support has probability zero. In particular, the endpoints themselves are ordinary supported outcomes: \(P(X=a)=P(X=b)=1/(b-a+1)\).

Derivation: Suppose the common probability at each supported integer is \(c\). There are \(b-a+1\) supported values, and the probabilities over the whole support must add to one. Therefore
$$ \underbrace{c+c+\cdots+c}_{b-a+1\text{ terms}}=1, \qquad (b-a+1)c=1, \qquad c=\frac{1}{b-a+1}. $$
This proves the stated point probability. It also checks that the formula is a valid probability mass function: it is nonnegative, and its total probability over the support is one.

A reliable parameterization records the endpoints before calculating the probability. If a problem describes integer values lying between real-number bounds, first identify which integers actually satisfy those bounds. For example, an integer constrained to be at least 2.4 and at most 10.8 can take values from 3 through 10. The real bounds are not themselves the support endpoints.

Worked Examples

Worked Example: Equal Chances for Whole-Number Settings

A hypothetical calibration device selects one whole-number setting from 4 through 11, with each setting equally likely. Let \(X\) be the selected setting. Find the support size, write the probability mass function, and calculate \(P(X=9)\).

Method. Identify the inclusive integer endpoints, count the support, and use the reciprocal of that count for a supported point.

Step 1: State the support. The minimum is \(a=4\) and the maximum is \(b=11\). Thus,

$$ \{4,5,6,7,8,9,10,11\}. $$

Step 2: Count its values.

$$ n=b-a+1=11-4+1=8. $$

Step 3: Write the PMF. Every supported setting has probability \(1/8\), and all other values have probability zero:

$$ P(X=k)= \begin{cases} 1/8, & k\in\{4,5,6,7,8,9,10,11\},\\ 0, & \text{otherwise}. \end{cases} $$

Step 4: Find the requested point probability. Since 9 is in the support, \(P(X=9)=1/8=0.1250\), to four decimal places.

Check. Eight supported settings each have probability \(1/8\), so their total probability is \(8(1/8)=1\). The common mistake is to use \(11-4=7\) as the number of settings; that counts the gaps and misses the additional endpoint value.

Worked Example: Integer Values Within Noninteger Bounds

A hypothetical rating rule allows a whole-number score \(X\) from 2.4 through 10.8, inclusive. Assume each whole-number score satisfying the rule is equally likely. Determine the actual support, its size, the PMF, and \(P(X=10)\).

Method. Convert the inclusive bounds into the smallest and largest allowable integers before applying the discrete uniform formula.

Step 1: Find the first allowable integer. The integer 2 is below 2.4, while 3 is at least 2.4. Thus the smallest allowable score is \(a=3\).

Step 2: Find the last allowable integer. The integer 10 is no greater than 10.8, while 11 exceeds 10.8. Thus the largest allowable score is \(b=10\).

The support is \(\{3,4,5,6,7,8,9,10\}\). Its size is

$$ n=10-3+1=8. $$

Step 3: State the probability mass function.

$$ P(X=k)= \begin{cases} 1/8, & k\in\{3,4,5,6,7,8,9,10\},\\ 0, & \text{otherwise}. \end{cases} $$

Step 4: Calculate the point probability. Since 10 is an allowed score, \(P(X=10)=1/8=0.1250\), to four decimal places.

Check. The actual support contains eight integers, and \(8(1/8)=1\). A common mistake is to treat 2.4 and 10.8 as integer support endpoints. They are bounds, not possible scores; using them directly would give an invalid integer support and an incorrect count.

Worked Example: Recovering an Endpoint From a Point Probability

A hypothetical random-number procedure selects an integer uniformly from \(-3\) through an unknown integer \(b\), inclusive. The probability of each possible result is \(1/12\). Find \(b\), write the support, and determine \(P(X=8)\).

Method. Equate the stated probability at each supported value to the reciprocal of the support size, solve for the number of supported integers, and then use the known lower endpoint to recover the upper endpoint.

Step 1: Find the support size. If the common point probability is \(1/12\), the support has 12 equally likely values, since \(12(1/12)=1\).

Step 2: Use the endpoint count. The support size must also equal \(b-a+1\). Here \(a=-3\), so

$$ 12=b-(-3)+1=b+4. $$

Solving gives \(b=8\). The support is therefore \(\{-3,-2,-1,0,1,2,3,4,5,6,7,8\}\), which contains 12 integers.

Step 3: Find the requested probability. The value 8 is the upper endpoint and is included, so \(P(X=8)=1/12=0.0833\), to four decimal places.

Check. The endpoint formula gives \(8-(-3)+1=12\), agreeing with the stated point probability. The common error is to subtract \(-3\) incorrectly or to omit the \(+1\); checking the resulting support count against 12 catches either error.

Checking Whether the Model Applies

The formula depends on both the support and the equal-probability assumption. If a value inside the stated endpoints is impossible, the support is not a consecutive integer set. If the possible values are consecutive but some are more likely than others, the variable is not discrete uniform. In either case, assigning \(1/(b-a+1)\) to every integer would not describe the stated model.

It is also important to distinguish a supported value from a value that merely lies numerically between the endpoints. In this model every integer from \(a\) through \(b\) is supported, but a noninteger value is not. Any value below \(a\), above \(b\), or not an integer has probability zero.

Common exam trap: For consecutive integer endpoints \(a\) and \(b\), the support size is \(b-a+1\), not \(b-a\). For example, the integers 6 through 13 are eight values: \(13-6+1=8\). Using \(1/7\) as the point probability would assign total probability \(8/7\), which exceeds one. The correct point probability is \(1/8\).

When a problem asks for the probability of one exact outcome, the procedure is direct: check that the outcome is an integer, check that it lies between the inclusive endpoints, then assign \(1/n\) if it is supported and zero otherwise. This point-probability calculation is the basic use of the consecutive discrete uniform model.

Check Your Understanding

For each problem, identify the support before calculating the requested probability.

  1. A hypothetical selector chooses an integer from 41 through 52, inclusive, with equal probability. State the support size and \(P(X=47)\). (Answer: support size \(12\); \(P(X=47)=1/12=0.0833\).)
  2. An integer code \(X\) is selected uniformly from \(-4\) through 9, inclusive. Write its PMF and find \(P(X=3)\). (Answer: \(P(X=k)=1/14\) for \(k\in\{-4,-3,\ldots,9\}\), and \(P(X=3)=1/14=0.0714\).)
  3. A whole-number rating is equally likely to be any integer satisfying \(5.2\leq X\leq 14.6\). Find the support size and \(P(X=14)\). (Answer: support \(\{6,7,\ldots,14\}\), size \(9\), and \(P(X=14)=1/9=0.1111\).)
  4. A discrete uniform variable begins at \(-7\), and each supported value has probability \(1/25\). Find its upper endpoint and \(P(X=12)\). (Answer: upper endpoint \(17\), and \(P(X=12)=1/25=0.0400\).)
  5. A hypothetical generator chooses each integer from 6 through 30 except 18 with equal probability. Is this a discrete uniform distribution on consecutive integers, and what are \(P(X=18)\) and \(P(X=19)\)? (Answer: no, the support has a gap and is not consecutive; \(P(X=18)=0\) and \(P(X=19)=1/24=0.0417\).)
Clinical Biostats