MC0074 - Set 1

6
February 2010 Master of Computer Application (MCA) – Semester 3 MC0074 – Statistical & Numerical Methods using C++ Assignment Set – 1 1. A box contains 74 brass washers, 86 steel washers and 40 aluminum washers, Three washers are drawn at random from the box without replacement. Determine the probability that all three are steel washers. Ans – No. of ways to succeed = 86 C 3 No of possible outcomes = 200 C 3 P(success) = 86 C 3 / 200 C 3 = 0.0779 2. Suppose that the random variable X is uniformly distributed over [a, b] and if E( x )= ( a+b ) 2 , then compute the value of V(X) Ans – We have E(X) = (a + b)/2 E(X) 2 = ʃ( x +a ) n = a b x 2 1 ba dx = 1 ba [ b 3 a 3 3 ] Hence V (X) = E(X 2 ) – (E(X)) 2 = 1 ba [ b 3 a 3 3 ] [ ( a+ b 2 ) 2 ]

Transcript of MC0074 - Set 1

Page 1: MC0074 - Set 1

February 2010

Master of Computer Application (MCA) – Semester 3

MC0074 – Statistical & Numerical Methods using C++

Assignment Set – 1

1. A box contains 74 brass washers, 86 steel washers and 40 aluminum washers, Three washers are drawn at random from the box without replacement. Determine the probability that all three are steel washers. Ans –

No. of ways to succeed = 86C3

No of possible outcomes = 200C3

P(success) = 86C3/200C3 = 0.0779

2. Suppose that the random variable X is uniformly distributed over [a, b]

and if E( x )=

(a+b )2 , then compute the value of V(X)

Ans –

We have

E(X) = (a + b)/2

E(X)2 = ʃ( x+a )n=∫a

b

x21b−a

dx

= 1b−a [ b3−a33 ]

Hence

V (X) = E(X2) – (E(X))2

= 1b−a [ b3−a33 ]−[( a+b2 )

2] V(X) =

(b−a )2

12

Page 2: MC0074 - Set 1

3. If x is normally distributed with zero mean and unit variance, find the

expectation and variance of σ2.

Ans –

The equation of the normal curve is

y = 1σ √2π

e−( x−m )2

2σ 2

If mean is zero and variance is unit, then putting m=0 and σ = 1, the above equation reduced to

y = 1

√2 πe

−( x )2

2

Expectation of x2 i.e µ’1

= ∫−∞

+∞

x21

√2πe

−x2

2 dx

= 1√2 π ∫−∞

+∞

x2e− x2

2 dx ……….. (i)

= 1

√2 π∫ x(−xe−x2

2 )dxIntegrating by parts taking x as first function and remembering that

[ ddx (e−x2

2 )=−xe−x2

2 ]= 1

√2 π [0−2∫0

e−x2

2 ]dxPutting

x

√2 = z, dx = √2 dz

2√2√2 π∫0

e− z2

dz

2√π (√π2 )=1

Hence

1√2 π ∫−∞

+∞

x2e− x2

2 dx = 1 …………. (ii)

Page 3: MC0074 - Set 1

Ans

µ’1 = ∫−∞

+∞

(x2)2 1√2π

e−x2

2 dx

= 1√2 π ∫−∞

+∞

x3(¿−x e−x2

2 )dx ¿

Integrating by parts taking x3 as first function

= - 1√2 π [(x3 e x

2

2 )∞−∞−∫−∞

3 x2 . e−x2

2 dx]= 1

√2 π [0−3∫−∞

x2 . e−x2

2 dx]= 3 1

√2 π ∫−∞∞

x2 . e−x2

2 dx

=3(1) with the help of (ii)

Variance of x2 =µ2= µ2’- µ1’2

= 3-(1)2

= 2

4. Show that if X1 and X2 be two independent random variables with

Poisson distribution and parameters m1 and m2 respectivelly, then the sum

of (X1 + X2) is a random variable with Poisson distribution and parameters

(m1 +m2).

Ans –

5. Find out the geometric mean of the following series

Class 0-10 10-20 20-30 30-40 40-50

Frequency 10 12 11 10 6

Ans –

Here we have

Class Frequency (f) Mid value (X) Log x f(log x)

0 – 10 10 5 .6990 6.9900

Page 4: MC0074 - Set 1

10 – 20 12 15 1.1761 14.1132

20 – 30 11 25 1.3979 15.3796

30 – 40 10 35 1.5441 15.4410

40 – 50 6 45 1.6532 9.9192

Total 49 ∑ f log x=¿¿

61.843

Log G = 1N ∑ f log x

= (1/50)61.843

= 1.2369

G = Antilog 1.2369

= 17.25

6. Find the equation of regression line of x on y from the following data

x 0 1 2 3 4

y 21 8 2

7

34 35

Ans –

sum(X) = 0+1+2+3+4 = 10

sum(X²) = 0²+1²+2²+3²+4² = 30

sum(Y) = 21+8+27+34+35 = 125

sum(Y²) = 21²+8²+27²+34²+35² = 3615

sum(XY) = 0.21 + 1.8 + 2.27 + 3.34 + 4.35 = 304

n = 5

Xbar = sumX / n = 10 / 5 = 2

Ybar = sumY / n = 125 / 5 = 25

gradient m = [ n sumXY - sumX sumY ] / [ n sumX² - (sumX)² ]

= (5.304 - 10.125) / (5.30 - 10²)

Page 5: MC0074 - Set 1

= (1520 - 1250) / (150 - 100)

= 270 / 50

= 27/5

Equation is y = mx + c

Ybar = m.Xbar + c

25 = (27/5)(2) + c

c = 25 - (54/5) = 71/5

Therefore the equation of the regressed line is y = (27/5)x + (71/5)