You are on page 1of 9

BSOR ASSIGNMENT

1.MEAN Calculate the mean for the following data.

4780 5760 6690 7750 4840 4920 6100 7810 7050 6950

CODING: a=c(4780, 5760,6690,7750,4840,4920,6100,7810,7050,6950)

Mean(a)

OUTPUT:
Mean=6265
2.MEDIAN:
Calculate the median for the following data.
4100 4150 6080 7120 5200 6160 7400
CODING:
b=c(4100,4150,6080,7120,5200,6160,7400)
median(b)

OUTPUT
MEDIAN=6080
3.MODE:
Calculate the mode for the following data.
10 27 24 12 27 27 20 18 15 30
CODING:
d=c(10,27,24,12,27,27,20,18,15,30)
t=table(as.vector(d))
t
names(t)[t==max(t)]

OUTPUT
MODE=27
4.RANGE & COEFFICIENT OF RANGE:
Calculate the range and its coefficient for the following data
200 210 208 160 220 250
CODING:
e=c(200,210,208,160,220,250)
range(e)
r=250-160
r

OUTPUT
RANGE=90
COEFFICENT OF RANGE=0.2195122
5.QUARTILE DEVIATION & COEFFICIENT OF QUARTILE DEVIATION:
Calculate Q1, Q3, Quartile Deviation and its Coefficient for the
following data
20 28 40 12 30 15 50
CODING:
f=c(20,28,40,12,30,15,50)
quantile(f,0.25)
quantile(f,0.75)
QD=((35-17.5)/2)
QD
coeff_QD=((35-17.5)/(35+17.5))
coeff_QD
OUTPUT:
The Quartile Deviation for the given data is 8.75
The Coefficient of Quartile Deviation is 0.3333333.
6. STANDARD DEVIATION & COEFFICIENT OF VARIATION:
Calculate the Standard Deviation and Coefficient of Variation for the following
data
240 260 290 245 255 288 272 263 277 251
CODING:
g=c(240,260,290,245,255,288,272,263,277,251)
sd(g)
cv=((sd(g)/mean(g))*100)
cv

OUTPUT:
Standard Deviation = 17.28487
Coefficient of Variation = 6.544819
COEFFICIENT OF CORRELATION:
Compute coefficient of correlation for the following data and
interpret the result
Year 1991 1992 1993 1994 1995 1996 1997 1998
Index of 100 102 104 107 105 112 103 99
production
No of 15 12 13 11 12 12 19 25
employed

CODING:
iop=c(100,102,104,107,105,112,103,99)
nou=c(15,12,13,11,12,12,19,25)
r=cor(iop,nou,method=”pearson”)
r

OUTPUT:
Pearson’s Coefficient of Correlation for the given data is -0.6223023.
Hence, it is said to be Highly Negatively Correlated.
8.RANK CORRELATION:
Ten competitors in a beauty contest were ranked by three judges x, y
and z. Which pair of judges has the nearest approach to common
taste in beauty?
X 1 6 5 10 3 2 4 9 7 8
Y 3 5 8 4 7 10 2 1 6 9
z 6 3 9 8 1 1 3 10 5 7
CODING:
x=c(1,6,5,10,3,2,4,9,7,8)
y=c(3,5,8,4,7,10,2,1,6,9)
z=c(6,4,9,8,1,2,3,10,5,7)
r1=cor(x,y,method=”spearman”)
r1
r2=cor(y,z,method=”spearman”)
r2
r3=cor(z,x,method=”spearman”)
r3
OUTPUT:
Spearman’s Rank Correlation for the given data is
r1(Rxy) = -0.2121212
r2(Ryx) = -0.2969697
r3(Rzx) = -0.6363636

You might also like