কোথা থেকে শুরু করব, আর কতটুকু পড়ব?

Data Science interview-এর প্রস্তুতি নিতে গিয়ে সবচেয়ে পরিচিত সমস্যাটি হলো—কোথা থেকে শুরু করব, আর কতটুকু পড়ব?

একদিকে Statistics ও Probability, অন্যদিকে Machine Learning, Python, SQL এবং Production ML। Topic-এর তালিকা যত বড় হয়, preparation তত সহজে এলোমেলো হয়ে যায়। তখন অনেকেই definition ও formula মুখস্থ করেন; কিন্তু interviewer প্রশ্নটি একটু ঘুরিয়ে করলেই উত্তর আটকে যায়।

এই সমস্যা কমানোর জন্য আমি একটি বই লিখছি: Data Science Interview-এর 100+ Core Concepts। এখানে ১৩২টি গুরুত্বপূর্ণ concept এমনভাবে সাজানো হয়েছে, যাতে আপনি শুধু কী—তা নয়, কেন, কখন এবং কীভাবে—এই তিনটি দিকও বুঝতে পারেন।

প্রতিটি concept শেখার flow:

Concept → সহজ Intuition → Practical Example → প্রয়োজনীয় Formula → ব্যবহার ও সীমাবদ্ধতা → Interview-ready Explanation

Interviewer সাধারণত শুধু formula মনে আছে কি না, তা যাচাই করেন না। তিনি দেখতে চান আপনি concept-টি বুঝেছেন কি না এবং বাস্তব problem-এ সেটি প্রয়োগ করতে পারবেন কি না।

এই লেখায় Chapter 1 (Basic Statistics) থেকে দুটি concept পুরোটা দিচ্ছি, আর তৃতীয়টির শুরুটা।


Concept 1: Mean, Median এবং Mode

ধরুন পাঁচজন মানুষের মাসিক income:

20,000
25,000
30,000
35,000
2,00,000

এখন আমরা জানতে চাই, এই group-এর একটা “typical income” কত। এখানেই আসে Mean, Median এবং Mode।

Mean কী?

সব value যোগ করে total observation দিয়ে ভাগ।

Mean = (x₁ + x₂ + … + xₙ) / n

     = (20,000 + 25,000 + 30,000 + 35,000 + 2,00,000) / 5
     = 62,000

কিন্তু একটা সমস্যা দেখুন। চারজনের income 20–35 হাজারের মধ্যে, অথচ mean বলছে 62 হাজার। কারণ 2 লাখের value-টা mean-কে অনেক উপরে টেনে নিয়ে গেছে। এই extreme value-কে আমরা outlier বলতে পারি।

Median কী?

সব value ছোট থেকে বড় সাজিয়ে মাঝের value।

20k, 25k, 30k, 35k, 200k

Median = 30k

এখানে 30k group-টাকে 62k-এর চেয়ে অনেক ভালো represent করছে।

Mode কী?

যে value সবচেয়ে বেশি বার আসে।

10, 20, 20, 20, 30, 40

Mode = 20

Categorical data-তেও mode useful। যেমন:

Preferred Payment Method:
Cash, Cash, Card, Cash, bKash

Mode = Cash

কখন কোনটা ব্যবহার করব?

Situationব্যবহার করুন
Symmetric data, outlier কমMean
Skewed data বা strong outlierMedian
Most common value জানতেMode

Interviewer জিজ্ঞেস করতে পারে

“Why would you use median instead of mean?”

আপনি বলতে পারেন:

যদি data highly skewed হয় অথবা extreme outlier থাকে, mean খুব সহজে affected হয়। Median শুধু ordering-এর উপর depend করে, তাই সেই situation-এ median central tendency-এর better representation হতে পারে।

Salary, house price, delivery time-এর মতো data-তে এই situation অনেক দেখা যায়।


Concept 7: Simpson’s Paradox

Simpson’s Paradox প্রথমে একটু confusing মনে হতে পারে। তবে একটি simple example দেখলে বিষয়টি পরিষ্কার হয়ে যাবে।

ধরুন, আমরা দুইটি restaurant-এর delivery success rate compare করছি। Lunch এবং Dinner আলাদাভাবে দেখলে ফলাফল হলো:

Lunch:   Restaurant A → 90%    Restaurant B → 80%
Dinner:  Restaurant A → 70%    Restaurant B → 60%

অর্থাৎ দুইটি segment-এই Restaurant A > Restaurant B। এখন মনে হতে পারে overall success rate-ও অবশ্যই A-এর বেশি হবে।

