AMS602S - APPLIED MATHEMATICAL STATISTICAL - 2ND OPP - JANUARY 2024


AMS602S - APPLIED MATHEMATICAL STATISTICAL - 2ND OPP - JANUARY 2024



1 Page 1

▲back to top


nAmlBIA UnIVERSITY
OF SCIEnCE AnDTECHnOLOGY
FacultyofHealthN, atural
ResourceasndApplied
Sciences
Schoolof NaturalandApplied
Sciences
Departmentof Mathematics.
StatisticsandActuarialScience
13Jackson:<aujeuSatreet T: •264 612072913
PrivateBag13388
E: msas@nust.na
Windhoek
W: www.nust.nJ
NAMIBIA
QUALIFICATION : BACHELOR of SCIENCE IN APPLIED MATHEMATICS AND STATISTICS
QUALIFICATION CODE: 07BSAM
LEVEL:6
COURSE: APPLIED MATHEMATICAL AND STATISTICAL
COMPUTING
COURSECODE: AMS602S
DATE: JANUARY 2024
SESSION: 1
DURATION: 3 HOURS
MARKS: 100
SECOND OPPORTUNITY/ SUPPLEMENTARY: EXAMINATION QUESTION PAPER
EXAMINER:
MODERATOR:
Mr. Jan Johannes Swartz
Dr. Dibaba Gemechu
INSTRUCTIONS:
1. Answer all the questions using MATLAB R2007b and IBM SPSSStatistics 28 software
on your computer into the z-drive
2. Create a MS Word document in your z-drive on your computer. Copy your results
from MATLAB R2007b and IBM SPSSStatistics 28 in the MS Word document and
save the MS Word file containing your student number, e.g. 2001349.
3. No books, notes and other additional aids are allowed.
4. Mark all answers clearly with their respective question numbers.
PERMISSIBLE MATERIALS:
1. Computer with MATLAB R2007b, IBM SPSSStatistics 28 and MS Office software
ATTACHEMENTS
1. None
This paper consists of 8 pages including this front page

2 Page 2

▲back to top


