You are on page 1of 10

16BCE0766

STATISTICS FOR
ENGINEERS
DIGITAL ASSIGNMENT - I

NAME: ROHIT VEMPARALA


REGISTRATION NUMBER: 16BCE0766
SLOT: E1+TE1
FACULTY: EASWARAMOORTHY
16BCE0766

QUESTIONS

1. Compute the mean, median and mode for the following frequency distribution.

Solution

CLASS INTERVAL FREQUENCY Xi Di CF Fidi


20-25 30 22.5 -4 30 -120
25-30 160 27.5 -3 190 -480
30-35 210 32.5 -2 400 -420
35-40 180 37.5 -1 580 -180
40-45 145 42.5 0 725 0
45-50 105 47.5 1 830 105
50-55 70 52.5 2 900 140
55-60 60 57.5 3 960 180
60-65 40 62.5 4 1000 160

A (Assumed mean) = 42.5 C (class width) = 5


f = N = 1000 di = (xi - A )/c
fi di = -615

Mean

Mean = A + (( fi di)/N)* c = 42.5 + (-615/1000) = 39.45

Median

N = 1000 Here N is even


N/2, (N+1)/2 = 500,500.5 Average of N/2 and (N+1)/2 = 500.25
Median class = 35*40

l = 35 f = 180 m = 400

Median = l + ((N/2 - m)/N)*c = 35=50/18 = 37.7

Mode

F1 = 210 f0 = 160 f2 = 180 l=30 c=5

mode = l + ((f1 f0)/(2*f1+(f0+f2))) * c = 30 + (210-160)/(420-340)*5 = 33.125


16BCE0766

2. Calculate the mean, variance and standard deviation for the following frequency
Distribution, and hence obtain the value of co-efcient of variation.

Solution

Size (x) Frequency (f)


0 1
1 8
2 28
3 56
4 70
5 56
6 28
7 8
8 1

f = N = 256 fixi = 1024

Mean = (fixi)/N = 1024/256 = 4

Standard Deviation =

^
( )
= 1.4142
Variance = 2

Coefficient of variation = 100 = 35.3553

3. Find the rst four moments about the mean and Pearsons co-efficient 1 and 2 for the
following frequency distribution, and also comment the nature of skewness and kurtosis
of the distribution based on the Pearsons co-efficient 1 and 2

Solution
Class f x d fd
170-180 52 175 -4 -208 832 -3378 13312
180-190 68 185 -3 -204 612 -1836 5508
190-200 85 195 -2 -170 340 -680 1360
200-210 92 205 -1 -92 92 -92 92
210-220 100 215 0 0 0 0 0
220-230 95 225 1 95 95 95 95
230-240 70 235 2 140 280 560 420
240-250 28 245 3 84 252 756 2268
Total 590 -355 2503 -4525 2375
16BCE0766
355
1 = = 10 = 6.0169
590
2503
2 = = 100 = 424.2372
590
4525
3 = = 1000 = 7669.4912
590
23755
4 = = 10000 = 402627.1186
590

1 = 0
2 = 2 (1 ) = 388.0341
3 = 3 3(2 1) + 2(1 ) = 229.5431
4 = 4 4(3 1 ) + 62 (1 ) 3(1 ) = 214108.882

Pearsons Coefficients 1 and 2


( ) .
1 = = .
= 0.4611

.
2 = ( )
= .
= 1.4219

Nature of kurtosis is platykurtic

Coefficient of skewness
1(2 + 3) 1.4219 + 3 3.0026
= = 04611 = = 0.3223
2(5(2) 61 9) 2(7.1095 2.7666) 9 9.3142

Nature of skewness is negatively skewed

4. Find the value of a, P(X < 3), cumulative distribution function, mean, variance and
standard deviation of the discrete random variable (X) with the following probability
distribution.

P(X=xi) = 1 => a+3a+5a+7a+9a+11a+13a+15a=17a = 1

81a = 1
a = 1/81

P(X < 3) = P(X=0) + P(X=1) + P(X=2) = a+3a+5a = 9a = 1/9

Cumulative distribution function CDF (F(x)) = P (X<=x) = P(x)

F(0) = 0 F(1) = P(X = 0) = 1/81

Similarly
F (2) = 4/81 F (3) = 1/9 F(4) = 16/81 F(5) = 25/81 F(6) = 36/81 F(7) = 49/81
F (8) = 64/81 F(9) = 1
16BCE0766
Mean = x*P(x) = 0 + 1(3/81) + 2*(5/81) +3*(7/81) +4*(9/81) + 5*(11/81) + 6*(13/81) +
7*(15/81) + 8*(17/81) = 444/81 = 5.481


Variance = (x-mean)^2 * P(x) or () = 34.5185 (5.4814)

= ( 5.48)^2*1/81 +

Variance = 4.47277
Standard Deviation SD = = 2.1148

5. Find the value of k, cumulative distribution function, mean, variance and standard
deviation of the continuous random variable (X) with the following probability density
function.

Solution
() = 1
(2 ) + 0 = 1
2 = 1
k=
Cumulative distribution function

() = 1 F(x) = () for a value of x

F (x < 0) = 0
F (0 < x < 2) = () = 1
F (x > 2) = 0

Mean = () = (2 ) = = 1

Variance = ( ) () = ( 1) ()(2 ) = =

Standard deviation = = 1/2

6. Three balls are drawn at random without replacement from a box containing 2 white, 3
red and 4 black balls. If X denotes the number of white balls drawn and Y denotes the
number of red balls drawn, nd the joint probability distribution of (X; Y ).

