DSA821S - DATA SCIENCE AND ANALYTICS - 2ND OPP SUPL - JAN 2023


DSA821S - DATA SCIENCE AND ANALYTICS - 2ND OPP SUPL - JAN 2023



1 Page 1

▲back to top


n Am I BIA u n IVER s ITY
OF SCIEnCE Ano TECHnOLOGY
FACULTYOF COMPUTING AND INFORMATICS
DEPARTMENT OF INFORMATICS
QUALIFICATION: Bachelor of Informatics Honours (with specialisations in Web Informatics and
Business Informatics)
QUALIFICATION CODE: 08BIFH/08BIHB
COURSELEVEL:NQF LEVEL8
COURSE:Data Science and Analytics
COURSECODE: DSA821S
DATE: JANUARY 2023
SESSION: 2
DURATION: 2 Hours
MARKS: 60
SECOND OPPORTUNITY/SUPPLEMENTARY EXAMINATION QUESTION PAPER
EXAMINER(S):
DR LAMECK MBANGULA AMUGONGO
MODERATOR (S):
MS EMILIA SHIKEENGA
THIS EXAMINATION PAPERCONSISTSOF 5 PAGES
(INCLUDING THIS FRONT PAGE)
Instructions for the students
1. Answer ALL the questions.
2. Write clearly and neatly.
3. Number the answers clearly.

2 Page 2

▲back to top


3 Page 3

▲back to top


I;
Question 1: Regression
[12]
1) An Autohaus in Windhoek wanted to investigate how the price of one of its car models
depreciates with age. The research department at the company took a sample of eight
cars of this model and collected the following information on the ages (in years) and prices
(in hundreds of Namibian dollars) of these cars.
Age
8
3
6
Price 38
220
95
9
2
5
6
2
33
267
134
112
245
a. Find the regression line with price as a dependent variable and age as an independent
variable.
[3]
b. Give a brief interpretation of the values of a and b calculated in part b.
[3]
c. Predict the price of a 7-year-old car of this model.
[3]
d. Estimate the price of an 18-year-old car of this model.
[3]
2

4 Page 4

▲back to top


r

5 Page 5

▲back to top


Question 2: Association analysis
[15]
The following incomplete table summarises supermarket transaction data, where Boerewors
refers to the transactions containing Boerewors, ~ Boerewors refers to the transactions that
do not contain Boerewors, pies refer to the transactions containing pies, and ~pies refers to
the transactions that do not contain pies.
Pies
"'Pies
Total
Boerewors
2000
1000
"'Boerewors
500
Total
5000
a) Complete the table.
[5]
b) Assume that the association rule "Boerewors Pies" is mined. Given a minimum support
threshold of 25% and a minimum confidence of 50%, is this association rule strong?
Support your answer with calculations.
[5]
c) Based on the given data, is the purchase of Boerewors independent of the purchase of
Pies? If not, what kind of correlation relationship exists between the two? Show the Lift
calculation.
[5]
Question 3: Association analysis
[10]
A table has five transactions. Let the minimum support (min sup)= 60% and min confidence
(conf) = 70%.
ltemlD
FlO0
FlOl
F102
F103
F104
F105
ltems_bought
{Pork, Beans, Mutton, Beef, Salad}
{Mutton, Beef, Milk, Salad, Lamb}
{Lamb, Beef, Mutton, Salad}
{Rice, Pap, Mutton, Beef, Lamb}
{Rice, Pap, Pap, Beef, Salad, Beans}
{Beans, Mutton, Beef, Pork, Lamb, Rice, Pap}
1) Find all frequent item sets using Apriori algorithm.
[10]
3

6 Page 6

▲back to top


7 Page 7

▲back to top


Question 4: Classification
[13]
1. The table below illustrates the prediction for a model to predict Bankruptcy. Based the test
set, calculate the evaluation measures.
No Target Prediction No Target Prediction No Target Prediction
1 No Cancer No Cancer 8 Cancer
Cancer
15 No Cancer No Cancer
2 No Cancer No Cancer 9 No Cancer No Cancer 16 No Cancer No Cancer
3 No Cancer No Cancer 10 No Cancer No Cancer 17 Cancer
No Cancer
4 No Cancer No Cancer 11 No Cancer No Cancer 18 Cancer
Cancer
5 Cancer
Cancer
12 Cancer
Cancer
19 Cancer
Cancer
6 No Cancer No Cancer 13 No Cancer No Cancer 20 Cancer
Cancer
7 Cancer
Cancer
14 Cancer
Cancer
21 Cancer
No Cancer
a) Complete the confusion matrix.
b) Compute the misclassification rate.
2. Consider the following 3-class confusion matrix:
Predicted
Actual
A
B
A
25
5
B
3
32
C
1
0
a) What is the overall accuracy?
b) What cc:inyou say about Recall and Sensitivity?
c) What is the precision for class A?
[4]
[4]
C
2
4
15
[2]
[2]
[1]
4

8 Page 8

▲back to top


9 Page 9

▲back to top


Question 5: Linear optimisation
(10]
A new logistic company, has 6 packages to deliver in a day. The warehouse is located at point
A. The 6 delivery destinations are given by U, V, W, X, Y, and Z. The numbers on the lines
indicate the distance between the cities. To save on fuel and time the delivery person wants
to take the shortest route.
u
z
a) Compute different routes for going to all the 6 destinations and then come up with the
shortest route.
ENDOF EXAM
5

10 Page 10

▲back to top


n!im:stf·)
Ur:fV!=RS~T'f
or-:sc:r:ncEr:nu
T[f!-:r10L01-:;\\•
i PiBagn~;;:
Vwtfln,~cl-h.nmE:!'?!A
I
I