Measures of central tendency with examples

measure of central tendency is a central; or typical value for a probability distribution. It may also be called a center or location of the distribution. ... The most common; measures of central tendency are the arithmetic mean, the median and the mode. In these tutorial we have explained meaning of central tendency is measuring the center of distribution of the values and gives idea of an average value of data set. The module will provide the function for calculating statistics and numeric data. The module is collection of libraries as scipy, numpy and the matlab. The collections are also mix types and the implementation. The input data will consist mixed data types.

measures of central tendency

Statistical functions in statistics module:-

There are many statistical functions defined in the module then the mean is calculated by arithmetic mean in the list.
The median () will return middle value of numeric data in list.
The mode () will return common data in list.
There are the statistical functions also defined in the module.

Measure of central tendency :-

The meaning of central tendency is measuring the center of distribution of the values and gives idea of an average value of data set.
It will help you in evaluating chances of a new input which is fitting into the original data set and get success.
The main tendencies are calculated as follows, mean, median, mode.

  1. mode ():-

       The mode () method will return most common data points in the list of numbers.
Example1:-
import statistics
statistics.mode ([2, 5, 3, 2, 8, 3, 9, 4, 2, 5, 6])
Output:-
2
Example2:-
import statics
dataset=[2,4,7,7,2,2,3,6,6,8]
print(“calculated mode%s” %( statistics.mode (dataset)))
Output:-
            Calculated mode 2
2. mean ():-
 The mean () method will calculate arithmetic mean of the numbers in a list.
It will return the middle value of numeric in list.
Example:-
import statistics
datasets= [5, 2, 7, 4, 2, 6, 8]
x=statics.mean (datasets)
print(“mean is:” x)
Output:-
Mean is: 4.857142
3. median ():-
             The median () method will return the middle value from the data list.
Example:-
import statistics
datasets= [4,-5, 6, 6, 9, 4, 5, -2]
print(“mean of dataset is: %s” %( statistics.median (datasets)))

Output:-

4.5
4. stdev ():-
               The stdev () method will calculate the standard deviation in form of the list.
Example:-
import statistics
Statistics.stdev ([1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5])
Output:-
1.36930639      
Example:-
import statistics
sample= [7, 8, 9, 10, 11]
print (“standard deviation sample is %s” %( statics.stdev (sample)))
Output:-
1.5811

5) Median_low ():-
                  This function is used to return the low median of data in the list.
Example:-
import statistics
set1= [4, 6, 2, 5, 7, 7]
print (“low median of data-set is %s”5(statistics.median_low (set1)))
Output:-
Low median data_set is 5
6) Median_high ():-
              The function is used to return the high median of numeric data in the list.
Example:-
import statistics
data= [2, 1, 7, 6, 1, 9]
           print(“The high median of data is %s” %( statistics.median_high (dataset)))
Output:-
 High median of dataset is 6

Additional Services : Refurbished Laptops Sales, Python Classes, Share Market Classes And SEO Freelancer in Pune, India