Top Data Scientist Interview Questions Asked at TCS

If you are preparing for a data science role at Tata Consultancy Services, you need more than a list of definitions. The panel checks three things: your statistics and machine learning basics, your ability to write clean Python and SQL on the spot, and your ability to explain a project you built yourself.
This guide covers the Data Scientist interview questions asked at TCS across all three areas, with short answers you can adapt, code you can practise and tips from our trainers at GrowthIntelliLabs in KPHB, Hyderabad.
Table of Contents
ToggleWhat Are Data Scientist Interview Questions Asked at TCS?
These are the technical and behavioural questions TCS interviewers use to judge whether you can turn messy business data into something a client can act on. TCS serves clients across banking, retail, healthcare and manufacturing, so interviewers prefer candidates who understand the full data lifecycle: collecting and cleaning data, building a model, checking it properly and explaining the result in plain language.
Expect questions in five groups:
- Statistics and machine learning concepts
- Python coding problems
- SQL queries
- Questions about your own projects
- HR and behavioural questions
How the TCS Hiring Process Works
Rounds change by role, year and hiring route, so always confirm the latest details on the TCS careers page. A typical pattern looks like this:
- Online assessment. For freshers, the TCS NQT places candidates into the Ninja, Digital or Prime track based on test performance. Lateral hires usually face a technical test with aptitude, coding and data questions.
- Technical interview. The interviewer reads your resume line by line and asks about the tools, models and data you listed. Digital and Prime candidates face a higher bar, with harder coding and more depth on projects.
- Project review. Candidates aiming for higher tracks are commonly asked to walk through an AI or data project: the problem, the data source, the model, the metrics and how it could be deployed.
- HR interview. This covers communication, location flexibility, teamwork and your expectations.
The rest of this guide follows the same order, so you can prepare round by round.
Data Scientist Interview Questions Asked at TCS: Machine Learning and Statistics
1. What is cross-validation and why do we use it?
Cross-validation splits the data into k folds. The model trains on k minus 1 folds and tests on the remaining fold, and the process repeats until every fold has been the test set once. You then average the scores.
It gives a more reliable estimate of performance than one train-test split and helps you spot overfitting early. It is especially useful when data is limited. See the scikit-learn cross-validation guide for the standard implementation.
2. What is a p-value?
A p-value is the probability of seeing results at least as extreme as yours, assuming the null hypothesis is true. If the p-value is below your significance level (commonly 0.05), you reject the null hypothesis.
Give a business example. For instance, test whether a new onboarding flow improves conversion. A small p-value says the difference is unlikely to be random noise. It does not say the effect is large or important.
3. Explain the steps in a typical data science project.
Define the business problem, collect and understand the data, clean and preprocess it, explore it, engineer features, train and tune models, evaluate with the right metrics, deploy and monitor, then communicate results to stakeholders. Mention that the process is iterative, because TCS interviewers like candidates who describe feedback loops, not a straight line.
4. How do you handle missing data?
First find out why the data is missing: completely at random, related to other columns, or related to the missing value itself. Then choose a method:
- Drop rows or columns when very little data is missing and the pattern is random
- Impute with mean, median or mode for simple cases
- Use KNN or model based imputation when relationships matter
- Add a missing indicator column when the absence itself carries information
Always fit imputers on the training set only, then apply them to the test set. That avoids data leakage.
5. What is the difference between supervised and unsupervised learning?
Supervised learning uses labelled data to predict an outcome, such as churn or house price. Unsupervised learning finds structure in unlabelled data, such as customer segments through clustering. Give one example of each from your own project.
6. What is the Central Limit Theorem and why does it matter?
The distribution of sample means approaches a normal distribution as the sample size grows, whatever the shape of the original data. This is why confidence intervals and many hypothesis tests work on real data that is not perfectly normal.
7. What is overfitting and how do you prevent it?
Overfitting means the model memorises noise in the training data and fails on new data. Prevent it with cross-validation, regularisation (L1 or L2), simpler models, pruning for trees, early stopping for neural networks, more data and feature selection.
8. What are Type I and Type II errors?
A Type I error is a false positive: you reject a true null hypothesis. A Type II error is a false negative: you fail to reject a false null hypothesis. In a fraud model, a false positive blocks a genuine customer, while a false negative lets fraud through. The cost of each decides where you set your threshold.
9. What is regularisation?
Regularisation adds a penalty on large coefficients to the loss function. L1 (lasso) can shrink some coefficients to exactly zero, which works as feature selection. L2 (ridge) shrinks coefficients smoothly and reduces variance.
10. What is the bias variance tradeoff?
High bias means the model is too simple and underfits. High variance means it is too sensitive to the training data and overfits. You look for the point where total error on unseen data is lowest.
11. How do you evaluate a classification model?
Start with the confusion matrix. Then use precision, recall and F1 for imbalanced data, and ROC AUC or PR AUC to compare models across thresholds. Accuracy alone is misleading when one class is rare, such as a 1% fraud rate.
12. What is the difference between bagging and boosting?
Bagging trains many models in parallel on random samples and averages them, which reduces variance. Random forest is the classic example. Boosting trains models one after another, with each model focusing on the errors of the previous one, which reduces bias. Gradient boosting and XGBoost are common examples.
13. How would you explain feature engineering?
Feature engineering creates or transforms inputs so the model can learn better: encoding categories, scaling numbers, creating ratios, extracting date parts and combining columns. Good features often improve results more than switching algorithms.
14. What assumptions does linear regression make?
Linearity, independent errors, constant variance of residuals, roughly normal residuals and no severe multicollinearity. Mention how you would check each one: residual plots, a Q-Q plot and variance inflation factor.
15. How would you make your analysis reproducible?
Use Git for code, fix random seeds, pin library versions in a virtual environment or Docker image, document data sources and cleaning steps and keep the pipeline in scripts or notebooks that run end to end.
Python Coding Questions TCS May Ask
TCS interviewers often ask for short, clean solutions and then ask about time complexity. Practise these without autocomplete.
1. Check whether a string is a palindrome
def is_palindrome(s):
cleaned = "".join(ch.lower() for ch in s if ch.isalnum())
return cleaned == cleaned[::-1]
print(is_palindrome("A man, a plan, a canal: Panama")) # TrueTime complexity is O(n). Be ready to explain why you strip punctuation first.
2. Find the first repeating element in a list
def first_repeat(nums):
seen = set()
for n in nums:
if n in seen:
return n
seen.add(n)
return None
print(first_repeat([4, 2, 7, 2, 9, 4])) # 2A set gives O(1) average lookups, so the whole function runs in O(n). Mention that a nested loop would be O(n squared).
3. Count word frequency and return the top 3
from collections import Counter
def top_words(text, k=3):
words = text.lower().split()
return Counter(words).most_common(k)
print(top_words("data science data model data science"))4. Clean a DataFrame and compute average salary by department
import pandas as pd
df = pd.read_csv("employees.csv")
df = df.drop_duplicates()
df["salary"] = df["salary"].fillna(df["salary"].median())
result = (
df.groupby("department", as_index=False)["salary"]
.mean()
.sort_values("salary", ascending=False)
)
print(result)Expect follow up questions: why median instead of mean, what happens with outliers and how you would handle a column stored as text.
SQL Questions TCS May Ask
SQL is mandatory for most data roles at TCS. These four patterns cover a large share of what candidates report.
1. Find the second highest salary
SELECT salary
FROM (
SELECT salary, DENSE_RANK() OVER (ORDER BY salary DESC) AS rnk
FROM employees
) t
WHERE rnk = 2;Explain why DENSE_RANK is safer than ROW_NUMBER when two people share the top salary.
2. Find duplicate records
SELECT email, COUNT(*) AS occurrences
FROM customers
GROUP BY email
HAVING COUNT(*) > 1;3. Find customers who never placed an order
SELECT c.customer_id, c.customer_name
FROM customers c
LEFT JOIN orders o ON o.customer_id = c.customer_id
WHERE o.customer_id IS NULL;4. Calculate a running total of monthly revenue
SELECT
order_month,
revenue,
SUM(revenue) OVER (ORDER BY order_month) AS running_revenue
FROM monthly_sales;Be ready to explain the difference between WHERE and HAVING, and between INNER JOIN and LEFT JOIN, using a small example on a whiteboard.
Project Round Questions
Interviewers use your project to test whether you really built the work. Prepare clear answers to these:
- What business problem did the project solve, and who would use the result?
- Where did the data come from, and how large was it?
- What cleaning problems did you find, and how did you fix them?
- Why did you choose this model over the alternatives?
- Which metric did you optimise, and why that one?
- How did you check for overfitting and data leakage?
- How would you deploy the model and monitor it after launch?
- What would you change if you had two more weeks?
Build at least one end to end project with a real dataset, a clear problem statement, a tested model and a short write up. Coursework with no business context rarely holds up under follow up questions.
HR Round Questions
- Tell me about yourself and why data science.
- Why TCS?
- Describe a time you worked in a team and handled a disagreement.
- Are you comfortable relocating or working in shifts?
- Where do you see yourself in three years?
Keep answers short, specific and honest. Use one real example per answer.
Tips to Stand Out in the TCS Interview
- Know your resume. Every tool and library you list is fair game.
- Explain the why. Say why you chose a method, not only what it does.
- Practise on paper. Write SQL and Python without an editor to build speed and accuracy.
- Think about the client. Link each answer to a business result such as lower churn or fewer defects.
- Use simple language. If you can explain a model to a non technical manager, you are ready.
- State trade offs. Say what a method costs, not only what it gains.
- Run mock interviews. Practise out loud with a friend or trainer and ask for blunt feedback.
Prepare for a TCS Data Science Interview at GrowthIntelliLabs
GrowthIntelliLabs is a data analytics and AI training institute in KPHB, Hyderabad. Our data science training covers Python, SQL, statistics, machine learning and project work, so you can walk into an interview with a project you built and understand. Explore our data science course in Hyderabad or talk to our team about the right program for your background.
Conclusion
TCS data science interviews reward candidates who combine solid fundamentals with clear communication. Learn the statistics and machine learning basics, practise Python and SQL by hand, build one project you can defend and prepare short, honest answers for the HR round. Start with the questions in this guide, time yourself and repeat until the answers feel natural.
FAQs
Candidates commonly report questions on cross-validation, overfitting, missing data, hypothesis testing, classification metrics, SQL joins and window functions, Python coding problems and a walkthrough of a personal project.
It varies by role and hiring route. Most candidates face an online assessment, a technical interview, a project discussion for higher tracks and an HR interview. Check the latest details on the TCS careers page.
Yes. Expect Python problems on strings, lists, dictionaries and pandas, plus SQL queries using joins, grouping and window functions. Interviewers often ask about time complexity.
You need a firm grasp of descriptive statistics, probability, distributions, hypothesis testing, confidence intervals and regression. You do not need advanced research level mathematics, but you must explain how these ideas support your model results.
Yes, if you can show strong fundamentals and at least one end to end project. Clean code, sound validation and clear explanations matter more than a long list of tools.
Python with pandas, NumPy and scikit-learn, SQL, and a visualisation tool such as Power BI or Tableau. Basic knowledge of Git and cloud platforms is a useful bonus.

