Mphasis Data Science Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Mphasis hiring for Data Science roles
Mphasis is an Indian IT services company, majority-owned by Blackstone, providing cloud, application, testing, data and cognitive services. It has a strong presence in banking, financial services and insurance clients. In India it hires for software engineers, test engineers, data analysts and data engineers, often for BFSI-focused projects.
For Data Science roles, this Mphasis practice set focuses most on Machine Learning (7), Time Series & Forecasting (6), Statistics and Probability (5), Python for Data Science (4). It has 17 easy, 23 medium questions, so you can start easy and work up to the harder ones.
Company type
IT services
Headquarters
Bengaluru, India
Main India offices
Bengaluru, Pune, Chennai
Mphasis Data Science interview process
Online assessment (aptitude + reasoning)
Coding test
Technical interview
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for MphasisStart 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.
It combines gradient boosting with regularisation, handling of missing values, parallel tree construction and speed optimisations, and it performs strongly on tabular data.
02
Write SQL to find duplicate emails in a users table.
Categories that appear only a few times give unreliable signals and create many sparse columns. A common fix is to group all categories below a frequency threshold, like 1 percent, into an Other bucket. You can also use frequency encoding or smoothed target encoding. Make sure the encoder handles unseen categories at prediction time, for example with handle_unknown set to ignore.
05
What is the difference between bagging and boosting?
Bagging trains models in parallel on bootstrap samples and averages them (reduces variance, e.g. Random Forest). Boosting trains models one after another, each fixing the previous errors (reduces bias, e.g. XGBoost).
06
What is an Overall Evaluation Criterion (OEC) in experimentation?
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.
Differencing replaces each value with the change from the previous value: y_t minus y_(t-1). It removes a linear trend and often makes a series stationary. Seasonal differencing subtracts the value one season back, such as y_t minus y_(t-7) for daily data with a weekly cycle. Avoid over-differencing, because it adds noise and negative autocorrelation. In ARIMA, the d parameter is the number of times you difference.
The rule that lets arrays of different shapes operate together by virtually stretching the smaller one, for example adding a scalar or a (3,) vector to a (4,3) matrix.
09
Pandas: compute a 7-day rolling average of daily sales for each store.
pickle serialises Python objects; it is simple but tied to Python and library versions, and loading untrusted pickle files is a security risk. joblib is similar but more efficient for objects with large NumPy arrays, like scikit-learn models. ONNX is an open, language-neutral format that runs in optimised runtimes across languages and hardware, useful for fast serving. Always store library versions alongside pickle or joblib files.
11
What is stationarity and why do many forecasting models need it?
A stationary series has a constant mean, constant variance and an autocorrelation structure that does not change over time. Classical models like ARMA assume stationarity because they learn fixed relationships between past and present values; if the mean keeps drifting, those relationships break. You usually make a series stationary by differencing to remove trend, seasonal differencing to remove seasonality, and a log transform to stabilise growing variance.
Recursive feature elimination trains a model, ranks features by importance or coefficient size, removes the weakest ones, and repeats until the desired number remains. RFECV picks the number of features using cross-validation. It considers features together rather than one at a time. The downsides are high compute cost on large data and unstable results when features are correlated, so check stability across folds.
13
Write Python code to decompose a monthly series into trend, seasonal and residual parts with STL.
Use the IQR rule (below Q1-1.5 IQR or above Q3+1.5 IQR), z-scores beyond 3, box plots or model-based methods such as Isolation Forest, then decide whether to cap, remove or keep them.
15
How does K-means clustering work and how do you choose k?
A DAG, directed acyclic graph, in Apache Airflow defines a workflow as tasks with dependencies, such as extract data, build features, train model and publish scores, in that order. Airflow schedules runs, retries failed tasks, passes run dates and shows status in a web UI. Acyclic means no task can loop back to an earlier one. Data scientists use it for scheduled training and batch scoring pipelines.
17
What is the difference between a one-tailed and a two-tailed test?
A two-tailed test checks for a difference in either direction, for example whether a new page changes conversion up or down. A one-tailed test checks only one direction, such as whether it increases conversion. One-tailed tests have more power for that direction but ignore harm in the other direction. In most product experiments a two-tailed test is the safer default unless the direction was fixed before seeing data.
18
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.
19
Write scikit-learn code to calibrate a gradient boosting classifier's probabilities and check the result.
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.
It lets a model weigh which input positions matter most for each output, computing weighted combinations of values from query-key similarity. It is the core of transformers.
23
What is DBSCAN and when is it better than K-means?
DBSCAN is a density-based clustering algorithm. It groups points that have at least min_samples neighbours within distance eps, and marks isolated points as noise. Unlike K-means, it does not need the number of clusters, finds clusters of any shape, and handles outliers. It struggles when clusters have very different densities and in high dimensions. It suits location data, like finding delivery hotspots from GPS points.
24
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.
A range built from sample data that would contain the true parameter in a stated percentage (for example 95%) of repeated samples. It is not the probability that the parameter lies inside this one interval.
27
What is standard deviation and what does it tell you?
Function calling lets an LLM respond with a structured request to call a tool you defined, such as get_order_status with an order_id, instead of plain text. Your code runs the function, returns the result to the model, and the model uses it in its final answer. This connects LLMs to live data, calculators and APIs. You must validate arguments, limit which tools exist and handle errors, because the model can choose wrong inputs.
29
Users say your internal chatbot gives outdated policy answers. What is the likely cause and fix?
The knowledge index probably still holds old document versions, or the model is answering from its training data instead of retrieved context. Fix the ingestion pipeline to re-index on document change and remove superseded versions. Store effective dates in metadata and filter or boost the latest. Instruct the model to answer only from provided context and show the source with its date, so users can verify it.
30
Your experiment ended with no statistically significant difference. What do you tell the team?
Not significant does not mean no effect. Report the observed effect with its confidence interval, for example minus 0.3 to plus 1.2 percent, and compare it with the MDE the test was powered for. If the interval rules out effects that matter, conclude the change has little impact and decide based on cost or design preference. If the interval is wide, the test was underpowered, and a longer test or variance reduction may help.
A symmetric bell-shaped distribution defined by mean and standard deviation, where about 68%, 95% and 99.7% of values lie within 1, 2 and 3 standard deviations.
The novelty effect is when users engage more with a change simply because it is new, so early results overstate the long-term lift. The primacy effect is the opposite: existing users resist change at first, so early results understate it. Both fade with time. To detect them, plot the treatment effect by day and by user tenure, compare new users with existing users, and run the test long enough for behaviour to settle.
34
Write Python code to evaluate a forecasting model with expanding-window time series cross-validation.
import numpy as np
from sklearn.model_selection import TimeSeriesSplit
from sklearn.metrics import mean_absolute_error
tscv = TimeSeriesSplit(n_splits=5, test_size=28)
scores = []
for tr, te in tscv.split(X):
model.fit(X.iloc[tr], y.iloc[tr])
pred = model.predict(X.iloc[te])
scores.append(mean_absolute_error(y.iloc[te], pred))
print(np.mean(scores), scores)
35
Write SQL to find the top 3 products by revenue in each category.
WITH rev AS (
SELECT category, product_id, SUM(price * qty) AS revenue
FROM order_items
GROUP BY category, product_id
), ranked AS (
SELECT *, ROW_NUMBER() OVER (PARTITION BY category ORDER BY revenue DESC) AS rn
FROM rev
)
SELECT category, product_id, revenue
FROM ranked
WHERE rn <= 3;
36
Write Python code for a two-proportion z-test comparing conversion between control and treatment.
Tokens are the pieces of text an LLM reads and writes, often word parts; in English, one token is roughly three quarters of a word. The context window is the maximum number of tokens the model can consider at once, including your prompt, any documents and its answer. Costs and speed depend on token counts. Long documents beyond the window must be chunked, summarised or retrieved selectively.
39
When would you use MAE, MSE or RMSE for a regression model?
MAE is the average absolute error; it is easy to explain and less sensitive to outliers. MSE squares errors, so large errors are punished heavily, and it is smooth for optimisation. RMSE is the square root of MSE, so it is in the same units as the target while still punishing big misses. Use RMSE when large errors are very costly, like stock-out forecasts, and MAE when outliers should not dominate.
40
What should you log for a production prediction service?
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.
Tips to crack the Mphasis Data Science interview
Learn BFSI basics such as banking transactions, insurance claims and mortgages, since many Mphasis clients are in this domain.
Revise testing concepts, SQL and one programming language well for technical interviews.
Read about Mphasis's Front2Back transformation approach, which the company uses to describe its service model.
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; Mphasis interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Mphasis Data Science interview?
Candidates usually go through 4 stages: Online assessment (aptitude + reasoning); Coding test; Technical interview; 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 Mphasis Data Science interview?
This practice set leans on Machine Learning (7), Time Series & Forecasting (6), Statistics and Probability (5), Python for Data Science (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Mphasis interviewers ask you to walk through real work.
Are these the exact questions asked at Mphasis?
No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like Mphasis's. They are not a leaked or verified list of past questions.
Where does Mphasis hire Data Science professionals in India?
Mphasis has large teams in Bengaluru, Pune, Chennai. Openings and locations change often, so check the Mphasis careers page and filter by city and experience.