Skip to content

ZS Associates Data Science Interview Questions & Answers

Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.

About ZS Associates hiring for Data Science roles

ZS is a management consulting and technology firm known for its work with pharmaceutical and life sciences companies on sales, marketing and analytics. Its India offices in Pune, Gurugram and Bengaluru handle analytics, data engineering and technology delivery. It hires for business analysts, decision analytics associates, data engineers and data scientists.

For Data Science roles, this ZS Associates practice set focuses most on Machine Learning (7), Time Series & Forecasting (6), Python for Data Science (5), Computer Vision (4). It has 6 easy, 32 medium, 2 hard questions, so you can start easy and work up to the harder ones.

Company type
Consulting
Headquarters
Evanston, Illinois, USA
Main India offices
Pune, Gurugram, Bengaluru

ZS Associates Data Science interview process

  1. Online assessment (aptitude + analytics)
  2. Case interview
  3. Technical interview
  4. Managerial round
  5. HR round

Typical pattern based on public candidate experiences. Rounds vary by role, team and year.

Solved for ZS AssociatesStart 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

What is an Overall Evaluation Criterion (OEC) in experimentation?

Save to ▾
Show answer
An OEC is a single agreed metric, or a weighted combination of metrics, that represents long-term business value and is used to judge experiments. Good OECs are sensitive enough to move within a test's duration yet aligned with long-term goals; for example, sessions per user with penalties for churn rather than raw clicks. Having an OEC prevents teams from each optimising their own metric and makes ship decisions consistent across the organisation.
02

How does linear regression work and what are its assumptions?

Save to ▾
Show answer
It fits a line minimising squared error. Assumes linearity, independent errors, constant variance (homoscedasticity), normally distributed residuals and no strong multicollinearity.
03

What is calibration of a classifier?

Save to ▾
Show answer
Calibration checks whether predicted probabilities match real frequencies (e.g. 70% predictions are right about 70% of the time). Fix with Platt scaling or isotonic regression.
04

How do you use groupby with multiple aggregations?

Save to ▾
Show answer
df.groupby('region').agg(total=('sales','sum'), avg=('sales','mean')) gives named aggregations per group in one pass.
05

A key metric dropped 8 percent week over week. How do you check whether it is real?

Save to ▾
Show answer
First rule out data issues: tracking changes, pipeline delays, missing partitions or a changed metric definition. Then compare with the same week last year and look for holidays or seasonality. Check normal weekly variation to see if 8 percent is unusual. Break the drop down by platform, region, app version and user type to find where it is concentrated. Finally, check releases, campaigns or outages that happened that week.
06

What is a CTE and what is a recursive CTE?

Save to ▾
Show answer
A CTE, common table expression, is a named temporary result defined with WITH and used in the query that follows. It breaks complex SQL into readable steps and can be referenced more than once. A recursive CTE refers to itself: an anchor query starts the result and a recursive part keeps adding rows until none are added. It is used for hierarchies like employee-manager chains or generating date series.
07

What is the difference between additive and multiplicative seasonality?

Save to ▾
Show answer
With additive seasonality the seasonal swing is a fixed amount, for example weekends always add about 500 orders regardless of the overall level. With multiplicative seasonality the swing is a percentage of the level, so as the business grows the weekend spike grows too. A quick check is to plot the series: if the peaks widen as the trend rises, use multiplicative, or take a log and model it additively.
08

What is regularization? Explain L1 vs L2.

Save to ▾
Show answer
Regularization adds a penalty on weights to reduce overfitting. L1 (Lasso) adds |w| and can push features to exactly zero. L2 (Ridge) adds w² and shrinks weights smoothly.
09

Most of your products sell zero units on most days, with occasional sales. Which forecasting approach suits this?

Save to ▾
Show answer
This is intermittent demand, and standard models like ARIMA forecast a small constant that is useless for stocking. Croston's method and its SBA variant forecast the size of non-zero demand and the interval between sales separately. Alternatives are aggregating to weekly level, or using a global gradient boosting model with Tweedie or Poisson loss. Evaluate with MAE or MASE, not MAPE, because zero actuals break percentage errors.
10

Write a Python function to flatten a nested list of any depth.

