In this blog, I am going to talk about Central Tendency, asymmetry and variability with hands on using Python. If you miss my previous blog about Descriptive Statistics with Python, please go to the below link.
What is Central Tendency?
In statistics, a central tendency is a central or typical value for a probability distribution.
Purpose of Central Tendency:
It is a single value which is the representative of an entire distributed data. There are three main measures in central tendency, mean, median and mode.
Now we are going to in detail to know about these measures.
Mean is mostly used for measuring central tendency. It is a simple average of whole data set. Formula of calculating mean of a data set is
(𝑥1 + 𝑥2 + 𝑥3 + ⋯ + 𝑥𝑁−1 + 𝑥𝑁 ) /N
Where 𝑥1, 𝑥2 , 𝑥3 , ⋯ ,𝑥𝑁−1 , 𝑥𝑁 => r Data values , N = Total number of sample data.
For population data, it is denoted as μ and for sample data x bar (symbol shown in above image)
Note: Mean is easily affected by outliers.
Find out Mean explanation with some example.
The median is the midpoint of the ordered dataset. . It is not affected by outliers. In an ordered dataset, the median is the number at position (n+1)/2. Here n is number of observations. If this position is not a whole number, then the median is the simple average of the two numbers at positions closest to the calculated value.
If we consider the above data set, let’s find out median.
In a data set, the mode is the value which occurs most often. A dataset can have 0 modes, 1 mode or multiple modes. Normally, the mode is calculated by finding the value with the highest frequency.
Python Coding for Central Tendency Measures
Now it is time for measuring asymmetry for a data set. For this context, we need to understand skewness of a data set.
Skewness is a measure of asymmetry. It indicates the observations in a dataset are concentrated on which side.
The above graph has right (positive)skewness. It means that the outliers are to the right (long tail to the right). Left (negative) skewness means that the outliers are to the left.
Normally, using different software, skewness is calculated. Formula of skewness is
Python Coding for Skewness
In my next blog we will learn about variability with python coding.