Final Assignment
Final Assignment
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.
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
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
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.