Use MATLAB R2007b, installed in your computer, to answer the following questions.
Question 1 [25 marks]
643 ]
1.1. Let A = 7 3 4
[ 965
1.1.1. Using the column operator(:), create a column vector that contains all the
columns of A.
[2]
1.1.2. Using the column operator(:), create a column vector that contains all the
rows of A.
[2]
1.1.3. Using the column operator(:), create a row vector that contains the pt row
and the 3rd column of A.
[2]
1.2. Let X = (145 -1 0 7]
1.2.1 Extract the entries 1, 3 and 5 of X
[2]
1.2.2 Square the entries 2, 4 and 6 of X
[2]
1.2.3 Create the scalar Y that contains the third entry of X
[2]
1.3. Draw the curve
[6]
for -5 x 5 and -5 :s:y :s;5. Using the surf function. Label axis and provide a title.
Remove the grid. Color the curve in gray.
1.4. Solve the following system of linear equations.
[5]
2x - 3y + 4z = 5
y + 4z + X = 10
-2z + 3x + 4y = 0
Applied Mathematical and Statistical Computing (AMS602S)
2
2nd Opportunity- January 2024

3 Page 3

▲back to top


1.5. Write the MATLAB command for the following line and solve for Y.
Y = I X e O x - c o s ( b X ) I for a = I I , b = tr and
X == {2,4,6,8}
(2]
Question 2 [25 marks)
Type the following data in a notepad file, safe the file as a text file and name it as
studentnoQ2.txt. Import the data file in MATLAB. Save the text file in your folder in the z-
drive.
(4]
Age Salary Age of oldest
person
Staying on campus will
improve my results
Sleeping more hours
will improve results
19 20000
97
2
3
28 45000
102
4
2
22 72000
96
4
1
21 45000
121
5
2
21 48000
93
1
2
20 49000
99
3
4
25 15000
140
2
4
21 18000
60
4
4
21 20000
67
2
2
20 20000
98
1
1
20 20000
92
4
2
19 65000
102
4
4
26 10000
100
5
1
27 15000
96
4
1
22 18000
98
4
1
24 45000
75
5
3
Create an M-File in MATLAB and write a pseudocode to answer the questions below. Save
your m-file as studentnoQ2.m. in your folder in the z-drive.
(4]
Applied Mathematical and Statistical Computing (AMS602S)
3
2nd Opportunity- January 2024

4 Page 4

▲back to top


2.1 Determine the mean, median, mode, range, variance and standard deviation of
the variables; age, salary and age of oldest person.
[6]
2.2 Display the shape of the distribution of salary and age in the form of a histogram
with legends and their exponential fit.
[5]
2.3 Find the covariance of age and salary, the correlation coefficient and the
correlation of determination.
[6]
Use IBM SPSSStatistics 28, installed in your computer, to answer the following questions.
Question 3 (25 marks]
3.1 Ministry of Health and Social Services (MoHSS) hired 3 unemployed youth to do in-home
care for elderly people at the Senior Park in Pioneers Park, Windhoek so that they can remain
independent and stay in their homes as long as possible. The students do cleaning, yard work,
shopping, etc. The MoHSS employed 5 students from NUST to interview the seniors in their
homes and assessing their need for services. The information is used to match the seniors
with the students who want employment:
The following variables were used to collect data about the elderly people:
• Age at last birthday ("age"):
• Sex of respondent ("sex"):
1 = Male
2 = Female
• Lives alone ("alone"):
l=Yes
2=No
• Low income ("lowincome"):
1 = Eligible for Supplemental Security Income,
2 = Not Eligible for Supplemental Security Income
• Need for assistance with the activities of daily living ("AOL"):
1 = Bathing
2 = Dressing
3 = Toileting
Applied Mathematical and Statistical Computing (AMS602S)
4
2nd Opportunity- January 2024

5 Page 5

▲back to top


4 = Transferring in/out of bed
5 = Eating
• Total number of ADLs needing help: Need for assistance with the instrumental
activities of daily living ("IADL"):
l=Using telephone
2=Shopping
3=Preparing food
4=light housework
S=Heavy housework
6=Finances
• Systolic Blood Pressure ("SBP")
To keep track of the needs of potential clients, the program created a data file from one
month's new applications shown in Table 1 below.
Applied Mathematical and Statistical Computing (AMS602S)
5
d Opportunity- January 2024

6 Page 6

▲back to top


Table 1: Senior park residents
pn
age
sex
alone
1
74
2
2
2
66
1
2
3
81
2
1
4
76
2
2
5
74
1
1
6
69
2
2
7
79
2
1
8
80
1
2
9
89
2
2
10
60
1
1
11
88
2
1
12
82
2
1
13
79
2
1
14
77
1
2
15
62
1
1
16
83
1
2
17
80
2
1
18
85
1
2
19
66
1
1
20
84
1
2
21
74
2
2
22
64
1
2
23
74
1
1
24
63
1
2
25
66
2
2
26
63
1
1
27
60
1
1
28
65
2
2
29
61
1
1
30
69
1
1
lowincome AOL
2
2
2
4
2
2
2
3
2
1
1
4
2
2
1
3
2
3
2
2
2
3
2
2
2
1
2
3
2
1
2
4
2
2
2
1
2
1
2
4
2
4
2
1
2
2
2
3
2
2
1
1
2
3
1
2
2
4
2
3
IADL SBP
4
215
6
144
5
200
4
180
5
175
4
152
4
170
6
171
5
220
6
154
3
218
4
211
4
177
6
175
4
128
6
130
2
188
4
125
3
116
6
155
4
136
2
142
5
120
6
120
6
160
3
158
6
125
2
155
4
144
6
175
Applied Mathematical and Statistical Computing (AMS602S)
6
2nd Opportunity- January 2024

7 Page 7

▲back to top


3.1.1 Enter the data from Table 1 above into SPSSand define all the variables in SPSS.
Save your SPSSdata file in your z-drive using your initials and student number, eg.
Studentno_Q3.
[10)
3.1.2. Recode the variable "age" into "agegroup" using the following categories:
1 = 60-69 yrs
2 = 70-79 yrs
3 = 80+ yrs
Define the variable with labels and run a frequency table of the variable
"agegroup".
[2)
3.1.3. Produce frequency tables with counts and percent and appropriate graphs of the
following variables:
i. Sex of respondent ("sex")
ii. Lives alone ("alone")
iii. Need for assistance with the activities of daily living ("ADL")
iv. Need for assistance with the instrumental activities of daily living ("IADL") [8)
3.1.4. Produce descriptive statistics and a histogram with a normal curve of the
following variables:
i. Age at last birthday ("age")
ii. Systolic Blood Pressure ("SBP")
[4)
3.1.5. MoHSS would like to determine whether there is an association between the
Sex of respondent ("sex") and whether the respondent lives alone ("alone"). State the
null and alternative hypothesis. Run an appropriate test to test the hypothesis. Write
up a short narrative explaining your results.
[6]
Question 4 (25 marks)
Please use the data from Question 3.1 to answer the following questions:
4.1 What is the mean age and mean SBPof the 30 people?
[2]
Applied Mathematical and Statistical Computing (AMS602S)
7
2nd Opportunity- January 2024

8 Page 8

▲back to top


..
4.2 Carry out a simple linear regression of SBPas the dependent variable and age as the
independent variable and show the results.
[4]
4.3 State the regression equation and interpret the equation in terms of age and systolic
blood pressure.
[4]
4.4 How much of the variation in systolic blood pressure is explained by the differences in
age?
[2]
4.5 Is the regression line significant? State your hypothesis and the p-value?
[3]
4.6 If women have, on the average, lower systolic blood pressure than men, can we
conclude that this is also true in our population? Can we make an inference about the
population (all people) from our sample of 30 people selected from the population? Is the
difference statistically significant? State the p-value.
[5]
4.7 Use One-Way Analysis of Variance to compare the mean age of females and males? [5]
**************************END OF EXAMINATION*****************************
Applied Mathematical and Statistical Computing (AMS602S)
8
2nd Opportunity- January 2024