You are on page 1of 4

Assignment Final Mathematical and Statistical Methods for Data Science Fall 2020

National University of Computer and Emerging Sciences, Lahore Campus


Course Name: Math and Stat Methods for DS Course Code: DS 501
Program: MS(DS) Semester: Fall 2020
Duration: 31/1/2021 Total Points:
Paper Date: 23/1/2021 Page(s): 5
Exam Type: Final Exam Assignment Questions Weightage 5+5+5%

Registration No.______________________
Instructions:
Attempt all questions

PROBABILITY [5 Marks]
1 Let A and B be two events. Suppose that the probability that neither event occurs is
3/8. What is the probability that at least one of the events occurs?

2 Let C and D be two events. Suppose P(C) = 0:5, P(C ∩ D) = 0.2 and
P ( (C U D)c ) = 0.4. What is P( D )?

3 A six-sided dice, with numbers {1, 2, 3, 4, 5, and 6} written on the six sides, is rolled till
the sum of all numbers rolled is greater than 6. If the random variable X denotes the
number of times the dice is rolled find the CDF FX(x) of X and use it to find FX (2), FX(1),
and FX(10).

4 Derive expressions for the mean and variance of a random variable distributed
uniformly in the interval [a b]. Show all working.

5 Numerical measurements of n objects are collected and are denoted as x1, x2,…, xn. It
is assumed that the measurements follow the following distribution function with τ
being the parameter of the distribution.

Derive an expression for the ML estimate of the parameter.

1
Assignment Final Mathematical and Statistical Methods for Data Science Fall 2020

ALGEBRA [5 Marks]
6 Consider the following 5 x 5 matrix

1 0 0 0 0
A= 0 2 0 0 0
0 0 1 0 0
0 0 0 4 0
0 0 0 0 6

I. What are the eigenvalues of the matrix A?


II. Also find the corresponding eigenvectors.

7 Given the dataset, D = { [1 1 3]T, [1 -1 3], [-1 1 3], [-1 -1 3] }, consisting of three
dimensional vectors. Use PCA to reduce the dimension of this dataset to 2 and also find
the reconstruction error introduced because of dimension reduction.

8 Use the Gram-Schmidt procedure to find a basis of R3 using the following three
vectors A = [1 1 0]T, B = [1 1 1]T and C = [1 2 3]T

9 Which of the following set of vectors form a basis of R2 and which do not form the
basis? Give a clear reason
I. A = { [1 1]T, [2, 2]T }
II. B = {[1 1]T,[1 0]T,[0 1]T}
III. C = {[1, 2]T, [1 1]T}
IV. D = [[1 1]T]
V. E = {[1 1]T, [-1 1]T}

10
a. Find the orthogonal projection of [1 0 1]T onto [1 1 0]T . Show working.
b. Add a single vector to the set of vectors { (1,1,0), (1,0,1)}, so that it forms a
basis for R3.
2
Assignment Final Mathematical and Statistical Methods for Data Science Fall 2020

OPTIMIZATION [5 Marks]
11. Linear Programming and Simplex Method
Part a). Use the graphical method to find the optimal solution of the following LP
Maximize 𝑍 = 5𝑋 + 4𝑋
Subject to 6𝑋 + 4𝑋 ≤ 24
6𝑋 + 3𝑋 ≤ 22.5
𝑋 +𝑋 ≤5
𝑋 + 2𝑋 ≤ 6
−𝑋 + 𝑋 ≤ 1
𝑋 ≤2
𝑋 ,𝑋 ≥ 0

Part b) Consider the following case study. Device a linear optimization problem for
maximizing the net profit gained by the company and use the simplex method to find
the value of the optimal solution as well.
CASE STUDY: A cloth manufacturing company in Faisalabad produces Parka, Goose
Overcoat, Insulated Pants, and Gloves. All products are manufactured in four different
departments: cutting, insulating, sewing, and packaging. The company has received firm
orders for its products and the contract stipulates penalty for undelivered items. The
following table provides pertinent data of the situation
Time Per unit(hr)
Department Parka Goose Pants Gloves Capacity(hr)
Cutting .30 .30 .25 .15 1000
Insulating .25 .35 .30 .10 1000
Sewing .45 .50 .40 .22 1000
Packaging .15 .15 .1 .05 1000

Demand 800 750 600 500


Unit Profit $30 $40 $20 $10
Unit Penalty $15 $20 $10 $8
3
Assignment Final Mathematical and Statistical Methods for Data Science Fall 2020

12. Gradient Descent


Consider the function F (a, b, c, X, Y) = a. X + b. Y + c. Assume that the value of this function
is known at three different points as shown in the table below
X Y FUNCTION VALUE
(FV)
1 2 1
-2 5 6
0 1 1

If we define the error as follows

𝐸(𝑎, 𝑏, 𝑐) = (𝐹𝑉 − 𝐹(𝑎, 𝑏, 𝑐, 𝑋, 𝑌)


,

Assuming that the initial value of the parameters a, b and c are 0.5, 1, and 0 respectively,
find the updated values of parameters a, b and c after one iteration of gradient descend
procedure for minimizing the error.

You might also like