

CS  08 Numerical & Statistical Computing

_{B}^{C}

(viii) v = A 
(d) For J = 2 and K = 5, find the final values of J and K after each
program segment: (3)
(i) If (J  K) 10, 10, 20
10 J = K
20 J = J + 2
(ii) IF (J .GE. K) J = K + 2
J = J + 2
(e) Suppose J, K and L contain 10, 20 and 30 respectively. Find the value
of each of the following logical expressions: (3)
(i) .NOT. (5 .EQ. J  5 .AND. 2 * K .EQ. J + L)
(ii) 2 * J .EQ. K .AND. K .LE. L
(f) Suppose A, B and C contain 111.222, 444.666 and 777.888 respectively
, and (3)
WRITE (*, 100) A, B, C
is executed. Describe the output, if the accompanying FORMAT statement
is
(i) 100 FORMAT (1X, F10.2)
(ii) 100 FORMAT (F7.3, 2X, E15.7/F15.2)
(g) Following table gives the height (in inches) of the employees of an organization: (4)
Height in inches 
Number of employees 

5060 
05 
6070 
35 
7080 
08 
8090 
02 
Calculate the variance of the above classdistribution.
(h) Fit a straight line to the data given by the following table: (4)
Independent Variable 
Dependent 

1 
6 
2 
5 
4 
9 
5 
11 
6 
13 
8 
17 
(i) A jar contains 6 red balls, 4 green balls, 3 blue balls, and 2
white balls. A sample of size 6 balls is selected at random without replacement.
Find the probability that the sample contains 2 red balls, 2 green balls,
1 blue ball, and 1 white ball. (4)
2. (a) Write a FORTRAN function which reads an integer n and then reads n pairs of (x, y) points. For each point (x, y) finds whether the point lies within a circle with center (0, 0) and radius 2 and prints suitable message. (6)
(b) Write a program to convert any ndigit hexadecimal number to its equivalent decimal number. For example, decimal equivalent of AB8F is 43919. (9)
3. (a) A departmental store keeps records of various items in a format (10)
Stock number 
Item description 
Quantity at hand 
Unit 
Stock number is a 2digit number, Item description is a 13character name of the item and its category/size, Quantityathand is a 4digit number, which is the number of items in hand/store. Unit price is the price of a single item.
Develop a program to prepare sequential access file consisting of N records, each record refers to one item. The program should be such that it makes the following checks:
(b) For the following frequency distribution, draw (lessthan type) frequency polygon:
Class 
Frequency 

14 
3 
47 
5 
710 
4 
1013 
1 
1316 
6 
1619 
7 
1922 
5 
2225 
14 
2528 
1 
2831 
4 
4. (a) If the probabilities that a person purchasing a new car will choose green, white, red or blue colour are 0.08, 0.09, 0.15 and 0.21 respectively, then what is the probability that a given buyer will choose a new car which has any one of these colours? (4)
(b) The probability that a college student being male and that of being female are 1/8 and 7/8 respectively. The probability that a male student completes the course is 2/3 and that a female student completes the course is 1/3. A student is selected at random and is found to have completed the course. What is the probability that the student is a male? (6)
(c) Let X be the number of 1's obtained in 15 throws of an unbiased dice. Find its mean and variance. (5)
5. (a) Calculate the correlation coefficient for the following data: (7)
x 
y 

15 
9 
10 
12 
5 
18 
12 
10 
17 
5 
18 
2 
(b) The following table gives the average wholesale prices of the
four grains for the years 1996 to 2000. Compute the chain base index number.
(8)
Grain 
1996 
1997 
1998 
1999 
2000 

Wheat 
100 
120 
115 
125 
150 
Gram 
100 
95 
105 
115 
98 
Barley 
100 
110 
105 
95 
120 
Rice 
100 
115 
110 
120 
115 
6. (a) Compute the approximate value of the integral
I =(x
+ x^{2}) dx
using Simpson's rule by taking interval size h as 1. (7)
(b) Find the value of dy/dx at x = 2.0 for the function given by the following table: (8)
x 
f(x) 

1.0 
2.7183 
1.2 
3.3201 
1.4 
4.0552 
1.6 
4.9530 
1.8 
6.0496 
2.0 
7.3891 
2.2 
9.0250 




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