Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Ananya Panda- 20BEC0205

MAT2001-STATISTICS FOR ENGINEERS

Embedded Lab –R Statistical

Software FALL SEMESTER – 2021

SLOT L25+L26

E-RECORD

Experiment No.: 1

Measures of Central Tendency, Dispersion, Skewness and Kurtosis

Name-Ananya Panda

Registration Number-20BEC0205
Ananya Panda- 20BEC0205

AIM to determine the mean, median, mode, variance, standard deviation, co-
efficient of variation, first four moments about the mean and Pearson’s co-efficient
β1 &β2.

CODE

Mean

#Code for determining the mean of data

> x <- c(75,60,90,95,80,75,70,65,65,60,75,70)

> mean(x)

[1] 73.33333

Median
Ananya Panda- 20BEC0205

#Code for determining the median of data

> x <- c(75,60,90,95,80,75,70,65,65,60,75,70)

> median(x)

[1] 72.5

Mode

> #Code for determining the mode of data

> getmode <- function(v) {

+ uniqv <- unique(v)

+ uniqv[which.max(tabulate(match(v, uniqv)))]}

> x <- c(75,60,90,95,80,75,70,65,65,60,75,70)


Ananya Panda- 20BEC0205
> getmode(x)

[1] 75

Variance

#Code for determining the variance of data

var(x)

[1] 119.697

Standard Deviation

#Code for determining the standard deviation of data

sd=sqrt(var(x))

sd

[1] 10.94061
Ananya Panda- 20BEC0205

Coefficient of Variance:

#Code for determining Coefficient of Variance

> coeff_of_var=sd*100/mean(x)

> coeff_of_var

[1] 14.91902

Moments

First Moment = zero (property)

Second Moment =sum ((x-mean(x))**2)/n

#Code for determining second moment

> n=10

> m2=sum((x-mean(x))**2)/n

> m2

[1] 131.6667

Third Moment=sum((x-mean(x))**3)/n
Ananya Panda- 20BEC0205
> #Code for determining third moment

> M3=sum((x-mean(x))**3)/n

> M3

[1] 913.8889

Fourth Moment=sum((x-mean(x))**4)/n

> #Code for determining forth moment

> M4=sum((x-mean(x))**4)/n

> M4

[1] 37263.89

β1 β2

β1=m3^2/m2^3

β2=m4/m2^2

> #Code for determining b1 and b2

> b1=M3**2/m2**3

> b1

[1] 0.3658974

> b2=M4/m2**2

> b2

[1] 2.149495
Ananya Panda- 20BEC0205

Comment on Nature of Skewness: As it is observed above, the mean< mode. So the


graph is not positively skewed.

AIM to determine the mean, median, mode, variance, standard deviation, co-
efficient of variation, first four moments about the mean and Pearson’s co-efficient
β1 &β2.

CODE

Mean

Median

Mode
Ananya Panda- 20BEC0205

Variance

Standard Deviation

Co-efficient of Variation

Moments

First Moment = zero (property)

Second Moment

Third Moment

Fourth Moment
Ananya Panda- 20BEC0205

β1 β2.

Comment on Nature of Skewness: As it is observed above, the mean> mode. So the


graph is positively skewed.

AIM To determine the mean, median, mode, variance, standard deviation, co-
efficient of variation, first four moments about the mean and Pearson’s co-efficient
β1 &β2.

CODE

Mean

Median
Ananya Panda- 20BEC0205

Mode

Variance

Standard Deviation

Coefficient of Variation

Moments

First Moment = zero (property)

Second Moment
Ananya Panda- 20BEC0205

Third Moment

Fourth Moment

β1 β2

Comment on Nature of Skewness: As it is observed above, the mean< mode. So the


graph is not positively skewed.

You might also like