Skip to content
Tech Interview Prep
Technical interview guide

Probability Fundamentals

Events, conditional probability, and Bayes' theorem: the building blocks every statistical method assumes.

Read
44 min
Practice MCQs
25
Interview Q&A
25
Edition
v6
Editorial status
Reviewed

Scope: Standards and library references current as of 2026-09: NIST/SEMATECH e-Handbook, the 2016 ASA statement on p-values, SciPy, statsmodels, and NumPy.

Curated: · Written: · Reviewed:

25 questions

MCQ-5An engineer has a prior P(H), a likelihood P(E | H), and the complement likelihood P(E | ¬H) for a binary evidence event E, and needs the posterior P(H | E). Which expression states Bayes' theorem for that update?
MCQ-1A script reads a table with one row per two-child family and columns `older` and `younger`, each holding 'B' or 'G'. The four rows BB, BG, GB and GG each occur equally often. The script keeps a row when `older = 'B' OR younger = 'B'`. Of the rows it keeps, what fraction have both columns equal to 'B'?
MCQ-4A disease affects 1% of a population. A test has sensitivity 99% (P(+|D) = 0.99) and specificity 95% (P(-|no D) = 0.95). A patient is drawn at random from the population. What is the probability the test is positive?
MCQ-2A fraud-detection rule flags 5% of all sessions. Malicious sessions account for 2% of all sessions, and the rule catches 50% of those. An analyst opens a session that the rule flagged. What is the probability that this session is malicious?
MCQ-7A service records the number of retries R for each request. Over 10,000 requests, 9,000 had 0 retries, 900 had 1 retry, and 100 had 2 retries. The team defines S = 1 if R ≥ 1 else 0, and T = R × 20 ms (the added latency from retries). Which statement about these variables is correct?
MCQ-8A checkout service retries against two payment providers. Over a one-minute window, X is the number of retries against provider A and Y the number against provider B. Both have mean 3 and variance 4, and the counts are positively correlated with Cov(X, Y) = 3. An engineer sizing the retry buffer needs the mean and variance of the total X + Y. Which pair is correct?
MCQ-15A dataset has five points: x = [-2, -1, 0, 1, 2] and y = [4, 1, 0, 1, 4]. Pearson's r is computed as 0.00. Which statement about this dataset is correct?
MCQ-6A sharded cache runs two shards behind a router. Over a 1,000-hour window, shard-1 evicted under memory pressure with P = 0.05, shard-2 with P = 0.04, and both shards evicted together in 20 of those hours. The team assumes the shards are independent and sizes the failover budget with P(at least one shard evicts) = 0.05 + 0.04 = 0.09. Which statement is correct?
MCQ-10A canary runs against a service whose true error rate is 5%. Over 100 requests the observed error count typically deviates from its expected value by about 2.2 errors. The team extends the canary to 10,000 requests. What does the law of large numbers predict for the spread of the observed error count at 10,000 requests?
MCQ-13A team reports a 95% confidence interval of [12 ms, 18 ms] for the mean latency of a service, computed from 40 requests. Which statement gives the correct frequentist interpretation of that interval?
MCQ-12An analytics platform reports the mean revenue per session for a pricing rollout. Revenue per session has a population standard deviation of $50. A pilot covering 100 sessions per variant reported a 95% confidence half-width of ±$9.80 on the mean. For the full run the team can afford 400 sessions per variant, and the population standard deviation is assumed unchanged. What 95% confidence half-width should the full run report?
MCQ-14A team measures p99 latency on a checkout service. With 100 sampled requests per window the 95% confidence-interval half-width is 3.92 ms, and the sample standard deviation is 20 ms. The product owner will not sign off until the half-width is 0.98 ms. How many sampled requests per window does the team need, holding the standard deviation fixed?
MCQ-9Latency samples from two regions are being combined into one report. Region A: n = 100, sample standard deviation 10 ms. Region B: n = 400, sample standard deviation 20 ms. What is the pooled within-group standard deviation of the combined sample?
MCQ-23A team runs 10,000 replications of a queueing simulation and estimates the job-drop rate at 2.13%. They report the result as 2.130% ± 0.001% (95% CI). What is the correct 95% half-width for this estimate?
MCQ-21A service mints session IDs as uniformly random 64-bit values and will issue 10^9 of them over its lifetime. Before launch, an engineer estimates the probability that at least two IDs collide. Which estimate is correct?
MCQ-22A team checks an analytic downtime-fraction derivation (predicted 0.0300) with a Monte Carlo simulation of 200,000 replications. The first run, using np.random.default_rng() with no seed, returns 0.0312; a second unseeded run returns 0.0298. The engineer wants to report one simulation number. Which action is correct?
MCQ-11A service's per-request latency follows a Pareto distribution with tail index $\alpha = 1.5$, so the mean is finite but the variance is infinite. A team draws $n = 10{,}000$ samples and wants to know how the sample mean $\bar{X}$ behaves as $n$ grows. Which statement about its limiting behavior is correct?
MCQ-3A service runs three replicas, each measured at 99.9% availability over the past year. All three sit in one rack on a shared PDU, and that PDU failed twice last year for 30 minutes each time, taking all three replicas down. The team's availability model multiplies the three per-replica figures and reports 1e-9 unavailability: about 32 ms of downtime a year. Which statement about that model is correct?
MCQ-24A team's RFC estimates a 3% monthly chance that the primary database fails over. In the same section it estimates a 12% monthly chance that the primary fails over, the replica is lagging, and the on-call misses the page. A reviewer flags the pair. Which statement about the two estimates is correct?
MCQ-16During an on-call review, a payments team looks at one week of checkout data: 40,000 sessions, 3,000 of which had at least one payment retry. Retried sessions ended in a successful payment 71% of the time; sessions with no retry succeeded 59%. A staff engineer proposes enabling auto-retry on every payment to lift the overall success rate by about 12 points. Which reading of the 12-point gap is correct?
MCQ-17A team benchmarks two connection-pool configurations against a request mix. P1 served 1,000 cache-hit requests (990 under 10 ms) and 3,000 cache-miss requests (2,100 under 10 ms). P2 served 10,000 cache-hit requests (9,800 under 10 ms) and 1,000 cache-miss requests (650 under 10 ms). Overall, P2 meets the 10 ms target on 95.0% of requests and P1 on 77.3%. Production traffic is 80% cache-hit and 20% cache-miss. What 10 ms attainment should the team expect from each configuration on production traffic?
MCQ-18A batch team sizes its worker pool from the jobs table: 10,000 rows, mean runtime 4.2 s. Jobs killed by the 30 s watchdog never get a row, and the watchdog fired 3,000 times last month. What does the capacity model need to conclude?
MCQ-19A checkout service handles 1,000 requests per minute: 980 finish in 40 ms and 20 finish in 3,000 ms. Its SLO is p99 < 500 ms. The dashboard reports a mean latency of 99 ms, and the team says the SLO is met. Which statement is correct?
MCQ-20Two shards sit behind one router, and the team needs the p95 latency for the whole fleet over a one-minute window. Shard A served 1,900 requests: 1,820 finished in 10 ms and 80 in 200 ms. Shard B served 100 requests: 60 finished in 10 ms and 40 in 1,000 ms. Use nearest-rank percentiles (p95 = the value at position ceil(0.95 * N) in the ascending sorted list, i.e. the smallest value at or below which 95% of the requests fall). What p95 should be reported for the fleet in that window?
MCQ-25An A/B test on checkout ran 12,400 sessions per arm. Control converted 402 (3.24%); treatment converted 434 (3.50%), an 8.0% relative lift with a 95% CI on the absolute difference of [-0.19 pp, +0.71 pp]. A pre-test power calculation set the minimum detectable effect at 0.64 pp (about 20% relative). What should the team do with this result?