Protiviti Data Science Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Protiviti hiring for Data Science roles
Protiviti is a global consulting firm that is a subsidiary of Robert Half. It specialises in internal audit, risk and compliance, technology consulting, cybersecurity, data analytics and business process improvement. In India it operates through a member firm and hires analysts and consultants for risk advisory, IT audit, security, finance transformation and technology implementation roles for clients across many sectors.
For Data Science roles, this Protiviti practice set focuses most on Machine Learning (10), Deep Learning and NLP (5), Statistics and Probability (4), Python for Data Science (4). It has 2 easy, 33 medium, 5 hard questions, so you can start easy and work up to the harder ones.
Company type
Consulting
Headquarters
Menlo Park, California, USA
Main India offices
Gurugram, Mumbai, Bengaluru, Hyderabad
Protiviti Data Science interview process
Resume screening or online assessment
Technical interview
Managerial round
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for ProtivitiStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
✓ 3 questions free • Unlock the rest in seconds
01
Write Python code to compare revenue per user between two groups using Welch's t-test.
NULL means unknown, so any comparison with NULL, even NULL = NULL, gives unknown and the row is filtered out. Use IS NULL or IS NOT NULL instead. Aggregates like SUM, AVG and COUNT(column) skip NULLs, so AVG may be computed over fewer rows than you expect. NOT IN with a subquery that contains a NULL returns no rows. COALESCE replaces NULLs with a default value.
Split the data into k folds, train on k−1 folds and validate on the remaining one, rotate and average the scores. It gives a more reliable estimate than one split and helps tune hyperparameters without touching the test set.
04
A new checkout converts better on both mobile and desktop, but worse overall. How is that possible?
Simpson's paradox happens when a trend in several groups reverses when the groups are combined. Example: a new checkout converts better on both mobile and desktop, but worse overall, because most of its traffic came from mobile, which has lower conversion anyway. The mix of groups, not the treatment, drives the total. The lesson is to check segment-level results and confounding variables before drawing conclusions from aggregated numbers.
05
Pandas: compute a 7-day rolling average of daily sales for each store.
Accuracy, F1 and confusion matrices for classification, BLEU or ROUGE for generation and summarisation, perplexity for language models, plus human review.
An AI agent is an LLM that works in a loop: it plans a step, calls a tool, reads the result and decides the next step until the goal is met. For example, it might query a database, run Python on the result and write a summary. Agents handle multi-step tasks but are less predictable, slower and costlier than a single call. Good designs limit tools and steps, log every action and keep a human check for risky actions.
RNNs process sequences with a hidden state but struggle with long dependencies. LSTMs add gates that control what to remember or forget, easing the vanishing gradient.
09
What is correlation and why does it not imply causation?
Correlation measures linear association between variables (-1 to 1). A third factor, reverse causality or chance can create it, so causation needs controlled experiments.
10
What is Bayesian A/B testing and how are its results reported?
Bayesian A/B testing starts with a prior on each variant's metric, updates it with observed data and produces a posterior distribution. Instead of a p-value, you report things like the probability that treatment beats control, say 94 percent, and the expected loss if you choose the wrong variant. Business teams find this easier to interpret. Priors must be chosen sensibly, and continuous monitoring still needs discipline about decision rules.
11
Write a Python function to compute IoU between two bounding boxes given as (x1, y1, x2, y2).
It fits a line minimising squared error. Assumes linearity, independent errors, constant variance (homoscedasticity), normally distributed residuals and no strong multicollinearity.
It combines gradient boosting with regularisation, handling of missing values, parallel tree construction and speed optimisations, and it performs strongly on tabular data.
14
A deep network you built from scratch does not learn at all; the loss stays flat from the first epoch. Could weight initialisation be the reason?
If weights start too large, activations and gradients explode; if too small, they vanish, and training stalls. If all weights are equal, every neuron learns the same thing. Good schemes keep the variance of activations stable across layers: Xavier or Glorot initialisation for tanh and sigmoid, and He initialisation for ReLU. Frameworks use sensible defaults, but it matters when building custom layers or very deep networks.
15
Your daily sales forecast badly misses the Diwali spike every year. How do you fix it?
The model is treating Diwali as noise because the festival moves on the calendar and a fixed yearly seasonality does not align. Add explicit holiday features: a flag for Diwali and a few days before and after, since buying starts early. Include other regional festivals and sale events too. Models like Prophet or gradient boosting with holiday features handle this well. Then backtest specifically on past festive periods to confirm the fix.
16
Tell me about a time you deployed a model under a tight deadline.
Situation: a pricing model had to go live before a sale in ten days. Task: deploy safely in that window. Action: I cut scope to batch scoring instead of real-time, reused our standard Docker and Airflow template, wrote tests for the key features and set up a dashboard for score distribution. Result: it went live two days early and ran without incidents during the sale. Real-time scoring followed a month later.
17
How do one-stage and two-stage object detectors differ?
Two-stage detectors, like Faster R-CNN, first propose candidate regions and then classify and refine each one, which gives strong accuracy, especially for small objects, but is slower. One-stage detectors, like YOLO and SSD, predict boxes and classes directly over a dense grid in a single pass, making them fast enough for real-time video. Modern one-stage models have closed most of the accuracy gap, so they dominate edge and video use cases.
Gradient boosting builds trees one after another. It starts with a simple prediction, like the mean. Each new small tree is fitted to the negative gradient of the loss, which for squared error is just the residuals. Its predictions are multiplied by a learning rate and added to the model. Repeating this slowly reduces error. Key settings are number of trees, learning rate, tree depth and subsampling, which together control overfitting.
I would ask them to wait for the planned duration. Checking early and stopping on the first significant result, called peeking, inflates false positives. Two days also misses weekly patterns and novelty effects, where users click a new feature just because it is new. If speed matters, we can use a sequential testing method designed for early stopping. Otherwise we run the full sample size calculated before launch.
21
How would you convince a planning team that uses spreadsheet moving averages to adopt a new forecasting model?
Situation: planners relied on a 4-week moving average and distrusted models. Task: move them to a better forecast without forcing it. Action: I ran both methods side by side for eight weeks, showed error and stockout cost in rupees, kept their override option and explained forecasts with simple drivers like holidays and price. Result: the model cut error by about 20 percent, planners adopted it category by category, and overrides fell steadily.
22
Your random forest is accurate but too slow at prediction time for a real-time API. What do you do?
First measure where the time goes. Then reduce trees and maximum depth and check the accuracy loss. Switch to a gradient boosting model, which often needs fewer, smaller trees. Compile the model with tools like ONNX Runtime or Treelite. Cache features or precompute scores for known users. If accuracy allows, a simpler logistic regression may meet the latency budget easily. Always compare options on the same validation set.
23
Your SQL result does not match the number on the official dashboard. How do you resolve it?
I would first align definitions: date range, time zone, filters like test users or cancelled orders, and whether the metric counts users or events. Then compare at a smaller grain, by day or by city, to find where the gap starts. I would read the dashboard's underlying query and check data refresh times. Once found, I would document the agreed definition so the same mismatch does not repeat.
24
Write Pandas code to read a large CSV in chunks and compute total sales per city.
# process 1 million rows at a time
import pandas as pd
totals = {}
for chunk in pd.read_csv('sales.csv', usecols=['city', 'amount'], chunksize=1_000_000):
part = chunk.groupby('city')['amount'].sum()
for city, amt in part.items():
totals[city] = totals.get(city, 0) + amt
result = pd.Series(totals).sort_values(ascending=False)
25
What are quantile and power transforms such as Box-Cox and Yeo-Johnson, and when do you use them?
Power transforms reshape a skewed feature to look more normal. Box-Cox needs strictly positive values, while Yeo-Johnson also handles zero and negative values; both learn a lambda parameter from training data. A quantile transform maps values to a uniform or normal distribution by rank, which is robust to outliers. They help linear models, distance-based methods and neural networks, but tree models rarely need them.
The distribution of sample means approaches a normal distribution as the sample size grows (roughly 30+), whatever the population's shape. It lets us build confidence intervals and run hypothesis tests on means.
27
Soon after a new model version went live, customer complaints spiked. How do you roll back safely and learn from it?
Roll back immediately to the previous registry version through the deployment pipeline, rather than editing servers by hand, and confirm metrics recover. Then investigate offline: compare predictions of both versions on the same traffic, check feature pipelines and data changes, and review what the offline evaluation missed. Add the failing cases to the test set, and use canary or shadow rollout with alert thresholds for future releases.
28
Tell me about a time your model did not perform as expected after deployment.
Situation: my demand forecasting model had 8 percent error offline, but 20 percent in the first month live. Task: find out why quickly. Action: I compared live inputs with training data and found a promotions feature arrived a day late in production, so the model saw zeros. I added a data freshness check and a fallback. Result: error returned to 9 percent. Since then I always test with production-like pipelines before launch.
It applies Bayes' theorem assuming features are independent given the class. The assumption is rarely true but the model is fast and works well for text.
30
You are building defect detection for a factory line where only 1 in 1,000 images shows a defect. How do you approach it?
With so few defects, a plain classifier will learn to say no defect. Collect every defect image possible and oversample them or use class-weighted or focal loss. Consider anomaly detection trained only on good parts, which flags anything unusual. Use augmentation that mimics real variation in lighting and position. Evaluate with recall at a fixed false alarm rate, since missing a defect usually costs far more than a manual recheck.
31
The business asks you to pick a decision threshold for a churn model. How do you choose it?
The default 0.5 is rarely right. I would get the cost of each outcome: the value of saving a churner, the cost of a retention offer, and the team's capacity to contact customers. Then I compute expected profit or precision and recall at many thresholds on validation data and pick the one that maximises value within capacity. I would also check that the chosen threshold stays stable over recent months.
Putting features on comparable ranges using standardisation or min-max scaling. Distance-based and gradient-based models (KNN, SVM, regression, neural nets) need it; tree models do not.
Named entity recognition finds and labels spans of text such as person names, organisations, locations, dates and amounts. For example, in an invoice email it can pull out the vendor, invoice number and total. It is usually framed as token classification with BIO tags. spaCy and fine-tuned transformer models are common tools. Domain-specific entities, like medicine names, usually need custom labelled training data.
34
Your credit model has good overall AUC but performs much worse for applicants from one region. What do you do?
First confirm with per-segment metrics and enough samples, since small groups are noisy. Then check why: fewer training examples from that region, different feature distributions, missing data or labels that reflect past biased decisions. Fixes include collecting more data, reweighting, segment-aware features or a separate calibration. Also review fairness and regulatory requirements, and agree with risk and compliance teams on acceptable performance gaps before launch.
35
How would you design an ML platform for a team of 20 data scientists?
I would start from the team's pain points, then provide shared building blocks: a standard project template, managed notebooks with access to the warehouse, experiment tracking and a model registry, an orchestrator like Airflow for pipelines, a feature store if real-time use cases exist, a standard serving path using containers, and default monitoring. Prefer managed services over custom builds, and add self-serve documentation so teams do not depend on one platform engineer.
36
What is the difference between apply, map and applymap in Pandas?
map works element-wise on a Series, apply works on a Series or along a DataFrame axis, and applymap (now DataFrame.map) applies a function to every cell.
37
Explain exponential smoothing and the Holt-Winters method.
Simple exponential smoothing forecasts with a weighted average of past values where weights decay exponentially, so recent points matter more. Holt's method adds a smoothed trend component. Holt-Winters adds a seasonal component as well, either additive or multiplicative. Each component has a smoothing parameter between 0 and 1 that is fitted to the data. These models are fast, easy to explain and strong baselines for retail and demand data.
38
Tell me about the most challenging machine learning project you have worked on.
Situation: I built a lead scoring model where only 3 percent of leads converted and labels came 60 days late. Task: deliver a useful ranking for the sales team. Action: I set up a clean time-based validation, engineered activity features, used gradient boosting with class weights and measured lift in the top decile. Result: the top 10 percent of scored leads converted 3.5 times better than average. The hardest part was building trust in the labels.
39
You assign values to a filtered DataFrame and Pandas shows a SettingWithCopyWarning. What is going on and how do you fix it?
The warning appears when you assign values to something that may be a copy of a slice instead of the original DataFrame, for example df[df.age > 30]['flag'] = 1. The original may not change. Fix it by using a single .loc call, like df.loc[df.age > 30, 'flag'] = 1, or by taking an explicit .copy() when you really want a separate DataFrame. Copy-on-write in newer Pandas versions makes this behaviour more predictable.
40
What is the difference between a subquery and a correlated subquery?
A normal subquery runs once on its own and its result is used by the outer query, for example WHERE price > (SELECT AVG(price) FROM products). A correlated subquery refers to columns of the outer query, so it is logically evaluated once per outer row, for example comparing each product with its own category average. Correlated subqueries can be slow; joins or window functions are usually faster alternatives.
Tips to crack the Protiviti Data Science interview
Learn the basics of internal audit, risk management and controls, along with frameworks such as COSO for advisory interviews.
For technology consulting roles, revise cybersecurity basics, SQL and data visualisation, and mention any relevant certifications you are pursuing.
Practise explaining technical ideas in simple business language, since consultants often present findings to non-technical client stakeholders.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; Protiviti interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Protiviti Data Science interview?
Candidates usually go through 4 stages: Resume screening or online assessment; Technical interview; Managerial round; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the Protiviti Data Science interview?
This practice set leans on Machine Learning (10), Deep Learning and NLP (5), Statistics and Probability (4), Python for Data Science (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Protiviti interviewers ask you to walk through real work.
Are these the exact questions asked at Protiviti?
No. These are curated practice questions that match the skills and difficulty usually tested in consulting interviews like Protiviti's. They are not a leaked or verified list of past questions.
Where does Protiviti hire Data Science professionals in India?
Protiviti has large teams in Gurugram, Mumbai, Bengaluru, Hyderabad. Openings and locations change often, so check the Protiviti careers page and filter by city and experience.