Data Science · मराठी आवृत्ती
21.4 Distributions आणि skew
या course चे सर्व chapters (py + ch)
- How to Use This Free Data Science Course
- How to Install Python, Jupyter Notebook and VS Code for Data Science (Windows and Mac)
- Python Variables and Data Types Explained for Beginners (int, float, str, bool)
- Python Strings Tutorial: Slicing, f-strings and String Methods with Examples
- Python Lists, Tuples, Dictionaries and Sets Explained with Examples
- Python if, elif and else Statements with Real Examples for Beginners
- Python for Loops and while Loops Explained with Examples (range, break, continue)
- Python Functions Tutorial: def, return, Arguments and lambda with Examples
- Python Errors and Exceptions: How to Use try, except, else and finally
- How to Read and Write CSV, JSON and Text Files in Python (with open and with)
- Python Modules, pip and Virtual Environments (venv) Explained for Beginners
- Python Classes and Objects for Beginners: OOP Basics with Simple Examples
- NumPy Tutorial for Beginners: Arrays, Maths and Filtering in Python
- Python Mini Projects for Beginners: 5 Practice Projects Before Learning pandas
- Data Science vs Data Analytics Tutorial
- Python Jupyter Setup for Data Science
- Python Basics for Data Science Tutorial
- NumPy Essentials for Data Science Tutorial
- pandas DataFrames and Series Tutorial
- Filter and Sort Data in pandas Tutorial
- pandas GroupBy and Aggregations Tutorial
- Merge and Concat Data in pandas Tutorial
- Data Cleaning in pandas A–Z Tutorial
- Dates and Text in pandas – Free Tutorial
- Reshape Data: melt and pivot_table
- Exploratory Data Analysis in Python
- matplotlib Visualization Tutorial – Free
- seaborn Visualization Tutorial – Free
- Chart Choice and Data Storytelling
- Data Science Project: Blinkit Maharashtra
- Data Science Practice Exercises
- Data Science Interview Questions
- pandas matplotlib seaborn Cheat Sheet
- Data Science Glossary – Free Tutorial
- Stats for Data Work Mean Median IQR
- Export CSV Excel PNG from pandas Tutorial
- Common pandas Mistakes and Fixes Tutorial
- Load SQL Query Results into pandas DataFrame – Free Tutorial
- How to Rank and Running Totals in pandas
- How to Read APIs, JSON and Zipped CSVs into pandas
- How to Use Git with Jupyter Notebooks for Data Projects
- How to Merge and Join Tables in pandas for Blinkit Data
- What Is Machine Learning Simple Explanation
- Machine Learning Workflow Step by Step
- Train Test Split in Machine Learning sklearn
- Features and Labels in Machine Learning
- Linear Regression in Python with sklearn
- Classification with Logistic Regression in Python
- Decision Trees and Random Forests in Python
- K-Means Clustering in Python for Beginners
- How to Check If Your ML Model Is Good
- Overfitting and Underfitting in Machine Learning
- End-to-End ML Project India Dataset
- Data Preprocessing for ML: Impute Scale Encode
- What Is a Neural Network Simple Explanation
- Activation Loss Gradient Descent Plain English
- Backpropagation Intuition No Heavy Maths
- Install PyTorch and First Tensors
- Your First Neural Network in PyTorch
- Deep Learning vs Classical ML When to Use Which
- Convolutional Neural Networks CNNs for Images
- Small CNN Image Project in PyTorch
- What Transformers Are Text and Sequences
- Tiny Text Classifier Transformer Intro PyTorch
- What Is Natural Language Processing NLP
- Text Cleaning and TF-IDF in Python sklearn
- Sentiment Analysis Project in Python TF-IDF
- NLP vs ChatGPT Classical NLP and Generative AI
हे का शिकायचं?
एकाच mean मागे वेगळ्या shapes असू शकतात. Skew सांगतं शेपूट कुठे लांब आहे.
हे काय आहे?
Right-skew: mean > median (₹ amounts मध्ये सामान्य). Left-skew: mean < median.
कसं करायचं?
Step 1. Histogram किंवा bins पाहा.
Step 2. mean आणि median तुलना करा.
Step 3. mean मोठा → उजवीकडे skew.
Step 4. Report मध्ये दोन्ही लिहा.
उदाहरणं: copy करा आणि चालवा
उदाहरण A — Normal week vs Ganeshotsav window (fictional Nagpur).
import numpy as np
import pandas as pd
rng = np.random.default_rng(7)
normal = rng.integers(60, 160, size=80)
fest = np.concatenate([
rng.integers(70, 180, size=70),
rng.integers(400, 900, size=10), # mithai / decor spikes
])
def skew_story(arr, label):
s = pd.Series(arr)
print(label, "mean", round(s.mean(), 1), "median", s.median(),
"max", s.max())
skew_story(normal, "Nagpur normal week")
skew_story(fest, "Nagpur Ganeshotsav week")
What you should see. Festival week: mean climbs; median moves less; max jumps. Salman should not staff “average” — he should plan for a fat right tail on festival evenings.
उदाहरण B — Histogram in five lines.
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
pd.Series(fest).plot(kind="hist", bins=15, ax=ax, edgecolor="black")
ax.set_xlabel("Order amount (₹)")
ax.set_ylabel("Orders")
ax.set_title("Nagpur fictional Ganeshotsav amounts")
fig.savefig("figures/nagpur_fest_hist.png", dpi=120, bbox_inches="tight")
plt.close()
Save the PNG for WhatsApp (Chapter 22). Do not paste the whole notebook.
उदाहरण C — Status mix is also a “distribution”.
status = pd.Series(
["Delivered"] * 50 + ["Cancelled"] * 6 + ["Returned"] * 4
)
print(status.value_counts(normalize=True).round(3))
Zoya reports: “Delivered 83%, Cancelled 10%, Returned 7% (fictional sample).” That categorical distribution matters as much as ₹ skew.