Katkat

Find the Expected Number of Consecutive Chosen Pairs

SIG (Susquehanna)Data Scientist · Online Assessment

Last updated

Calculate the expected number of consecutive pairs in a uniformly chosen subset of integers using indicator variables and linearity of expectation.

Problem Description

In a standard lottery draw, 6 distinct integers are chosen uniformly at random without replacement from the set {1, 2, 3, ..., 35}.

We say that a pair of chosen numbers is consecutive if they are of the form {i, i + 1}. For example, if the chosen set is {3, 4, 5, 12, 20, 21}, there are three consecutive pairs: {3, 4}, {4, 5}, and {20, 21}.

Let X be the random variable representing the total number of consecutive pairs present in the chosen 6-element subset.

Tasks

  1. Define indicator random variables to represent each potential consecutive pair.
  2. Compute the probability that any specific pair {i, i + 1} is included in the chosen subset.
  3. Compute the exact expected value E[X] as a fully simplified fraction.
  4. Derive a general closed-form expression for E[X] when selecting k distinct numbers uniformly at random from {1, 2, ..., n}.

Hints

Hint 1

Express the total count of consecutive pairs as a sum of indicator random variables for each adjacent pair in the range.

Hint 2

Recall that linearity of expectation E[X1 + X2 + ...] = E[X1] + E[X2] + ... holds even when the indicator variables are dependent.

Hint 3

To find the probability that a specific pair {i, i + 1} is included, determine how many ways the remaining k - 2 numbers can be selected from the remaining n - 2 integers.

Follow-up questions

  • How would you compute the variance of the number of consecutive pairs, and what types of pair overlaps (covariances) would you need to account for?
  • How does the expected value change if the numbers are arranged on a circle, such that {35, 1} is also considered a consecutive pair?
  • What is the exact probability that no two chosen numbers are consecutive (i.e., P(X = 0))?