Tutorials › Exam P - Probability › Counting Observations In Several Intervals

Exam P · Order Statistics · Tutorial 806 of 915

Counting Observations In Several Intervals

Convert several order-statistic conditions into interval-count constraints and compute their probabilities under an iid sampling model.

Advanced 12 min read

What You'll Learn

  • Define disjoint ordered intervals that cover the possible observations.
  • Translate a rank falling in an interval into inequalities on cumulative counts.
  • Use the multinomial probability formula for iid observations in several intervals.
  • Add probabilities over all count configurations satisfying simultaneous rank conditions.
  • Avoid errors caused by overlooking feasible counts or mishandling interval boundaries.

From Ranks to Interval Counts

An order-statistic condition can sound more complicated than it is. If a problem asks where the second-smallest, fourth-smallest, and largest observations fall, the key is to count how many observations lie in each relevant interval. The ranks are determined by those counts: observations in an earlier interval must precede observations in a later one.

This method is particularly useful when several order statistics must satisfy conditions at once. Instead of integrating a joint density over a complicated region, divide the possible values into ordered intervals, translate each rank condition into inequalities on the interval counts, and sum the probabilities of the valid count configurations.

Definition: Let \(X_1,\ldots,X_n\) be iid observations, and let \(X_{(1)}\le\cdots\le X_{(n)}\) denote their order statistics. Partition the possible values into disjoint ordered intervals \(I_1,\ldots,I_m\), with every value in \(I_j\) less than every value in \(I_{j+1}\). Let \(N_j\) be the number of observations in \(I_j\), and define \(C_j=N_1+\cdots+N_j\), with \(C_0=0\). Then \(X_{(k)}\) is in \(I_j\) exactly when \(C_{j-1}<k\le C_j\).

The condition says that fewer than \(k\) observations occur in the intervals before \(I_j\), while at least \(k\) observations occur in \(I_j\) or earlier. Equivalently, \(X_{(k)}\in I_j\) if and only if \(C_{j-1}\le k-1\) and \(C_j\ge k\). Multiple rank conditions become simultaneous inequalities of this form.

The Multinomial Model for Interval Counts

Suppose each observation independently falls in interval \(I_j\) with probability \(p_j=P(X_i\in I_j)\), where \(\sum_{j=1}^m p_j=1\). The vector of counts \((N_1,\ldots,N_m)\) has a multinomial distribution. For nonnegative integers \(n_1,\ldots,n_m\) that sum to \(n\), its probability is

$$ P(N_1=n_1,\ldots,N_m=n_m) =\frac{n!}{n_1!\cdots n_m!}\prod_{j=1}^m p_j^{n_j}. $$

The factor \(n!/(n_1!\cdots n_m!)\) counts how many assignments of the \(n\) labelled observations produce those interval counts. Each assignment has probability \(\prod_j p_j^{n_j}\) by independence. Multiplying the number of assignments by the probability of each one gives the formula.

The probabilities \(p_j\) come from the sampling distribution and the selected intervals. For a continuous distribution with cdf \(F_X\), the probability of an interval with endpoints \(a<b\) is \(F_X(b)-F_X(a)\), with the endpoint convention immaterial when the endpoints have probability zero. For a discrete distribution, endpoints may have positive probability, so the intervals must be specified as a disjoint partition, and each \(p_j\) must include exactly the probability mass assigned to that interval.

Once the rank conditions have been translated into count inequalities, sum the multinomial probabilities over every count vector that meets all of them. A useful check is that the counts are nonnegative integers summing to \(n\), and that no feasible vector has been omitted.

1
Choose ordered intervals.
Make them disjoint and cover the possible observations relevant to the event. Find each interval probability \(p_j\).
2
Define counts and cumulative counts.
Use \(N_j\) for the count in interval \(I_j\), and \(C_j=N_1+\cdots+N_j\) for the count through that interval.
3
Translate every rank condition.
For each requested event \(X_{(k)}\in I_j\), impose \(C_{j-1}<k\le C_j\).
4
Enumerate and sum.
List all count vectors satisfying the constraints, evaluate their multinomial probabilities, and add them.

Worked Applications

Worked Example: The Third Observation Is Early and the Maximum Is Late

