AIM: To find the measures of central tendency and measures dispersion of the given discrete
frequency distribution.

Problem: Find the measures of central tendency and measures dispersion of the following discrete
frequency distribution.
x    34    56    57    87    90
f    3      4    8    17    4

R-Code:-
> x=c(34,56,76,87,90)
> f=c(3,4,8,17,4)
> Mean= mean(rep(x,f))
> Median= median(rep(x,f))
> Mode=mode(rep(x,f))
> S.D= sd(rep(x,f))
> Variance= var(rep(x,f))
> Quartile=quantile(rep(x,f),c(0.25,0.50,0.75))
> Deciles=quantile(rep(x,f),c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1))
> Percentile=quantile(rep(x,f),c(0.26,0.76,0.85))
> IQR=IQR(rep(x,f))
> QD=IQR/2
> N=sum(f)
> CV=(S.D/Mean)*100
> MDMean=sum(abs(x-Mean))/N
> MDMedian=sum(abs(x-Median))/N
> GM=prod(x*f)^(1/N)
> HM=N/sum(x*f)
> cat("Mean of the given data =", Mean,"\n")
Mean of the given data = 77.02778
> cat("Median of the given data =", Median,"\n")
Median of the given data = 87
> cat("Mode of the given data=",Mode,"\n")
Mode of the given data= 87
> cat("Standard Deviation of the given data=",S.D,"\n")
Standard Deviation of the given data= 16.64329
> cat("Variance of the given data=",Variance,"\n")
Variance of the given data= 276.9992
> cat("Quartile of the given data:",Quartile,"\n")
Quartile of the given data: 76 87 87
> cat("Deciles of the given data:",Deciles,"\n")
Deciles of the given data: 56 76 76 76 87 87 87 87 88.5 90
> cat("Percentiles of the given data for 26%,76% and 85%:",Percentile,"\n")
Percentiles of the given data for 26%,76% and 85%: 76 87 87
> cat("Inter Quartile Range of the given data =",IQR,"\n")
Inter Quartile Range of the given data = 11
> cat("Quartile Deviation of the given data =",QD,"\n")
Quartile Deviation of the given data = 5.5
> cat("Coefficient of Variation of the given data =",CV,"\n")
Coefficient of Variation of the given data = 21.60687
> cat("Mean Deviation about Mean of the given data =",MDMean,"\n")
Mean Deviation about Mean of the given data = 2.445216
> cat("Mean Deviation about Median of the given data =",MDMedian,"\n")
Mean Deviation about Median of the given data = 2.722222
> cat("Geometric Mean of the given data =",GM,"\n")
Geometric Mean of the given data = 2.277576
> cat("Harmonic Mean of the given data =",HM,"\n")
Harmonic Mean of the given data = 0.01298233