কিন্তু সব order একসাথে combine করার পর দেখা গেল: Restaurant B-এর overall success rate বেশি।

কীভাবে এমন হতে পারে?

মূল কারণ: Group Distribution

সমস্যাটি restaurant-এর performance-এ নয়, বরং কোন restaurant কত ধরনের order পেয়েছে তার distribution-এ।

Restaurant A:  Lunch → 100 orders   Dinner → 900 orders
Restaurant B:  Lunch → 900 orders   Dinner → 100 orders

A-এর অধিকাংশ order এসেছে difficult dinner hours-এ। অন্যদিকে B-এর অধিকাংশ order এসেছে relatively easy lunch hours-এ। এবার হিসাবটা দেখুন:

Restaurant A
  Lunch   100 × 90% =  90 successful
  Dinner  900 × 70% = 630 successful
  Overall 720 / 1000 = 72%

Restaurant B
  Lunch   900 × 80% = 720 successful
  Dinner  100 × 60% =  60 successful
  Overall 780 / 1000 = 78%

A প্রতিটি segment-এই better। কিন্তু দুই restaurant-এর order distribution আলাদা হওয়ায় aggregate result উল্টো হয়ে গেছে। এটাই Simpson’s Paradox।

একই data-র subgroup এবং overall result একে অপরের বিপরীত হতে পারে। মূল বিষয় হলো group composition বা data distribution।

Lesson

শুধু overall metric দেখে সিদ্ধান্ত নেওয়া উচিত নয়। প্রয়োজনে গুরুত্বপূর্ণ segment অনুযায়ী data breakdown করতে হবে—যেমন zone, hour, customer type, device, restaurant type, new vs old users। তারপর দেখতে হবে overall result এবং subgroup result-এর মধ্যে কোনো গুরুত্বপূর্ণ difference আছে কি না।

A/B Testing, Recommendation Systems, Marketing ও Product Analytics, Medical Studies—সব জায়গাতেই এই ভুলটা হতে পারে।


Concept 8: Selection Bias (একটু ঝলক)

ধরুন, একটি mobile app-এর customer satisfaction measure করতে survey পাঠানো হলো। কিন্তু survey পাঠানো হলো শুধু daily active users-দের।

Result এলো:

95% customers satisfied!

দারুণ খবর, তাই না?

কিন্তু এই result-এ একটি বড় সমস্যা লুকিয়ে আছে। Hint: কারা survey পায়নি?

সমস্যাটা কী, আর একটি loan default prediction model-এ ঠিক এই একই ভুল কীভাবে চুপচাপ ঢুকে পড়ে—পুরো ব্যাখ্যা ও interview answer থাকছে বইয়ে।


Chapter 1-এ আরও যা আছে

  • Variance এবং Standard Deviation — distance-কে কেন square করি?
  • Covariance এবং Correlation — covariance-এর সমস্যা কোথায়?
  • Population এবং Sample — parameter বনাম statistic
  • Nominal, Ordinal, Discrete এবং Continuous Data
  • Outliers — Z-score নাকি IQR?
  • Selection Bias — পুরো ব্যাখ্যা ও Machine Learning example

এরপর Chapter 2-তে Hypothesis Testing: Null vs Alternative Hypothesis, Z-test, T-test, p-value এবং আরও অনেক কিছু।

বইটি সম্পূর্ণ free

Data Science Interview-এর 100+ Core Concepts সম্পূর্ণ free হিসেবে প্রকাশিত হবে। Release-এর খবর সবার আগে পেতে LinkedIn-এ follow করুন। কোন concept নিয়ে সবচেয়ে বেশি confusion হয়, comment-এ জানান—বইয়ে সেটা আরও ভালোভাবে explain করার চেষ্টা করব।

Where do I start, and how much do I study?

Anyone preparing for a Data Science interview runs into the same problem: where do I start, and how much is enough?

On one side there’s Statistics and Probability; on the other, Machine Learning, Python, SQL and Production ML. The longer the topic list gets, the more scattered the preparation becomes. Many people end up memorising definitions and formulas, and then freeze the moment the interviewer asks the question from a slightly different angle.

I’m writing a book to fix exactly that: 100+ Core Concepts for Data Science Interviews (written in Bangla). It covers 132 important concepts, arranged so that you understand not just what each one is, but also why, when and how to use it.

Every concept follows the same flow:

Concept → Simple Intuition → Practical Example → Essential Formula → Uses & Limitations → Interview-ready Explanation