Six iid observations are drawn from a distribution that assigns probabilities \(0.50\), \(0.25\), and \(0.25\) to three ordered intervals \(I_1,I_2,I_3\), respectively. Find the probability that \(X_{(3)}\in I_1\) and \(X_{(6)}\in I_3\). The sample size is \(n=6\), the observations are independent and identically distributed, and the interval probabilities are \(p_1=0.50\), \(p_2=0.25\), and \(p_3=0.25\).

Let \(a,b,c\) be the counts in \(I_1,I_2,I_3\). The condition \(X_{(3)}\in I_1\) requires \(a\ge3\). The condition \(X_{(6)}\in I_3\) requires \(c\ge1\). Thus the event is \(a\ge3\) and \(c\ge1\).

First, \(P(a\ge3)\) is a binomial tail because each observation has probability \(0.50\) of falling in \(I_1\):

$$ P(a\ge3)=\sum_{a=3}^{6}\binom{6}{a}(0.50)^a(0.50)^{6-a} =\frac{20+15+6+1}{64} =\frac{42}{64}=0.65625. $$

Now subtract the cases with \(a\ge3\) but \(c=0\). Those cases have \(b=6-a\), so their probabilities are:

$$ \begin{aligned} P(a\ge3,c=0) &=20(0.50)^3(0.25)^3 +15(0.50)^4(0.25)^2\\ &\quad+6(0.50)^5(0.25) +(0.50)^6\\ &=0.0390625+0.05859375+0.046875+0.015625\\ &=0.16015625. \end{aligned} $$

Therefore the desired probability is \(0.65625-0.16015625=0.49609375\), or 0.4961 to four decimal places. This subtraction method avoids listing every possible value of \(b\) separately. As a check, the retained event requires both at least three observations in the first interval and at least one in the last; the excluded cases are exactly those with no observation in the last interval and at least three in the first.

Worked Example: Three Specified Ranks in Three Intervals

Seven iid observations fall in three ordered intervals with probabilities \(0.25\), \(0.50\), and \(0.25\), respectively. Find the probability that \(X_{(2)}\) is in the first interval, \(X_{(5)}\) is in the second, and \(X_{(7)}\) is in the third. The sampling model is iid with \(n=7\), and the interval probabilities are \(p_1=0.25\), \(p_2=0.50\), and \(p_3=0.25\).

Write \(a,b,c\) for the three interval counts. The first condition gives \(a\ge2\). For the fifth order statistic to be in the second interval, fewer than five observations can be in the first interval, so \(a\le4\); at least five must be in the first two intervals, so \(a+b\ge5\). Since \(a+b=7-c\), this last inequality means \(c\le2\). The maximum is in the third interval exactly when \(c\ge1\). Therefore \(a\in\{2,3,4\}\) and \(c\in\{1,2\}\), with \(b=7-a-c\). These six pairs give nonnegative counts.

For each feasible vector, the multinomial probability is \(7!/(a!b!c!)\) multiplied by \((0.25)^a(0.50)^b(0.25)^c\). Expressing the six probabilities with common denominator \(4^7=16384\) gives:

$$ \begin{array}{c|c|c|c} (a,b,c)&\frac{7!}{a!b!c!}&2^b&\text{Numerator over }4^7\\ (2,4,1)&105&16&1680\\ (2,3,2)&210&8&1680\\ (3,3,1)&140&8&1120\\ (3,2,2)&210&4&840\\ (4,2,1)&105&4&420\\ (4,1,2)&105&2&210 \end{array} $$

The numerator sum is \(1680+1680+1120+840+420+210=5950\). Hence the probability is \(5950/16384=0.3631591796875\), or 0.3632 to four decimal places. The count check confirms that each vector sums to seven and satisfies all three rank conditions.

Worked Example: Nonuniform Interval Probabilities and a Required Final Observation

Five iid observations are partitioned into three ordered intervals with probabilities \(0.20\), \(0.30\), and \(0.50\). Find the probability that \(X_{(2)}\) lies in the first interval, \(X_{(4)}\) lies in the second, and \(X_{(5)}\) lies in the third. Assume independence and the stated interval probabilities for every observation.

