Bounds on the Probability of Rain on at Least One Weekend Day
Company: Jane Street
Role: Data Scientist
Category: Machine Learning
Difficulty: easy
Interview Round: Technical Screen
The probability that it rains on Saturday is $p$, and the probability that it rains on Sunday is $q$. Nothing is said about whether the two days are independent.
### Constraints & Assumptions
- $p, q \in [0, 1]$ are the marginal probabilities of rain on Saturday and Sunday, respectively.
- The joint behavior of the two days (independence, positive or negative dependence) is **not** specified in the base question.
- "Bounds" means tight bounds: each endpoint of your range must be achievable by some valid joint distribution consistent with the marginals $p$ and $q$.
### Clarifying Questions to Ask
- Are the two days independent, or is the dependence between them unspecified?
- Does "at least one rainy day" mean the union of the two events (rain Saturday OR rain Sunday, including both)?
- Should the bounds be tight — i.e., do you want me to exhibit dependence structures that actually attain each endpoint?
- Are there any constraints relating $p$ and $q$ (for example $p + q \le 1$), or can they be any values in $[0,1]$?
### Part 1
Let $A$ = "it rains on Saturday" and $B$ = "it rains on Sunday," with $P(A) = p$ and $P(B) = q$. Find the full range of possible values of $P(\text{at least one rainy day}) = P(A \cup B)$, and show that both endpoints are attainable.
```hint Inclusion–exclusion
Write $P(A \cup B) = p + q - P(A \cap B)$. The marginals are fixed, so the only free quantity is the overlap $P(A \cap B)$ — bound that instead.
```
```hint Extreme overlaps
How large can $P(A \cap B)$ possibly be, and how small? Think of one event nested inside the other at one extreme, and the two events made as close to disjoint as the marginals allow at the other (the Fréchet bounds).
```
#### What This Part Should Cover
- Reducing the problem to bounding the intersection via inclusion–exclusion, rather than assuming independence.
- Deriving both endpoints of the range, including the edge case where $p + q > 1$.
- Certifying tightness with explicit joint distributions (couplings) that attain each endpoint.
### Part 2
Now use real-world weather to reason about where in that range the true probability sits:
1. Suppose rain events typically last **only one day**. Is $P(A \cup B)$ closer to the upper or the lower end of your range?
2. Suppose instead that rain events typically last **at least two days**. How does $P(A \cup B)$ move?
```hint Correlation sign
Rain persistence determines the sign of the dependence between the two days. Decide whether each scenario makes $P(A \cap B)$ larger or smaller than the independent value $pq$, then trace what that does to the union through the inclusion–exclusion identity.
```
#### What This Part Should Cover
- Translating each weather pattern into a statement about the conditional probability $P(B \mid A)$ (negative vs. positive dependence).
- Correctly propagating the size of the intersection to the size of the union (they move in opposite directions).
- A clear directional conclusion for each scenario, with the extreme cases identified.
### What a Strong Answer Covers
Across both parts, the interviewer is checking that the candidate:
- Never silently assumes independence, and knows where the independent case $p + q - pq$ sits inside the range.
- Can certify bounds by constructing explicit dependence structures, not just by algebraic manipulation.
- Sanity-checks edge cases ($p + q > 1$, $p = 0$ or $q = 0$, $p = q$).
- Connects an intuitive physical story (how long storms last) to a precise probabilistic statement about dependence.
### Follow-up Questions
- If you are additionally told that it rains on both days with probability $r$, what is $P(A \cup B)$ exactly, and what values of $r$ are even feasible given $p$ and $q$?
- If the two days were exactly independent, where does $P(A \cup B) = p + q - pq$ fall within your range? Prove it never touches either endpoint when $0 < p, q < 1$.
- Extend Part 1 to a three-day holiday weekend with marginal rain probabilities $p$, $q$, $r$: what is the range of $P(\text{at least one rainy day})$?
- Given only $P(A \cup B)$, $p$, and $q$, what can you infer about $P(A \cap B)$ and about $P(B \mid A)$?