PracHub
QuestionsLearningGuidesInterview Prep
|Home/Statistics & Math/Pinterest

Implement Bootstrap and Jackknife Estimates on a DataFrame

Last updated: Jul 21, 2026

Quick Overview

Implement bootstrap and jackknife uncertainty estimates for a statistic computed from a pandas DataFrame. Learn correct positional resampling, confidence intervals, leave-one-out variance, grouped sampling, reproducibility, and failure modes for dependent or nonsmooth data.

  • medium
  • Pinterest
  • Statistics & Math
  • Data Scientist

Implement Bootstrap and Jackknife Estimates on a DataFrame

Company: Pinterest

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Onsite

You receive a pandas DataFrame and a statistic-producing function. Implement bootstrap and jackknife procedures to estimate uncertainty for that statistic, then explain when the two methods can be misleading. ### Constraints & Assumptions - Each row is an independent sampling unit unless you explicitly choose a grouped resampling unit. - The statistic function accepts a DataFrame and returns one numeric value. - Your implementation should be reproducible under a supplied random seed. - You may use percentile bootstrap intervals; explain limitations rather than claiming they are universally optimal. ### Clarifying Questions to Ask - What statistic is being estimated, and is it smooth or sensitive to extremes? - Are rows independent, or are observations clustered by user, region, or time? - How many resamples are required, and which confidence level should be returned? - Can the statistic fail or become undefined on some resamples? ### What a Strong Answer Covers - Bootstrap sampling with replacement at the correct observational unit and deterministic random-state handling. - A distribution of bootstrap estimates, standard error, and clearly labeled percentile interval. - Leave-one-out jackknife estimates, their mean, and the standard jackknife variance formula. - Correct handling of grouping, missing values, unstable statistics, and computational cost. - Discussion of bias, skewness, nonsmooth statistics, small samples, dependence, and more suitable variants when needed. ### Follow-up Questions 1. How would you bootstrap a user-level metric when each user has many rows? 2. Why can a naive row bootstrap fail for time-series data? 3. What is the difference between the bootstrap sample size and the number of bootstrap replications? 4. When would you prefer a block bootstrap or stratified bootstrap?

Quick Answer: Implement bootstrap and jackknife uncertainty estimates for a statistic computed from a pandas DataFrame. Learn correct positional resampling, confidence intervals, leave-one-out variance, grouped sampling, reproducibility, and failure modes for dependent or nonsmooth data.

Related Interview Questions

  • Explain BLS vs CLS; compute t-stats - Pinterest (medium)
  • Design rigorous A/B test and causal analysis - Pinterest (hard)
  • Estimate billboard reach and impressions - Pinterest (hard)
  • Analyze survey with gender imbalance - Pinterest (hard)
|Home/Statistics & Math/Pinterest

Implement Bootstrap and Jackknife Estimates on a DataFrame

Pinterest logo
Pinterest
Jun 14, 2026, 12:00 AM
mediumData ScientistOnsiteStatistics & Math
1
0

You receive a pandas DataFrame and a statistic-producing function. Implement bootstrap and jackknife procedures to estimate uncertainty for that statistic, then explain when the two methods can be misleading.

Constraints & Assumptions

  • Each row is an independent sampling unit unless you explicitly choose a grouped resampling unit.
  • The statistic function accepts a DataFrame and returns one numeric value.
  • Your implementation should be reproducible under a supplied random seed.
  • You may use percentile bootstrap intervals; explain limitations rather than claiming they are universally optimal.

Clarifying Questions to Ask Guidance

  • What statistic is being estimated, and is it smooth or sensitive to extremes?
  • Are rows independent, or are observations clustered by user, region, or time?
  • How many resamples are required, and which confidence level should be returned?
  • Can the statistic fail or become undefined on some resamples?

What a Strong Answer Covers Guidance

  • Bootstrap sampling with replacement at the correct observational unit and deterministic random-state handling.
  • A distribution of bootstrap estimates, standard error, and clearly labeled percentile interval.
  • Leave-one-out jackknife estimates, their mean, and the standard jackknife variance formula.
  • Correct handling of grouping, missing values, unstable statistics, and computational cost.
  • Discussion of bias, skewness, nonsmooth statistics, small samples, dependence, and more suitable variants when needed.

Follow-up Questions Guidance

  1. How would you bootstrap a user-level metric when each user has many rows?
  2. Why can a naive row bootstrap fail for time-series data?
  3. What is the difference between the bootstrap sample size and the number of bootstrap replications?
  4. When would you prefer a block bootstrap or stratified bootstrap?
Loading comments...

Browse More Questions

More Statistics & Math•More Pinterest•More Data Scientist•Pinterest Data Scientist•Pinterest Statistics & Math•Data Scientist Statistics & Math

Write your answer

Your first approved answer each day earns 20 XP.

Sign in to write your answer.
PracHub

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

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding 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.