OpenAI·Software Engineer·Technical Phone Screen
- Model a point light source emitting particles at uniformly random angles toward an infinite vertical screen. Derive mathematically why the x-coordinates where particles hit the screen follow a Cauchy distribution.
- Now simulate the particle emission process numerically: sample uniform random angles, compute the screen impact x-coordinates, and verify your derivation by comparing a histogram of the simulated values against the theoretical Cauchy PDF.
“The setup sounds like a physics problem but it's really a probability derivation.”