Generate Samples from Truncated Normal Distribution
Quick Overview
Evaluates truncated normal distribution fundamentals and sampling methods for lower-tail truncation. Strong answers name the lower-truncated normal, provide the PDF and CDF, and compare inverse-CDF, rejection, and tail-efficient samplers.
Generate Samples from Truncated Normal Distribution
Company: Google
Role: Data Scientist
Category: Statistics & Math
Difficulty: medium
Interview Round: Technical Screen
##### Scenario
You only keep samples from a normal distribution that are greater than 1.
##### Question
a) What is this resulting distribution called? b) Give its formal PDF/CDF definition. c) Describe at least two different ways to generate random samples directly from this truncated normal distribution.
##### Hints
CDF inversion and rejection/Monte-Carlo sampling are both acceptable.
Quick Answer: Evaluates truncated normal distribution fundamentals and sampling methods for lower-tail truncation. Strong answers name the lower-truncated normal, provide the PDF and CDF, and compare inverse-CDF, rejection, and tail-efficient samplers.
Generate Samples from Truncated Normal Distribution
Google
Jul 12, 2025, 6:59 PM
mediumData ScientistTechnical ScreenStatistics & Math
23
0
Sampling from a Truncated Normal Distribution
You draw from a normal distribution but only keep observations that are at least 1. Assume the original variable is X ~ N(mu, sigma squared), and the retained variable is X conditional on X >= 1. The special case mu = 0 and sigma = 1 is a standard normal truncated below at 1.
Constraints & Assumptions
Treat this as lower truncation at a = 1.
State the support of the resulting distribution.
Provide the PDF and CDF for the general normal case.
Describe at least two sampling methods.
Clarifying Questions to Ask Guidance
Is the truncation inclusive at 1, and does that matter for a continuous distribution?
Are mu and sigma known?
Is sampling needed for simulation speed, exactness, or conceptual explanation?
Is the truncation far into the tail?
Part 1 - Name and Distribution
What is the resulting distribution called?
What This Part Should Cover Guidance
Identify it as a one-sided lower-truncated or left-truncated normal distribution.
State the support y >= 1.
Explain that probability mass below 1 is removed and the remaining density is renormalized.
Part 2 - PDF and CDF
Provide the formal PDF and CDF.
What This Part Should Cover Guidance
Define alpha = (1 - mu) / sigma.
For y >= 1, give density proportional to the original normal density divided by 1 - Phi(alpha).
Give the CDF as [Phi((y - mu)/sigma) - Phi(alpha)] / [1 - Phi(alpha)].
State that the PDF and CDF are zero below the truncation point.
Part 3 - Sampling Methods
Describe at least two ways to generate samples directly from the truncated normal distribution.
What This Part Should Cover Guidance
Include rejection sampling from the original normal when acceptance is not too rare.
Include inverse-CDF sampling using a uniform draw over the truncated probability range.
Mention specialized tail algorithms or library routines for extreme truncation.
Discuss efficiency trade-offs.
Follow-up Questions Guidance
Why can naive rejection sampling be inefficient for far-tail truncation?
How would you sample a normal truncated to an interval [a, b]?
How would you validate that your sampler is correct?