Standard Deviation

In measures of dispersion, the standard deviation is one of the prominent tools to calculate the dispersion of the data

In measures of dispersion, the standard deviation is one of the prominent tools to calculate the dispersion of the data. The purpose of standard deviation is to calculate the deviation of data from the mean of the data. We first calculate the mean of the data, then we sum up the squared difference of each point from the mean.

Simple Data

Let’s directly start with an example of a simple series

34 34 40 43 45 46 48 46

The formula for a standard deviation for Simple Series is as follows, σ is Standard Deviation.

Standard Deviation Formula

image 24
Standard Deviation simple data formula with notations

In this equation,

N is the number of items in a series, d2 is the Squared differences of items from the series mean

xd=| x – μ |d2
348.572.25
384.520.25
402.56.25
430.50.25
452.56.25
463.512.25
485.530.25
463.512.25
Σx=340   ,  
μ  = 42.5
Σd2= 160
image 2
Mean and standard deviation calculation

From the above example, we get an idea of how the standard deviation works in theory and practice. As this is a simple series of data, we directly calculated the difference and deviations.

Although, we also face datasets of multiple types, like continuous and discrete series.

Discrete Data

The series below is a discrete series. This type of data can be explained with x as the value or price and f as the frequency of x’s occurrence.

Let’s say x is the value of an item ordered from a grocery store, and f will be how many units of item x are ordered.

The apples cost $60, and there are 250 apples. So the fx will be, 15000

χƒ
60250
62300
64410
66500
67350
68275
69150
70100
7125
f=2360
image 26
Standard Deviation discrete data formula with notations

The calculations in this table for standard derivation are slightly different from the simple series. But the root of the formula is still the same.

χƒƒχd=| χ – μ |d2ƒd2
60250150005.328.097022.5
62300186003.310.893267
64410262401.31.69692.9
66500330000.70.49245
67350234501.72.891011.5
68275187002.77.292004.75
69150103503.713.692053.5
7010070004.722.092209
712517755.732.49812.25
Σƒ=2360Σƒχ=154115Σƒd2=19318.4
image 3
Discrete data Standard Deviation solution

Continuous Data

Let’s learn to calculate standard deviation from continuous data. In the following example, we will take a sample of continuous data and apply the standard deviation formula on it.

An example of continuous data can be stocks of a company throughout each month of a year, or the average/cumulative weight of students in a class.

The following example of Classes of IQs and f is the number of students in those classes of IQs

ClassF
40-5011
50-6023
60-7040
70-8060
80-9035
90-10016
100-11009
110-12006

The formulae for standard deviation are

image 22
Continuous Deviation simple data formula with notations

The First Equation calculates the mean of the series.

The second equation calculates the difference between series and mean.

The third equation calculates standard deviation.

ClassFrequency
f
Mid-value
m
fmd=|m-μ |
μ=74.95
d2fd2
40-50114549529.958979867
50-602355126519.953989154
60-70406526009.95993960
70-80607545000.050.00250.15
80-903585297510.051013515
90-1001695152020.054026432
100-1100910594530.059038127
110-1200611569040.0516049624
Σƒ=200
Σƒm=14990Σƒd2=50699.15
image 7
image 23

From the above calculation we get that average IQ of all students is 74.95, and we get the standard deviation from IQ

If you are still wondering, what will we get from calculating? We can find the spread of the data by comparing the difference between the mean and standard deviation.

Let’s see how the widespread and densely populated data would look.

Wide Spread
spread out population

Dense Spread
densely populated

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

  • ANCOVA: Analysis of Covariance with python

    ANCOVA is an extension of ANOVA (Analysis of Variance) that combines blocks of regression analysis and ANOVA. Which makes it Analysis of Covariance.

  • Learn Python The Fun Way

    What if we learn topics in a desirable way!! What if we learn to write Python codes from gamers data !!

  • Meet the most efficient and intelligent AI assistant : NotebookLM

    Start using NotebookLM today and embark on a smarter, more efficient learning journey!

  • Break the ice

    This can be a super guide for you to start and excel in your data science career.

  • Hypothesis Testing: A Comprehensive Overview

    This article delves into the application of hypothesis testing across diverse domains

  • Versions of ANCOVA (Analysis Of Covariance) with python

    To perform ANCOVA (Analysis of Covariance) with a dataset that includes multiple types of variables, you’ll need to ensure your dependent variable is continuous, and you can include categorical variables as factors. Below is an example using the statsmodels library in Python: Mock Dataset Let’s create a dataset with a mix of variable types: Performing…

  • Python Variables

    How useful was this post? Click on a star to rate it! Submit Rating Average rating 0 / 5. Vote count: 0 No votes so far! Be the first to rate this post.

  • A/B Testing Quiz

    Complete the code by dragging and dropping the correct functions

  • Python Functions

    Python functions are a vital concept in programming which enables you to group and define a collection of instructions. This makes your code more organized, modular, and easier to understand and maintain. Defining a Function: In Python, you can define a function via the def keyword, followed by the function name, any parameters wrapped in parentheses,…

  • Python Indexing: A Guide for Data Science Beginners

    Mastering indexing will significantly boost your data manipulation and analysis skills, a crucial step in your data science journey.

  • Diffusion Models: Making AI Creativity

    Stable Diffusion Models: Where Art and AI Collide Artificial Intelligence meets creativity in the fascinating realm of Stable Diffusion Models. These innovative models take text descriptions and bring them to life in the form of detailed and realistic images. Let’s embark on a journey to understand the magic behind Stable Diffusion in a way that’s…

  • Quiz Challenge: Basics with Python [Questions]

    Solve These Questions in Following Challange

  • Introducing Plethora of Stable Diffusion models: Part 1

    Generate AI images as good as DALL-E completely offline.

Leave a Reply

Points You Earned

Untitled design 6
0 distinction_points
Untitled design 5
python_points 0
0 Solver points
Instagram
WhatsApp
error: Content is protected !!