Save to ▾
Show answer
def flatten(items): out = [] for x in items: if isinstance(x, list): out.extend(flatten(x)) else: out.append(x) return out print(flatten([1, [2, [3, 4]], 5])) # [1, 2, 3, 4, 5]
11

Pandas: find the top 3 products by revenue in each region.

Save to ▾
Show answer
(df.assign(rev=df.price * df.qty) .groupby(['region', 'product'])['rev'].sum() .reset_index() .sort_values('rev', ascending=False) .groupby('region').head(3))
12

What is PCA and when do you use it?

Save to ▾
Show answer
It projects data onto orthogonal directions of maximum variance to reduce dimensions, remove correlation and speed up models, at some cost of interpretability.
13

Tell me about a time your forecast was badly wrong. How did you handle it?

Save to ▾
Show answer
Situation: my weekly demand forecast under-predicted a category by 30 percent for a month. Task: explain the miss and stop it recurring. Action: I compared forecast and actuals by region and found a new distribution channel had launched that the model knew nothing about. I told the planning team quickly, added channel as a feature and set up a weekly error review. Result: error returned to normal and planners trusted the alerts.
14

Your detector finds large objects well but misses small objects like distant people. How do you improve it?

Save to ▾
Show answer
Small objects lose detail after downsampling. Train and infer at higher input resolution, or tile large images into overlapping crops. Use a backbone with a feature pyramid so detection happens on high-resolution maps. Tune anchors or assignment settings for small sizes, and oversample images with small objects. Check labelling quality for tiny boxes too. Measure mAP on small objects separately to confirm improvement.
15

Your LLM assistant confidently quotes a policy clause that does not exist. Why does this happen and how do you reduce it?

Save to ▾
Show answer
Hallucination is when a model produces confident text that is false or not supported by any source. It happens because the model generates plausible tokens rather than checking facts. Reduce it by grounding answers in retrieved documents, asking the model to cite sources and say I do not know when context is missing, using low temperature, and validating outputs with rules or a second checking step. Measure it with a labelled evaluation set.
16

Your daily sales forecast badly misses the Diwali spike every year. How do you fix it?

Save to ▾
Show answer
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.
17

How do you detect and treat concept drift?

Save to ▾
Show answer
Monitor input distributions and live metrics, compare to training baselines, and retrain or recalibrate on fresh data when performance drops.
18

Halfway through a test you discover a bug that broke the treatment for Android users. What do you do?

Save to ▾
Show answer
Stop or pause the affected part, fix the bug and restart the test with fresh data, since mixing broken and fixed periods biases results. Do not simply drop Android users from analysis afterwards, because that can break randomisation balance if the bug affected behaviour or logging. Document the incident, and add pre-launch checks such as running the variant through QA on every platform and monitoring guardrails in the first hours.
19

Your LLM gives different summaries for the same document on different runs, but auditors need consistent output. What do you do?

Save to ▾
Show answer
Set temperature to zero or near zero and fix other sampling settings, and use a seed where the API supports it, though outputs may still vary slightly. Pin the exact model version. Use a structured output format with fixed fields, and reduce ambiguity in the prompt. Cache and store each generated output with its inputs and version, so the stored result, not a regeneration, is what auditors see.
20

What is bootstrapping in statistics?

Save to ▾
Show answer
Bootstrapping estimates the uncertainty of a statistic by resampling your data with replacement many times, computing the statistic on each resample, and looking at the spread of results. It gives confidence intervals for things with no simple formula, like the median, a ratio or a model metric such as AUC. It needs no normality assumption, but it relies on the sample being representative and can be slow on very large data.
21

Write Python code to compute the haversine distance between customer and store locations.

Save to ▾
Show answer
import numpy as np def haversine_km(lat1, lon1, lat2, lon2): lat1, lon1, lat2, lon2 = map(np.radians, [lat1, lon1, lat2, lon2]) dlat, dlon = lat2 - lat1, lon2 - lon1 a = np.sin(dlat / 2) ** 2 + np.cos(lat1) * np.cos(lat2) * np.sin(dlon / 2) ** 2 return 6371 * 2 * np.arcsin(np.sqrt(a)) df['dist_km'] = haversine_km(df.cust_lat, df.cust_lon, df.store_lat, df.store_lon)
22

