Imagine you're a detective who just got a box full of random puzzle pieces (your dataset). Before you start building the puzzle (machine learning model), you need to:
Dump out the pieces and count them (how many rows/columns?)
Sort by color and shape (univariate: what does each variable look like?)
Find which pieces connect (bivariate: do age and income relate?)
Make guesses about the final picture (hypothesis: what patterns will help?)
Show your findings to teammates (communication: share visualizations)
That's EDA! You're understanding your data deeply before jumping into building models. Just like you wouldn't start a puzzle without sorting pieces first, you don't start machine learning without EDA.
What are the six stages of the EDA workflow? :: 1) Data Collection & Loading, 2) Univariate Analysis, 3) Bivariate/Multivariate Analysis, 4) Data Quality Assessment, 5) Hypothesis Generation, 6) Communication
What is the formula for Pearson correlation coefficient?
r=∑i=1n(xi−xˉ)2∑i=1n(yi−yˉ)2∑i=1n(xi−xˉ)(yi−yˉ) or equivalently r=σXσYCov(X,Y)
Why do we divide the third moment by σ3 to calculate skewness?
To make it scale-invariant. Raw third moment E[(X−μ)3] depends on the units of X; dividing by σ3 standardizes it so skewness is comparable across different scales.
What is the IQR outlier detection rule?
Outliers are values below Q1−1.5×IQR or above Q3+1.5×IQR, where IQR=Q3−Q1
When does Pearson correlation fail to detect relationships?
When the relationship is non-linear. Pearson only measures linear association. A perfect parabola (Y = X²) can have r ≈ 0. Use scatterplots or Spearman rank correlation for non-linear monotonic relationships.
What are the three types of missing data patterns?
1) MCAR (Missing Completely At Random), 2) MAR (Missing At Random given other variables), 3) MNAR (Missing Not At Random - missingness depends on unobserved values)
What does positive skewness tell you about mean vs median?
Positive skewness (right tail) means mean > median. The tail pulls the mean upward while median remains resistant to outliers.
What is the difference between correlation and causation?
Correlation measures statistical association between variables. Causation means one variable directly causes changes in another. Correlation can exist due to confounding variables (both caused by a third factor) without causation.
Why use median instead of mean for imputing missing values?
Median is robust to outliers. If data has extreme values, mean gets pulled toward outliers, giving a distorted central tendency. Median represents the "typical" value better for skewed distributions.
What is multicollinearity and why does it matter?
Multicollinearity is high correlation (r > 0.8-0.9) between predictor variables. It makes regression coefficients unstable and difficult to interpret, inflates standard errors, and causes numerical issues in matrixversion.
What does a correlation matrix heatmap reveal quickly?
1) Which features are redundant (high correlation pairs), 2) Which features correlate with target variable (predictive power), 3) Multicollinearity issues for regression modeling
What is the purpose of grouped boxplots in EDA?
To compare distributions of a numerical variable across categories. Shows differences in central tendency, spread, and outliers between groups, helping identify if the categorical variable influences the numerical one.
Why create a Z-score for outlier detection?
Z-score standardizes data to "number of standard deviations from mean." Z = (x - μ)/σ. Values with |Z| > 3 are unusual (beyond 99.7% of normal distribution). Makes outlier detection scale-invariant.
What is the DUHAC mnemonic for EDA?
Dimensions, Univariate, Hypothesize, Associate, Clean - a framework for systematic exploratory data analysis workflow.
Why not automatically delete outliers?
Outliers might be: 1) Genuine extreme values (CEOs with high income), 2) Valuable edge cases for model robustness, 3) Signal in fraud/anomaly detection. Investigate with domain knowledge before deleting.
Chalo, EDA ko ek detective ki tarah samjho. Jaise doctor kisi bhi treatment se pehle patient ke vitals check karta hai, waise hi tumhe model banane se pehle apne data ko achhe se samajhna padta hai. EDA basically ek systematic process hai jisme tum visualization aur statistics ka use karke apne data se sawaal poochte ho - kya patterns hain, kya broken hai, aur kaun se assumptions safe hain. Iska core idea yahi hai ki bina data ko samjhe agar tum seedhe modeling mein kood gaye, toh baad mein hours barbaad honge debugging mein.
Workflow simple hai - pehle data load karke initial inspection karo (kitne rows-columns hain, data types kya hain, missing values kahan hain). Yeh df.shape, df.info(), aur df.head() jaise commands se hota hai jo turant reveal kar deta hai ki kahan gadbad hai. Phir univariate analysis aata hai jisme tum har variable ko akele study karte ho - numerical ke liye mean, median, standard deviation aur skewness dekhte ho, aur categorical ke liye frequency counts. Skewness ek important concept hai jo batata hai ki data symmetric hai ya kisi ek taraf jhuka hua hai - agar mean median se bada hai toh data right-skewed hai matlab kuch outliers mean ko upar kheench rahe hain.
Yeh sab important kyun hai? Kyunki EDA se hi tumhe pata chalta hai ki feature engineering mein kya karna hai. Jaise agar age right-skewed hai, toh tum log transformation apply kar sakte ho taki data model ke liye better ban jaye. Bina EDA ke tum blindly model banaoge aur galat assumptions ki wajah se results kharab aayenge. Toh yaad rakho - accha data scientist banna hai toh pehle apne data se dosti karo, uska character samjho, tabhi accha model bana paoge.