The shape of data#
A distribution describes how often each value (or range of values) occurs. Two charts show it best:
- Histogram - bars showing how many values fall in each range ("bin").
- Box plot - shows median, quartiles and outliers in one compact picture.
Common shapes#
| Shape | Looks like | Mean vs median | Examples |
|---|---|---|---|
| Normal (bell curve) | symmetric hump | mean ≈ median | heights, exam marks, measurement errors |
| Right-skewed | long tail to the right | mean > median | salaries, order values, house prices, delivery delays |
| Left-skewed | long tail to the left | mean < median | age at retirement, easy-exam scores |
| Uniform | flat | mean ≈ median | dice rolls, random IDs |
| Bimodal | two humps | - | restaurant orders at lunch and dinner |
The normal distribution and the 68-95-99.7 rule#
In a normal distribution:
- about 68% of values lie within 1 SD of the mean,
- about 95% within 2 SD,
- about 99.7% within 3 SD.
So if exam marks have mean 65 and SD 12, about 95% of students score between 41 and 89.
Distribution = data का "आकार" - कौन-सी values ज़्यादा आती हैं, कौन-सी कम।
- Normal (घंटी जैसा आकार) - ज़्यादातर values बीच में, दोनों तरफ़ बराबर कम होती जाती हैं। जैसे लंबाई, exam marks।
- Right-skewed (दाईं ओर लंबी पूँछ) - ज़्यादातर values छोटी, कुछ बहुत बड़ी। जैसे salary, order value। यहाँ mean > median होता है।
Business data ज़्यादातर right-skewed होता है - इसलिए हमेशा histogram देखें और median भी निकालें।
Outliers#
An outlier is a value far from the rest. It can be:
- a genuine extreme (a bulk corporate order),
- an error (quantity typed as 5000 instead of 5),
- a special event (Diwali sale day).
The IQR rule#
IQR = Q3 - Q1
Lower fence = Q1 - 1.5 × IQR
Upper fence = Q3 + 1.5 × IQR
Values outside the fences are potential outliers.
These "outliers" are mostly Technology orders - laptops and phones. They're genuine, not errors, so we keep them, but we analyse them separately (or use medians) so they don't distort averages.
Never delete outliers automatically. Investigate first: error → fix; genuine → keep (and maybe analyse separately); special event → label it.
Correlation#
Correlation measures how strongly two numeric variables move together, from -1 to +1:
| Value | Meaning | Example |
|---|---|---|
| +0.7 to +1 | strong positive | advertising spend ↑, sales ↑ |
| +0.3 to +0.7 | moderate positive | study hours ↑, marks ↑ |
| -0.3 to +0.3 | weak / none | shoe size and salary |
| -0.7 to -0.3 | moderate negative | discount ↑, profit ↓ |
| -1 to -0.7 | strong negative | price ↑, units sold ↓ |
The correlation is about -0.30 (a moderate negative relationship), and the total by discount level shows the business story clearly: 30% discounts lose money overall.
Correlation is not causation#
Correlation ≠ Causation - दो चीज़ें साथ-साथ बढ़ें, इसका मतलब यह नहीं कि एक दूसरी का कारण है।
उदाहरण: गर्मियों में आइसक्रीम की बिक्री और डूबने की घटनाएँ - दोनों बढ़ती हैं। आइसक्रीम डूबने का कारण नहीं है; दोनों का असली कारण है गर्म मौसम (तीसरा factor - confounding variable)।
Analyst के रूप में "X की वजह से Y हुआ" कहने से पहले दूसरे कारण भी जाँचें।
Before saying "X causes Y", check for:
- a third factor (season, region, store size),
- reverse causation (does Y cause X?),
- coincidence in small samples.
Proving causation needs controlled experiments (A/B tests) - beyond correlation.
Summary#
- Histograms and box plots show a distribution's shape; business data is often right-skewed.
- Normal data follows the 68-95-99.7 rule.
- Detect outliers with the IQR rule - investigate before removing.
- Correlation (-1 to +1) measures linear relationships; it does not prove causation.