Katkat

Find the Correlation Between Two Die-Face Counts

SquarepointSoftware Engineer · Technical Screen

Last updated

A fair six-sided die is rolled independently `n` times, where `n` is a fixed positive integer. Explain the assumptions and derivation clearly, check edge cases, and show how the result changes when those assumptions no longer hold.

Find the Correlation Between Two Die-Face Counts

A fair six-sided die is rolled independently n times, where n is a fixed positive integer. Let X be the number of rolls showing 1, and let Y be the number of rolls showing 5. Calculate Corr(X, Y) and explain why the two counts are not independent even though the rolls themselves are independent.

Constraints & Assumptions

  • Each roll has exactly one outcome in {1, 2, 3, 4, 5, 6}.
  • The die is fair and rolls are mutually independent.
  • n > 0, so both variances are positive and correlation is defined.

Clarifying Questions to Ask

  • Is n fixed rather than random?
  • Can one roll contribute simultaneously to both X and Y?

Hints

Hint 1

Check one roll carefully: Contrast dependence between the two face indicators on the same roll with independence across different rolls.

Follow-up questions

  • What is the correlation if the two counted categories have unequal probabilities?
  • How does the covariance change if `n` itself is random?