NVIDIA Interview Question

Explain in mathematical language how sampling works?