Chance Two Random Users Share at Least One Interest Tag

Last updated: November 29, 2026

Quick Overview

Each user picks 5 interest tags uniformly at random from a set of 50 during Facebook onboarding. What is the probability two random users share at least one tag, and what is the expected number of shared tags?

Meta
Statistics & Math
Data Scientist
Meta
November 29, 2026
Data Scientist
Technical Screen
Statistics & Math
Medium

0

0

0 solved


Each user picks 5 interest tags uniformly at random from a set of 50 during Facebook onboarding. What is the probability two random users share at least one tag, and what is the expected number of shared tags?

Meta uses shared interests as a matching and recommendation signal, and data scientists need a null model for overlap to know when an observed overlap is meaningful. The interviewer checks complement counting with combinations, linearity of expectation, and a comparison with the independence approximation.

What the Interviewer Expects
  • Fixes user one's tags and counts user two's choices avoiding them
  • Computes 1 - C(45,5)/C(50,5) of about 0.423
  • Computes expected overlap 5 x 5/50 = 0.5
  • Notes the hypergeometric distribution of the overlap
  • Explains why real tags are far from uniform
Key Topics to Cover
Hypergeometric distribution
Complementary counting
Linearity of expectation
Null models
Interest matching
How to Approach This
  1. Define your hypotheses (H0 and H1) clearly before performing any test.
  2. Calculate required sample size BEFORE running an experiment, using power analysis.
  3. Remember the Central Limit Theorem: sample means become approximately normal with large n.
  4. Watch for Simpson's paradox. Always segment data by key dimensions.
  5. Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
  • What is the probability they share at least 2 tags?
  • How does the answer change if popular tags are chosen 10x more often?
  • How would you use this null to score whether two users are unusually similar?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Browse Statistics Questions
Sample Answer
Clarify

Each user's 5 tags are a uniformly random 5-subset of 50, independently across users. Overlap XX is the number of tags in both sets....

Approach

Condition on user one's set. User two's set misses it entirely if all 5 picks come from the other 45 tags. For the mean, sum indicators over user one's 5 tags....


Submit Your Answer
Markdown supported