Let \(a,b,c\) be the counts in the intervals, so \(a+b+c=5\). The first rank condition requires \(a\ge2\). The fourth rank is in the second interval if \(a\le3\) and \(a+b\ge4\). The maximum is in the third interval if \(c\ge1\). Since \(a+b=5-c\), the fourth-rank condition also requires \(c\le1\). Combining \(c\ge1\) and \(c\le1\) gives \(c=1\). The possible values are then \(a=2,b=2\) and \(a=3,b=1\).

For \((a,b,c)=(2,2,1)\), the multinomial coefficient is \(5!/(2!2!1!)=30\), and the probability is \(30(0.20)^2(0.30)^2(0.50)=30(0.04)(0.09)(0.50)=0.054\).

For \((a,b,c)=(3,1,1)\), the coefficient is \(5!/(3!1!1!)=20\), and the probability is \(20(0.20)^3(0.30)(0.50)=20(0.008)(0.30)(0.50)=0.024\).

Adding the two disjoint count cases gives \(0.054+0.024=\mathbf{0.0780}\). The result is checked by noting that the required maximum forces at least one observation into the last interval, while the fourth rank in the second interval limits that count to one.

Boundary Choices, Ties, and Exam Traps

The count method depends on assigning every observation to exactly one interval. For a continuous distribution, interval endpoints have probability zero, so a boundary can usually be included on either side without changing the probability. For a discrete distribution, a boundary may carry positive probability. For example, intervals written as \((-\infty,t]\) and \([t,\infty)\) overlap at \(t\); their counts do not form a multinomial partition. One must instead use disjoint intervals such as \((-\infty,t]\) and \((t,\infty)\), or choose another explicit convention and use it consistently.

Ties within an interval do not invalidate the counting argument. If the intervals are ordered and disjoint, every observation in an earlier interval is no greater than every observation in a later one, with strict separation under the usual ordered-interval setup. The count inequalities locate ranks by interval even if multiple observations have the same value within an interval. If a condition concerns a particular value at a boundary, however, the boundary mass must be accounted for in the interval probabilities.

A frequent error is to impose only the condition that a rank is not too far to the left, while forgetting that it must also not be too far to the right. For example, \(X_{(k)}\in I_j\) requires both \(C_{j-1}<k\) and \(C_j\ge k\). Enforcing only \(C_j\ge k\) would also count cases where the \(k\)th observation is in an earlier interval. Likewise, a maximum in the last of several intervals requires at least one observation there; it does not require all observations to be there.

Common exam trap: If \(X_{(k)}\in I_j\), do not replace the event with \(C_j\ge k\) alone. The complete condition is \(C_{j-1}<k\le C_j\). The missing lower bound is what prevents observations that rank entirely before \(I_j\) from being counted.

A reliable final check is to test each proposed count vector against the original rank statements in words. Ask whether the number before the target interval is less than the requested rank and whether the number through that interval reaches it. Then confirm the count total is \(n\), and that the multinomial probabilities being added describe disjoint configurations.

Check Your Understanding

For each problem, identify the valid interval-count constraints before calculating. Answers are given to four decimal places where appropriate.

  1. Four iid observations fall in two ordered intervals with probabilities \(0.50\) and \(0.50\). Find the probability that \(X_{(3)}\) is in the first interval and \(X_{(4)}\) is in the second. (Answer: 0.2500)
  2. Five iid observations fall in three ordered intervals with probabilities \(0.20\), \(0.50\), and \(0.30\). Find the probability that \(X_{(2)}\) is in the first interval and \(X_{(4)}\) is in the second. (Answer: 0.1840)
  3. Six iid observations fall in three ordered intervals with probabilities \(0.25\), \(0.50\), and \(0.25\). Find the probability that \(X_{(2)}\) is in the first interval, \(X_{(5)}\) is in the second, and \(X_{(6)}\) is in the third. (Answer: 0.1904)
  4. Seven iid observations fall in three ordered intervals with probabilities \(0.20\), \(0.30\), and \(0.50\). Find the probability that \(X_{(3)}\) is in the first interval, \(X_{(6)}\) is in the second, and \(X_{(7)}\) is in the third. (Answer: 0.0247)
Clinical Biostats