What is a contrastive image-text model like CLIP, and how does it enable zero-shot classification?

Save to ▾
Show answer
CLIP trains an image encoder and a text encoder together on hundreds of millions of image-caption pairs, pulling matching pairs close in a shared embedding space and pushing mismatches apart. For zero-shot classification you embed prompts like 'a photo of a damaged parcel' for each class and pick the class whose text embedding is most similar to the image embedding. It works without task-specific training but may need fine-tuning for niche domains.
23

You must forecast demand for a new product that has only three weeks of history. What do you do?

Save to ▾
Show answer
Three weeks is too little to learn seasonality, so borrow information. Find similar past launches by category, price band and channel, and use their early sales curves as analogues. A global model trained across many products, with product attributes as features, can also forecast a cold-start item. Combine this with planned marketing spend and business judgement, show a wide interval, and update the forecast weekly as real data arrives.
24

How do you handle dates and time zones in Pandas?

Save to ▾
Show answer
Convert strings with pd.to_datetime, giving a format argument for speed and safety. Use the .dt accessor to pull year, month, weekday or hour. For time zones, first tz_localize naive timestamps to their real source zone, then tz_convert to a common zone such as UTC or Asia/Kolkata. Store data in UTC and convert only for reporting. Mixing naive and aware timestamps causes errors, so keep one convention across the pipeline.
25

How would you explain a statistical concept to a non-technical manager?

Save to ▾
Show answer
I start with the decision they care about, not the formula. Once a sales manager asked why a 3 percent lift was not significant. I explained that with only 200 customers, the result could easily happen by chance, like getting 6 heads in 10 coin tosses. I showed a simple range chart of the confidence interval and suggested running the test longer. He agreed, and the extended test gave a clear answer.
26

After one-hot encoding you have 2,000 features and training is slow. What do you do?

Save to ▾
Show answer
Find which columns caused the explosion, usually a few high-cardinality categoricals. Group rare categories into Other, or switch those columns to frequency, target or hashing encoding. Use sparse matrices so zeros take no memory. Tree libraries like LightGBM and CatBoost can handle categoricals natively without one-hot. Then remove near-constant columns and check that validation scores hold up with the smaller feature set.
27

Explain logistic regression.

Save to ▾
Show answer
It models the log-odds of a binary outcome as a linear function and passes it through a sigmoid to give probabilities, trained by maximising likelihood.
28

What is the receptive field of a neuron in a CNN?

Save to ▾
Show answer
The receptive field is the region of the input image that can influence one activation. Early layers see small patches like edges, and deeper layers see larger regions, enabling recognition of whole objects. It grows with kernel size, depth, stride and pooling, and dilated convolutions increase it without extra parameters. If the receptive field is smaller than the objects you care about, the network cannot capture their full context.
29

What is the difference between ROW_NUMBER, RANK and DENSE_RANK?

Save to ▾
Show answer
All three number rows within a window ordered by some column. ROW_NUMBER gives unique numbers even for ties: 1, 2, 3. RANK gives tied rows the same rank and skips the next numbers: 1, 1, 3. DENSE_RANK gives ties the same rank without gaps: 1, 1, 2. Use ROW_NUMBER to pick exactly one row per group, and DENSE_RANK for questions like the second highest distinct salary.
30

What is a neural network?

Save to ▾
Show answer
Layers of connected neurons that apply weights, biases and activation functions to learn complex patterns, trained by backpropagation.
31

What should you log for a production prediction service?

Save to ▾
Show answer
For each request, log a request ID, timestamp, model version, input features or a hash of them, the prediction and score, and latency. Log errors and fallback use separately. Do not log raw personal data unless needed and allowed; mask it. Aggregate these logs into dashboards for traffic, latency percentiles, error rate and score distribution. Joining logged predictions with later outcomes gives the data for monitoring and retraining.
32

Your logging system was down for four days, leaving gaps in a daily series. How do you handle them before modelling?

