← Goldman Sachs Interview Insights

Goldman Sachs·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Apr 2026

Summary

Goldman Sachs SWE interview had at least one probability question that felt more like a math exam than anything coding-related. Wasn't expecting to be doing calculus on a double-sided exponential distribution.

Questions Asked (1)

Q1

Given a random variable X with PDF f(x) = 0.5 * e^(-|x|) defined over all real numbers, compute P(2 ≤ |X| ≤ 4) rounded to three decimal places. Options were 0.117, 0.018, 0.135, or 0.068.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Blanked for a second because I kept second-guessing whether to integrate from -4 to -2 and 2 to 4 separately or use symmetry.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Recognize that the PDF is symmetric about 0, so P(2 ≤ |X| ≤ 4) = 2 * P(2 ≤ X ≤ 4). Compute the integral of f(x) from 2 to 4 and double it, then round to three decimal places.

Pro tip: Simplify the integral by exploiting symmetry and the fact that for x > 0, |x| = x, so f(x) = 0.5 e^{-x}. This reduces the computation to a straightforward exponential integral.

1. Identify symmetry

Note that f(x) is an even function, so the probability over |X| in [2,4] is twice the probability over X in [2,4].

2. Set up integral

Write P(2 ≤ X ≤ 4) = ∫_2^4 0.5 e^{-x} dx, since for x > 0, |x| = x.

3. Compute integral

Evaluate the integral: ∫ 0.5 e^{-x} dx = -0.5 e^{-x}. Apply limits: -0.5 e^{-4} + 0.5 e^{-2} = 0.5(e^{-2} - e^{-4}).

4. Double and round

Multiply by 2 to get P(2 ≤ |X| ≤ 4) = e^{-2} - e^{-4}. Compute numerically: e^{-2} ≈ 0.1353, e^{-4} ≈ 0.0183, difference ≈ 0.1170. Round to three decimal places: 0.117.

Key Points to Mention

  • Symmetry of the PDF about 0
  • Definition of absolute value for positive and negative x
  • Integration of exponential functions
  • Numerical approximation of e^{-2} and e^{-4}
  • Final rounding to three decimal places
  • Verification that the result matches one of the given options

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.