Interviewers rarely check whether you remember a formula. They want to see whether you understand the concept, and whether you can apply it to a real problem.

In this article I’m sharing two complete concepts from Chapter 1 (Basic Statistics), plus the opening of a third.


Concept 1: Mean, Median and Mode

Say five people have these monthly incomes (in BDT):

20,000
25,000
30,000
35,000
200,000

We want to know the “typical income” of this group. That’s where Mean, Median and Mode come in.

What is the mean?

Add up all the values and divide by the number of observations.

Mean = (x₁ + x₂ + … + xₙ) / n

     = (20,000 + 25,000 + 30,000 + 35,000 + 200,000) / 5
     = 62,000

But notice the problem. Four of the five people earn between 20k and 35k, yet the mean says 62k. The single 200k value has dragged the mean far upwards. We call an extreme value like this an outlier.

What is the median?

Sort the values from smallest to largest and take the middle one.

20k, 25k, 30k, 35k, 200k

Median = 30k

Here 30k represents the group far better than 62k does.

What is the mode?

The value that appears most often.

10, 20, 20, 20, 30, 40

Mode = 20

The mode also works for categorical data. For example:

Preferred Payment Method:
Cash, Cash, Card, Cash, bKash

Mode = Cash

When should I use which?

SituationUse
Symmetric data, few outliersMean
Skewed data or strong outliersMedian
You want the most common valueMode

What the interviewer might ask

“Why would you use median instead of mean?”

You could say:

If the data is highly skewed or has extreme outliers, the mean is easily pulled away from the centre. The median depends only on the ordering of the values, so in that situation it can be a better representation of central tendency.

You see this all the time with salaries, house prices and delivery times.


Concept 7: Simpson’s Paradox

Simpson’s Paradox can feel confusing at first, but one simple example makes it clear.

Say we’re comparing the delivery success rate of two restaurants. Looking at lunch and dinner separately:

Lunch:   Restaurant A → 90%    Restaurant B → 80%
Dinner:  Restaurant A → 70%    Restaurant B → 60%

So in both segments, Restaurant A > Restaurant B. Surely A’s overall success rate must be higher too?

But when we combine all the orders: Restaurant B has the higher overall success rate.

How is that possible?

The real cause: group distribution

The issue isn’t the restaurants’ performance. It’s how each restaurant’s orders are distributed across the segments.

Restaurant A:  Lunch → 100 orders   Dinner → 900 orders
Restaurant B:  Lunch → 900 orders   Dinner → 100 orders

Most of A’s orders came during the difficult dinner rush, while most of B’s came during the relatively easy lunch hours. Now look at the numbers:

Restaurant A
  Lunch   100 × 90% =  90 successful
  Dinner  900 × 70% = 630 successful
  Overall 720 / 1000 = 72%

Restaurant B
  Lunch   900 × 80% = 720 successful
  Dinner  100 × 60% =  60 successful
  Overall 780 / 1000 = 78%

A is better in every segment. But because the two restaurants have different order distributions, the aggregate result flips. That is Simpson’s Paradox.

Subgroup results and the overall result from the same data can point in opposite directions. The key is group composition, i.e. how the data is distributed.

The lesson

Don’t make decisions from an overall metric alone. Where it matters, break the data down by important segments, such as zone, hour, customer type, device, restaurant type, or new vs returning users. Then check whether the subgroup results tell a different story from the overall one.

This mistake can happen anywhere: A/B testing, recommendation systems, marketing and product analytics, medical studies.


Concept 8: Selection Bias (a sneak peek)

Say a mobile app sends a survey to measure customer satisfaction. But the survey only goes to daily active users.

The result:

95% customers satisfied!

Great news, right?

Except this result hides a big problem. Hint: who never received the survey?

What the problem is, and how the exact same mistake quietly creeps into a loan default prediction model, is explained in full in the book, along with the interview answer.


What else is in Chapter 1

  • Variance and Standard Deviation: why do we square the distances?
  • Covariance and Correlation: what’s wrong with covariance on its own?
  • Population and Sample: parameters vs statistics
  • Nominal, Ordinal, Discrete and Continuous Data
  • Outliers: Z-score or IQR?
  • Selection Bias: the full explanation and a Machine Learning example

Then Chapter 2 moves on to Hypothesis Testing: null vs alternative hypotheses, the Z-test, the T-test, p-values and much more.

The book is completely free

100+ Core Concepts for Data Science Interviews will be released completely free. To hear about the release first, follow me on LinkedIn. And tell me in the comments which concept confuses you most; I’ll do my best to explain it even better in the book.