Solution:

2 White balls, 3 Red balls, 4 black balls and 3 balls are drawn at random from the given balls

X takes the values 0, 1, 2


Y takes the values 0, 1,2 3
16BCE0766
The different cases are as follows

P(X=0 Y=0) = 4C3/9C3 = 1/21 P(X=0 Y=2) = (3C2 X 4C1)/9C3 = 1/7


P(X=0 Y=1) = (3C1 X 4C2)/9C3 = 3/14 P(X=0 Y=3) = 1/84
P(X=1 Y=0) = 1/7 P(X=1 Y=2) = 1/14
P(X=1 Y=1) = 2/7 P(X=1 Y=3) = 0
P(X=2 Y=0) = 1/14 P(X=2 Y=2) = 0
P(X=2 Y=1) = 1/28 P(X=2 Y=2) = 0
P(X=2 Y=3) = 0

Joint distribution Table

X Y
0 1 2 3
0 1/21 3/14 1/7 1/84
1 1/7 2/7 1/14 0
2 1/21 1/28 0 0

7. The joint probability density function of two-dimensional continuous random variable (X;
Y ) is given by

Solution

= 1

Substitution method
Taking = => 2xdx=dt => xdx = dt and = => 2ydy=dk => ydy = dk
K(0-1)(0-1) = 4
K=4

f(x,y) = 4xy

Marginal Functions

f (x) = 4 = 2 f (y) = 4 = 2

f(x) . f(y) = 2 . 2 = 4 = (, )

Hence x and y are independent from the property

Hence proved

8. A line of length a units is divided into two parts. If the rst part is of length X, then find
E(X), Var(X), and E [X(a X)].
Solution:
X is uniformly distributed in (0,0)
16BCE0766
f(x) = 1/a
E(x) = () = =

( ) = () =
3
Variance (x) = ( ) () = =

( ) = () ( ) = =
3 4 12

9. Compute the coefcient of correlation between the following two set of measures X and
Y and hence comment the nature of correlation between X and Y.

Solution

Changing the origin

Minimum value among the values of X is 65 Minimum value among the values of Y is 64
Maximum value among the values of X is 71 Maximum value among the values of Y is 72
New origin of X = (65 + 71)/2 = 68 New origin of Y = (64 + 72)/2 = 68

X=xi Y=yi Ui-xi-68 Vi=yi-68 Ui^2 Vi^2 Uivi


65 67 3 -1 9 1 3
67 68 1 0 1 0 0
66 68 2 0 4 0 0
71 70 3 2 9 4 6
67 64 1 -4 1 16 4
70 67 2 -1 4 1 -2
68 72 0 4 0 16 0
69 70 1 2 1 4 2
Total -1 2 29 39 13

rXY = rUV = (n UV - U. V) /( U (U) V (V) ) )

= 0.3974

10. Write and execute a program in C, C++ Languages or in MATLAB for any problem in
Statistical or Probabilistic Measures.
(Include the problem statement and the programming code with output for the problem).

Solution:
Problem Statement

Write the R programming code for computing the mean, median, mode, variance, standard
deviation, co-efficient of variation, first four moments about the mean and Pearsons co-efficients B1
& B2 for the following frequency distribution, and also comment on the nature of skewness and
kurtosis of the distribution based on the Pearsons co-efficient 1 & 2
16BCE0766

R-PROGRAMMING PART
R Code

#Mean

> h=10

> x=seq(175,245,h)

> f=c(52,68,85,92,100,95,70,28)

> M=(sum(x*f))/sum(f)

>M

[1] 208.9831

> #Median

> h=10

> x=seq(175,245,h)

> f=c(52,68,85,92,100,95,70,28)

> fd=data.frame(x,f)

> cf=cumsum(f)

> n=sum(f)

> mc=min(which(cf>=n/2))

> mcf=f[mc]

> c=cf[mc-1]

> l=x[mc]-h/2

> Md=l+(((n/2)-c)/mcf)*h
16BCE0766
> Md

[1] 209.7826

> #Mode

> h=10

> x=seq(175,245,h)

> f=c(52,68,85,92,100,95,70,28)

> fd=data.frame(x,f)

> mc=which(f==max(f))

> mcf=f[mc]

> f1=f[mc-1]

> f2=f[mc+1]

> l=x[mc]-h/2

> Mo=l+((mcf-f1)/(2*mcf-f1-f2))*h

> Mo

[1] 216.1538

#Variance, Standard Deviation and Pearson's coefficients

> h=10

> x=seq(175,245,h)

> f=c(52,68,85,92,100,95,70,28)

> N=sum(f)

> M=(sum(x*f))/sum(f)

>M

[1] 208.9831

> Var=((1/N)*(sum(x^2*f)))-((1/N)*(sum(x*f)))^2

> Var
16BCE0766
[1] 388.0336

> SD=sqrt(Var)

> SD

[1] 19.69857

> CV=100*(SD/M)

> CV

[1] 9.425917

> #Moments and Pearson's Coefficients

> h=10

> x=seq(175,245,h)

> f=c(52,68,85,92,100,95,70,28)

> N=sum(f)

> M=(sum(x*f))/sum(f)

> M1=sum(((x-M)^1)*f)/N

> M2=sum(((x-M)^2)*f)/N

> M3=sum(((x-M)^3)*f)/N

> M4=sum(((x-M)^4)*f)/N

> B1=(M3^2)/(M2^3)

> B2=(M4)/(M2^2)

> B1

[1] 0.003424753

> B2

[1] 2.034009

You might also like