Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

QBUS1040: Foundations of Business Analytics

Mid-semester exam

Semester 2, 2022

This is an 80-minute take-home exam.  There is no separate reading time.  The exam is open book, open notes. You may refer to the documentation of Python (python.org) and Python packages such as NumPy (docs.scipy.org).

However, you cannot discuss this exam with anyone until the exam is over. This means you cannot use online forums, social media platforms and any other means of communication.  The use of search engines (Google, Bing, Yahoo, Baidu, etc.) is also forbidden.

Throughout this exam, we use standard mathematical notation; in particular, we do not use (and you may not use) notation from any computer language or from any strange or non-standard mathematical dialect (e.g., physics). Also, you may not use concepts or material from other classes (say, a linear algebra class you may have taken) in your solutions. All the problems can be done using only the material from this class, and we will deduct points from solutions that refer to outside material.

This exam consists of eight problems that require you to submit a written response. You should submit a PDF to GradeScope and match the page number with the questions that you answered. You can find detailed instructions on how to scan and submit your assignments on Canvas.  If you fail to match the page to the corresponding question, the marker will not be able to view your response, and thus, you will be awarded a 0 mark for the question.

Good luck!

1.  (6 points)  True or False.

(a)  The columns of a tall matrix are always linearly independent.

⃝  True     ⃝  False

(b)  The superposition property must hold for any affine function without additional assumptions. ⃝  True     ⃝  False

(c)  Any linear vector-valued function can be expressed as an inner product of two vectors. ⃝  True     ⃝  False

(d)  The goal of clustering a set of vectors is to determine the nearest neighbours of each of the vectors.

⃝  True     ⃝  False

(e)  The k-means algorithm can converge to different final clusterings, depending on the initial choice of representatives.

⃝  True     ⃝  False

(f)  The choice of k, the number of clusters to partition a set of vectors into, should always be as large as your computer system can handle.

⃝  True     ⃝  False

2.  (10 points)  A particular computer can compute the inner product of two 106-vectors in around 0.001 second.  The same computer can compute the inner product of two 108-vectors in (approximately) how long?

3.  (10 points)  Use Python to create a vector a such that aT x (with x an 11-vector) is the average of the even entries of x, i.e., entries 2, 4, 6, etc.  Check that aT x gives the correct result for a random vector x. Report the size of a and the entries of a.

4.  (10 points)  Show that the following function f : R3  → R is not linear. Hint:  To show a function f is not linear, it is enough to find specific vectors x, y, and scalars α , β, for which superposition does not hold.

f(x) = (x1 − x2 + x3 )2

5.  (10 points)  Using Python, find the nearest neighbour of a = (2, 4, 5) among the vectors xi : x1  = (5, 3, 5),    x2  = (0.4, 30, 30),    x3  = (3, 4, 10),    x4  = (10, 30, 40).

Report the minimum distance of a to x1 , . . . ,x4 .  Also, find which of x1 , . . . ,x4  makes the smallest angle with a and report that angle in radians. Round your answers to two decimal places.

6.  (10 points)  How are x and Ax related, where A is the 6 × 6 matrix shown below. Your answer should be in English.

l0  0  0 A =

0

1

0

0

0

0

0

1

1

0

0

0

0

0

0

1

0

0

0

0

0

0

1

0

0

0

0

0

1   .

0

7.  (10 points)  Suppose that G : Rn  → Rm is an affine function. Let x1 , . . . ,xk  be n-vectors, and define the m-vectors y1  = G(x1 ), . . . ,yk  = G(xk ). Let

 = (x1 + ... + xk )/k,        y¯ = (y1 + ... + yk )/k

be the averages of these two lists of vectors.  Show that we always have  = G().  In words:  the average of an affine function applied to a list of vectors is the same as the affine function applied to the average of the list of vectors.

8.  (10 points)  Suppose the 5-vector c gives the coefficients of a quartic (degree four) polynomial p(x) = c1 + c2 x + c3 x2 + c4 x3 + c5 x4 . Express the conditions

p(1) = p(2),        p\ (1) = p\ (2)

as a set of linear equations of the form Ac = b. Give the sizes of A and b, as well as their entries.