Save to ▾
Show answer
First make the gaps explicit by reindexing to a full daily calendar so missing days appear as NaN instead of silently disappearing. For short gaps, linear or time-based interpolation is usually fine. If there is strong weekly seasonality, fill using the same weekday from neighbouring weeks or a seasonal decomposition. Add a flag column marking imputed days, and never treat missing as zero unless zero really happened.
33

What is the bias–variance trade-off?

Save to ▾
Show answer
Bias is error from overly simple assumptions (underfitting). Variance is sensitivity to the training data (overfitting). More model complexity lowers bias but raises variance — aim for the lowest total error using cross-validation and regularization.
34

What are quantile and power transforms such as Box-Cox and Yeo-Johnson, and when do you use them?

Save to ▾
Show answer
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.
35

Write PyTorch code to fine-tune a pretrained ResNet-18 for a 5-class problem by replacing its final layer.

Save to ▾
Show answer
import torch, torch.nn as nn from torchvision import models model = models.resnet18(weights=models.ResNet18_Weights.DEFAULT) for p in model.parameters(): p.requires_grad = False # freeze backbone model.fc = nn.Linear(model.fc.in_features, 5) opt = torch.optim.AdamW(model.fc.parameters(), lr=1e-3) loss_fn = nn.CrossEntropyLoss() # train head first, then unfreeze later layers with a lower lr
36

How do you pull large data from a SQL database into Pandas efficiently?

Save to ▾
Show answer
Push as much work as possible into SQL: filter, aggregate and select only needed columns before pulling. Use pd.read_sql with a SQLAlchemy engine and chunksize to stream large results. For very large extracts, export to Parquet from the warehouse and read that, which is much faster than row-by-row transfer. Set dtypes like category early, and never use SELECT star on a big table from a notebook.
37

Write Python code to calculate the sample size per group needed to detect a lift from 5 percent to 5.5 percent conversion.

Save to ▾
Show answer
from statsmodels.stats.power import NormalIndPower from statsmodels.stats.proportion import proportion_effectsize baseline, target = 0.05, 0.055 effect = proportion_effectsize(target, baseline) # Cohen's h n = NormalIndPower().solve_power( effect_size=effect, alpha=0.05, power=0.8, ratio=1.0, alternative='two-sided' ) print(round(n)) # about 31,000 users per group
38

Tell me about a time you deployed a model under a tight deadline.

Save to ▾
Show answer
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.
39

A Pandas merge suddenly returns many more rows than the left table had. What happened?

Save to ▾
Show answer
The join key is probably not unique on the right side, so each left row matches several right rows and the result multiplies. Check with right['key'].duplicated().sum(). Other causes are null or blank keys matching each other after cleaning, or joining on the wrong column. Fix it by deduplicating or aggregating the right table first, and use merge(..., validate='many_to_one') so Pandas raises an error when the assumption breaks.
40

How do you handle imbalanced classes?

Save to ▾
Show answer
Use stratified splits, class weights, resampling such as SMOTE, threshold tuning and judge models with precision, recall, F1 or PR-AUC instead of accuracy.

Tips to crack the ZS Associates Data Science interview

  • Learn pharma commercial basics like sales force effectiveness, market share and prescriber data for case questions.
  • Practise case interviews and guesstimates with a clear structure, as consulting rounds are central at ZS.
  • Revise Excel, SQL and basic statistics, since associate roles involve heavy data analysis.
  • 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; ZS Associates interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the ZS Associates Data Science interview?

Candidates usually go through 5 stages: Online assessment (aptitude + analytics); Case interview; 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 ZS Associates Data Science interview?

This practice set leans on Machine Learning (7), Time Series & Forecasting (6), Python for Data Science (5), Computer Vision (4). Revise those first, then practise explaining one or two of your own projects end to end, because most ZS Associates interviewers ask you to walk through real work.

Are these the exact questions asked at ZS Associates?

No. These are curated practice questions that match the skills and difficulty usually tested in consulting interviews like ZS Associates's. They are not a leaked or verified list of past questions.

Where does ZS Associates hire Data Science professionals in India?

ZS Associates has large teams in Pune, Gurugram, Bengaluru. Openings and locations change often, so check the ZS Associates careers page and filter by city and experience.

Data Science questions for similar companies