Statistics Basics for Data Science

    Yash Kabra3 min readUpdated

    The statistics you need to start in data science are simpler than most people fear: how to find the centre of your data (mean, median), how spread out it is (range, standard deviation), the shape of its distribution, and whether two things move together (correlation). Master these and you can interpret most real-world datasets sensibly.

    Measures of centre

    The "typical" value in a dataset can be described three ways:

    • Mean — the arithmetic average. Sensitive to extreme values.
    • Median — the middle value when sorted. Robust to outliers.
    • Mode — the most frequent value.

    When data has outliers (say, one billionaire in a salary list), the median tells a truer story than the mean.

    import numpy as np  # NumPy 2.x
    
    salaries = np.array([30000, 32000, 35000, 31000, 900000])  # one outlier
    
    print("Mean:", salaries.mean())            # pulled up by the outlier
    print("Median:", np.median(salaries))      # closer to the typical value
    

    Measures of spread

    Two datasets can share a mean yet look completely different. Spread captures that:

    • Range — max minus min.
    • Variance — the average squared distance from the mean.
    • Standard deviation — the square root of variance, in the original units, so it is easier to interpret.
    import numpy as np
    
    scores = np.array([70, 72, 68, 71, 69])
    
    print("Range:", scores.max() - scores.min())
    print("Std dev:", round(scores.std(), 2))   # small = values cluster tightly
    

    Distributions

    A distribution describes how values are spread across their range. The famous normal distribution (the bell curve) appears often: most values near the centre, fewer at the extremes. Knowing the shape helps you choose the right summary and spot anomalies. You will explore distributions hands-on in exploratory data analysis.

    Want to learn this properly?

    Join the waitlist for our courses — beginner-friendly, project-first classes in Jalgaon.

    Browse courses

    Correlation

    Correlation measures whether two variables move together. It ranges from -1 (perfect inverse) through 0 (no linear relationship) to +1 (perfect positive).

    import pandas as pd  # pandas 2.x
    
    df = pd.DataFrame({
        "hours_studied": [1, 2, 3, 4, 5],
        "exam_score":    [52, 58, 65, 70, 80],
    })
    
    # .corr() returns a correlation matrix; close to +1 means a strong positive link
    print(df.corr())
    

    The golden rule: correlation is not causation. Ice-cream sales and drowning incidents both rise in summer, but ice cream does not cause drowning — hot weather drives both.

    Why statistics matters in data science

    Statistics is the difference between "the number went up" and "the number went up more than random variation would explain". It guards you against fooling yourself with noise, and it underpins everything from A/B testing to machine learning. It also pairs directly with data visualisation: a chart shows the shape, statistics quantify it.

    Common mistakes

    • Reporting only the mean. Always pair it with a measure of spread; a mean alone hides the story.
    • Confusing correlation with causation. A strong correlation never proves one thing causes another.
    • Ignoring outliers. Decide whether they are errors or real, and choose mean vs median accordingly.
    • Over-trusting small samples. Five data points can mislead; more data gives more reliable estimates.

    FAQ

    How much maths do I need? Comfort with arithmetic and the ideas above is enough to begin. Deeper theory (probability, inference) comes later.

    When do I use median over mean? Use the median when the data is skewed or has outliers, such as incomes or house prices.

    Is standard deviation hard to compute? Tools like pandas and NumPy compute it for you — focus on interpreting it.

    Keep learning

    Statistics turns raw numbers into trustworthy insight. Pair it with Python for data science and the rest of the Data Science & Analytics hub.

    Want to learn statistics applied to real projects? Join the waitlist for the Data Science & Analytics course at Infoplanet, Jalgaon.

    Want to learn this properly?

    Join the waitlist for our courses — beginner-friendly, project-first classes in Jalgaon.

    Browse courses
    Yash Kabra

    Founder, Atlee Technologies

    Yash Kabra is the founder of Atlee Technologies, a product studio that ships SaaS products end-to-end. He owns products from strategy through launch and growth — including Infoplanet, TrackRise and Perqee — and teaches AI, Machine Learning and Data Science at Infoplanet with a focus on how these tools are used to build real products.

    Related guides