PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Statistics & Math/Google

Define and sample a truncated normal

Last updated: Mar 29, 2026

Quick Overview

This question evaluates proficiency with probability distributions and Monte Carlo sampling techniques in the Statistics & Math domain, focusing on the truncated normal distribution, its normalized pdf/cdf, and the design and comparison of samplers for moderate and extreme tail regimes.

  • Medium
  • Google
  • Statistics & Math
  • Data Scientist

Define and sample a truncated normal

Company: Google

Role: Data Scientist

Category: Statistics & Math

Difficulty: Medium

Interview Round: Technical Screen

Define the truncated normal Z | a < Z < b for Z ~ N(0,1): write the normalized pdf and cdf. Then design efficient samplers for three cases: (i) a = 1, b = +∞; (ii) a = 4, b = 4.05; (iii) a = 4, b = +∞. For each, compare inverse-CDF sampling (draw U ~ Uniform(Φ(a), Φ(b)), set X = Φ^{-1}(U)) to simple rejection sampling from N(0,1) by computing the expected acceptance rate (1−Φ(1), Φ(4.05)−Φ(4), 1−Φ(4)). Propose an algorithm suitable for extreme tails (e.g., exponential or half-normal proposals with acceptance–rejection), discuss numerical stability when evaluating Φ and Φ^{-1} near machine precision, and explain how you would validate the sampler (KS test on back-transformed uniforms, moment checks).

Quick Answer: This question evaluates proficiency with probability distributions and Monte Carlo sampling techniques in the Statistics & Math domain, focusing on the truncated normal distribution, its normalized pdf/cdf, and the design and comparison of samplers for moderate and extreme tail regimes.

Related Interview Questions

  • Estimate weather’s effect on mental health - Google (easy)
  • Explain Bootstrap and Statistical Inference - Google (hard)
  • Explain Bootstrap and Prove Uniformity - Google (hard)
  • Can bootstrap help reduce variance - Google (medium)
  • Compute precision under noisy annotators - Google (medium)
Google logo
Google
Oct 13, 2025, 9:49 PM
Data Scientist
Technical Screen
Statistics & Math
2
0

Define the truncated normal Z | a < Z < b for Z ~ N(0,1): write the normalized pdf and cdf. Then design efficient samplers for three cases: (i) a = 1, b = +∞; (ii) a = 4, b = 4.05; (iii) a = 4, b = +∞. For each, compare inverse-CDF sampling (draw U ~ Uniform(Φ(a), Φ(b)), set X = Φ^{-1}(U)) to simple rejection sampling from N(0,1) by computing the expected acceptance rate (1−Φ(1), Φ(4.05)−Φ(4), 1−Φ(4)). Propose an algorithm suitable for extreme tails (e.g., exponential or half-normal proposals with acceptance–rejection), discuss numerical stability when evaluating Φ and Φ^{-1} near machine precision, and explain how you would validate the sampler (KS test on back-transformed uniforms, moment checks).

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Statistics & Math•More Google•More Data Scientist•Google Data Scientist•Google Statistics & Math•Data Scientist Statistics & Math
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.