ADCA/MCA (II Yr)
Term-End Examination
June, 2002
CS - 08 Numerical And Statistical Computing
Time : 3 hours |
Maximum Marks : 75
|
Note:
(i) Use of calculator is allowed.
(ii) Question no. 1 is compulsory. Answer
any three from the rest. |
1. (a) Write a FORTRAN 90 statement for each of
the following mathematical expressions: (3)
(i) z = ex + y + log ( x + y2)
(ii) z = [(ab)/(c + d)]2
(iii) z = [sin
( x + y2) + tan2 xy]
(b) Which of the following variable names are
invalid in FORTRAN 90? Why or why not? (3)
(i) THRI
(ii) 50 + RATE
(iii) END
(c) Write which of the following FORTRAN constants
are invalid: (3)
(i) -3/4
(ii) 85, 75, 896
(iii) 3.6 E 7.3
(d) Locate the error, if any, in each of the following
WRITE-FORMAT pairs: (3)
(i) WRITE (3, 35) X, Y, Z
35 FORMAT (1X, 3E 18.9)
(ii) WRITE (*, 40) A, J, B, C, K
40 FORMAT (F7.1, 8I, E6.2)
(e) Suppose integer variables P, Q and R contain
8, 16 and 24 respectively. Find the value of each
of the following logical expressions: (3)
(i) Q .EQ. 8 .AND. .NOT. P .LT. R - 12
(ii) .NOT. (P .GT. Q .OR. R .LT. 7)
(f) Explain the purpose of EQUIVALENCE statement
in FORTRAN, giving one appropriate example for the
purpose. (3)
(g) The following table gives weights (in kilograms)
of 100 students, randomly selected from a college:
(4)
Weight in Kilograms |
Number of students |
45-50 |
01 |
50-55 |
05 |
55-60 |
21 |
60-65 |
43 |
65-70 |
22 |
70-75 |
06 |
75-80 |
02 |
Calculate the standard deviation of the above frequency
distribution.
(h) Fit a straight line to the data given by the
following table: (4)
Independent Variable
x |
Dependent
Variable
y |
2
|
3
|
4
|
17
|
6
|
38
|
7
|
49
|
9
|
80
|
11
|
120
|
(i) A jar contains 7 red balls, 5 green balls, 4 blue
balls, and 3 white balls. A sample of size 7 balls
is selected at random without replacement. Find the
probability that the sample contains 2 red balls,
2 green balls, 2 blue balls, and 1 white ball. (4)
2. (a) Write a FORTRAN function SUMM with one
integer parameter N, that computes the sum of first
N natural numbers and prints a suitable message. (6)
(b) Write a FORTRAN subroutine MMM that computes
the mean, the minimum and the maximum of an array
A of N real numbers, and prints out the values with
suitable messages. (9)
3. (a) Write a FORTRAN program which finds and
prints all four-digit prime numbers. (7)
(b) For a frequency distribution of marks in History
of 200 candidates, the mean and standard deviation
(s.d.) were found to be 40 and 15 respectively. Later
it was discovered that the score 43 was misread as
53 in distribution. Find the correct mean and standard
deviation corresponding to the correct distribution.
(8)
4. (a) In a bolt factory machines A, B and C manufacture
respectively 30, 35 and 35 percent of the total. Out
of their total outputs 3, 4 and 3 percent are defective.
A bolt is drawn at random and is found to be defective.
What is the probability that it is manufactured by
(i) factory A (ii) factory B? (8)
(b)A jar contains five 50-paisa coins, four one-rupee
coins, three two-rupee and four 5-rupee coins. A sample
of size 6 (coins) is taken out at random without replacement.
Find the probability that the sample contains two
50-paisa coins, two one-rupee coins, one two-rupee
coin and one 5-rupee coin. (7)
5. (a) The following table gives the average wholesale
prices of the four grains for the years 1997 to 2001.
Compute chain base index number. (7)
Grain
|
1997 |
1998 |
1999 |
2000 |
2001 |
Wheat
|
400 |
440 |
360 |
480 |
500 |
Gram
|
800 |
880 |
960 |
1000 |
1200 |
Barley
|
480 |
520 |
420 |
560 |
600 |
Rice
|
600 |
640 |
720 |
680 |
720 |
(b) Calculate the correlation coefficient for the
following data: (8)
x
|
8
|
12
|
15
|
20
|
24
|
27
|
32
|
y
|
30
|
24
|
36
|
44
|
56
|
64
|
72
|
6. (a) Compute the approximate value of the integral
I =(1
+ x2) dx
using Simpson's rule by taking interval size h
as one. (7)
(b) A portion of a table of sines is given below:
Angle in Radians |
Sine |
0.25 |
0.2474 |
0.26 |
0.2571 |
0.27 |
0.2667 |
0.28 |
0.2764 |
0.29 |
0.2860 |
Find the derivative of this function at x = 0.27.
(8)
|