NVIDIA interview question

Explain in mathematical language how sampling works?