Monday, 3 September 2018

Statistical Functions - Central Tendency and Variation in R language

Descriptive statistics :-

First hand tools which gives first hand information.
  • Central tendency of data (Mean, median, mode, geometric mean, harmonic mean etc.)
  • Variation in data (variance, standard deviation, standard error, mean deviation etc.)
Central tendency of the data

Gives an idea about the mean value of the data 
The data is clustered around what value?

Data:  ๐’ณ1, ๐’ณ2, ......,๐’ณn
x : Data vector
mean (x)

 prod (x) ^ (1/length (x) )
(length (x)  is equal to the number of elements in x)


Median :-

     Value such that the number of observation above it is equal to the number of observation below it.
median (x)

Example :-



Variability

spread and scatterdness of data around any point, preferably the mean value.

Data set 1:  360, 370, 380
    mean = (360 + 370 + 380) /3  = 370
Data set 2:  10, 100, 1000
    mean = (10 + 100 + 1000) /3  = 370

How to differentiate between the two data sets?

  x : data vector
      var (x)
positive square root of variance : standard deviation
        sqrt (var (x) )

Variance
Another variant,

If we want divisor to be n, then use
   ( (n-1) /n) * var (x)
where  n = length (x)

Range:
    maximum(x1, x2, ....., xn) - minimum(x1, x2, ...., xn)
      max (x)  -  min (x)

Interquartile range:
  Third quartile (x1, x2, ..., xn) - First quartile (x1, x2, ...., xn)
     IQR (x)

Quartile deviation:
  [Third quartile (x1, x2, ..., xn) - First quartile (x1, x2, ..., xn)]/2
   =  Interquartile range/2
    IQR (x) /2


Example :-



0 Comments:

Post a Comment

Popular Posts

Categories

100 Python Programs for Beginner (56) AI (34) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (174) C (77) C# (12) C++ (82) Course (67) Coursera (228) Cybersecurity (24) data management (11) Data Science (128) Data Strucures (8) Deep Learning (21) Django (14) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (6) flask (3) flutter (1) FPL (17) Google (34) Hadoop (3) HTML&CSS (47) IBM (25) IoT (1) IS (25) Java (93) Leet Code (4) Machine Learning (60) Meta (22) MICHIGAN (5) microsoft (4) Nvidia (3) Pandas (4) PHP (20) Projects (29) Python (935) Python Coding Challenge (368) Python Quiz (27) Python Tips (2) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (4) Software (17) SQL (42) UX Research (1) web application (8) Web development (4) web scraping (2)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses