CS - 08 Numerical & Statistical Computing
Dec. 2002

1. (a) Write a FORTRAN 90 statement for each of the following formulae: (3)
(i) z = cot2 (x2) - log x.y
(ii) z = | x2 - y2 | + 6ex.y
(iii) z = sin2 (xy) + ((x)y)z

(b) Which of the following variable names are invalid in FORTRAN 90? Justify your answer. (3)
(i) END
(ii) INTEREST * 3
(iii) KNOWLEDGE

(c) Write which of the following FORTRAN constants are invalid: (3)
(i) 89E2.3
(ii) 8.9E23
(iii) 75, 69, 805

(d) Suppose the integer variables X and Y contain respectively 2 and 7. Find the final values of X and Y in each of the following cases: (3)
(i) If (X .LE. Y) X = X + 5
X = X + 3
(ii) IF (X .EQ. Y + 2) GOTO 15
X = X + 3
15 X = X + Y
.2)

(e) Suppose at some stage values of integer variables P, Q and R are respectively 2, 3 and 4. Find the value of the variable S after each pair of statements given below: (3)
(i) P = -P + P * R * * 2 + Q
S = -P + P * R * * 2 + Q
(ii) P = ABS (P - R * Q)/5
S = ABS (P - R * Q)/5

(f) If P, Q and R respectively contain 222.111, 666.444 and 888.777, and the FORTRAN statement (3)
WRITE (*, 100) P, Q, R
is executed. Describe the output for each of the following accompanying FORMAT statements:
(i) 100 FORMAT ('1', 3E15.5)
(ii) 100 FORMAT (F7.3, 2X, E15.7/F15.1
)

(g) The following table gives the height (in inches) of 100 students, randomly selected from a college: (4)

Height in inches

Number of students

57-60

02

60-63

06

63-66

20

66-69

45

69-72

21

72-75

05

75-78

01


Calculate the variance of the above frequency distribution.

(h) Fit a straight line to the data given by the following table: (4)

Independent Variable
y

Dependent
Variable
z

1

1

3

8

4

17

6

34

7

52

9

78


(i) Four cards are drawn from a well shuffled pack of cards. What is the probability that they are from exactly (any) three different suits? (4)

2. (a) Write a program in FORTRAN to find whether a given square matrix is symmetric. The program should read the matrix size, the elements of the matrix and also should print out an appropriate message. (9)

(b) Write a FORTRAN function FACT with one integer parameter N, that computes the factorial of N and prints suitable message. (6)

3. (a) The constant p can be approximated by (8)

p2/6 = (1 + 1/22 + 1/32 + 1/42 + .......)
Write FORTRAN program which sums the first 700 terms and then on the basis of this summation, computes the aproximate value of p.

(b) The following table shows monthly living expenses for an MCA student of IGNOU: (7)

Item

Amount in (Rs.)

Food

100

Apartment

900

Transport

200

Entertainment

300

Maintenance

400

Miscellaneous

400


Draw a Pie Chart of the monthly expenses.

4. (a) In a bulb making factory, three machines A, B and C manufacture respectively 15, 35 and 50 percent of the total. Out of their total outputs 4, 5 and 3 percent are defective. A bulb is drawn from the produce at random and is found to be defective. What is the probability that it is manufactured by (i) factory A (ii) factory C? (8)

(b) A box contains ten 50-rupee notes, fifteen 10-rupee notes, eighteen 20-rupee notes and twelve 100-rupee notes. A sample of six notes is taken out at random without replacement. Find the probability that the sample contains one 50-rupee note, two 10-rupee notes, one 20-rupee note and two 100-rupee notes. (7)

5. (a) A computer while calculating the correlation coefficient between 25 pairs of two variables x and y, obtained the following constants: (8)
n
= 25, å x = 125, å x2 = 650, å y = 100, å y2 = 460, å xy = 508

A recheck showed that the computer has copied wrongly two pairs (6, 14) and (8, 6) of values of (x, y) instead of the correct values (8, 12) and (6, 8) respectively. Obtain the correct value of the correlation coefficient.

(b) The following table gives the average wholesale prices of the four fruits for the years 1996 to 2000. Compute chain base index number. (7)

Fruit

1996

1997

1998

1999

2000

Apple

1600

1760

1440

1920

2000

Orange

3200

3520

3840

4000

4800

Banana

1920

2080

1680

2240

2400

Grapes

2400

2560

2880

2720

2880


6. (a)
Compute the approximate value of the integral
I =(1 + x2 + x3) dx
using Trapezoidal rule or Simpson's rule by taking interval size h as 1. (7)

(b) From the following table of values of x and y, obtain dy/dx for x = 1.2. (8)

x

y

1.0

2.7183

1.2

3.3201

1.4

4.0552

1.6

4.953

1.8

6.0496

2.0

7.3891

2.2

9.025

Previous Paper  Next Paper

UNIVERSAL TEACHER PUBLICATIONS
Web: universalteacherpublications.com, universalteacher.com, universalteacher4u.com