TGViewer
Data Analytics & AI | SQL Interviews | Power BI Resources Data Analytics & AI | SQL Interviews | Power BI Resources @data_visual · 27.5K subscribers
Post #551 795
DATA SCIENCE INTERVIEW QUESTIONS WITH ANSWERS


1. What are the assumptions required for linear regression? What if some of these assumptions are violated?

Ans: The assumptions are as follows:

The sample data used to fit the model is representative of the population

The relationship between X and the mean of Y is linear

The variance of the residual is the same for any value of X (homoscedasticity)

Observations are independent of each other

For any value of X, Y is normally distributed.

Extreme violations of these assumptions will make the results redundant. Small violations of these assumptions will result in a greater bias or variance of the estimate.


2.What is multicollinearity and how to remove it?

Ans: Multicollinearity exists when an independent variable is highly correlated with another independent variable in a multiple regression equation. This can be problematic because it undermines the statistical significance of an independent variable.

You could use the Variance Inflation Factors (VIF) to determine if there is any multicollinearity between independent variables — a standard benchmark is that if the VIF is greater than 5 then multicollinearity exists.


3. What is overfitting and how to prevent it?

Ans: Overfitting is an error where the model ‘fits’ the data too well, resulting in a model with high variance and low bias. As a consequence, an overfit model will inaccurately predict new data points even though it has a high accuracy on the training data.

Few approaches to prevent overfitting are:

- Cross-Validation:Cross-validation is a powerful preventative measure against overfitting. Here we use our initial training data to generate multiple mini train-test splits. Now we use these splits to tune our model.

- Train with more data: It won’t work every time, but training with more data can help algorithms detect the signal better or it can help my model to understand general trends in particular.

- We can remove irrelevant information or the noise from our dataset.

- Early Stopping: When you’re training a learning algorithm iteratively, you can measure how well each iteration of the model performs.

Up until a certain number of iterations, new iterations improve the model. After that point, however, the model’s ability to generalize can weaken as it begins to overfit the training data.

Early stopping refers stopping the training process before the learner passes that point.

- Regularization: It refers to a broad range of techniques for artificially forcing your model to be simpler. There are mainly 3 types of Regularization techniques:L1, L2,&,Elastic- net.

- Ensembling : Here we take number of learners and using these we get strong model. They are of two types : Bagging and Boosting.


4. Given two fair dices, what is the probability of getting scores that sum to 4 and 8?

Ans: There are 4 combinations of rolling a 4 (1+3, 3+1, 2+2):
P(rolling a 4) = 3/36 = 1/12

There are 5 combinations of rolling an 8 (2+6, 6+2, 3+5, 5+3, 4+4):
P(rolling an 8) = 5/36

ENJOY LEARNING 👍👍
  • ❤ 2
  • 👍 1
More from @data_visual
  1. Oct 2, 2026Data Analyst Roadmap
  2. Sep 28, 2026🎯 GigaChat 3.5 Reasoning: 5 Key Features 1️⃣ Advanced Reasoning: Explores multiple step-b…
  3. Sep 23, 2026🚀 The 10 Levels of AI Agents — Where We Stand Today AI isn’t a single goal — it’s an evol…
  4. Sep 14, 2026AI tools to increase your productivity in 2026 👇 1/ Granola: AI meeting notes that captur…
  5. Sep 6, 2026Data Analyst interviews will be easier if you learn these tools in sequence: ➤ 𝗗𝗮𝘁𝗮 𝗙…
  6. Aug 29, 2026SQL Joins — A Practical Cheatsheet for Professionals If you’re working with relational dat…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →