Professional Documents
Culture Documents
Copyright reserved
UNIVERSITY OF PRETORIA
DEPARTMENT OF STATISTICS
ÿatiÿics 310
ÿk310
EXAMINATION 3 SECTION A JUNE 2018
EXTERNAL EXAMINER: DR S BIERMAN
INTERNAL EXAMINERS: DR PJ VAN STADEN & DR L FLETCHER
STUDENT NUMBER
SIGNATURE
o The question paper for Section A consists of 14 pages including this front page.
o Answer all questions in the spaces provided.
o An appendix containing a list of formulae is provided on page 14.
o No question paper may be taken out of the venue and no pages may be removed from the
question paper.
o Electronic resources such as smart phones, tablets and other mobile devices may not be used and
must be switched off.
o Use the correct notation and/or formulae and show all your calculations and derivations in order
to receive all marks.
o Unless stated otherwise, when performing a hypothesis test,
º specify the null and alternative hypotheses in terms of the relevant parameter(s),
º use a 5% significance level,
º write down the confidence interval or the p-value given in the SAS Output,
º indicate, with appropriate explanation, whether the null hypothesis is rejected or not,
º and provide a clear, concise conclusion.
o When using or giving values from the SAS Output, do not round off these values, but use or
give them exactly as they appear in the SAS Output.
o Unless stated otherwise, give final answers correctly up to 4 decimal places.
o All other test / examination regulations apply – see page 2.
Students should take note that, if found guilty of academic misconduct or non-compliance with these rules, a student could,
among other penalties, forfeit his/her credits for a module and/or be suspended from the University for a period that could
range from one year to permanent suspension. Such a student’s record will be blocked for the period of suspension and
he/she will not be entitled to a certificate of good conduct from the University during this period. Students should also take
note that, if found guilty of academic misconduct, it may negatively influence their admission to other universities and/or
registration with professional councils. Academic misconduct is indicated on all certificates of conduct provided to students
by the University.
Yi = β1 + β 2 X 2i + β 3 X 3i + ... + β k X ki + ui , i = 1, 2, ..., n ,
where
y = X³ + u ,
where
or in matrix notation by
y = X³ˆ + uˆ ,
with
(4)
(b) Show that the OLS estimator for ³ can be rewritten as ³ˆ = ³ + ( X ' X ) −1 X ' u .
(2)
(2)
(3)
[11]
Y = β1 X β 2 ,
where Y is the MRS in kilometers per hour (km/h) and X is the body mass in kilograms (kg).
Consider a data set with 15 South African mammals selected from the updated Super Animal cards. z
This data set is given in the file “mammals.txt” with the values of Y in the second column and the
values of X in the third column.
Note that the dummy variable D in the fourth column of the file will only be used in Question 2(e).
Applying a double-log transformation to the allometric equation yields a linear regression model,
Y * = α + β2 X * + u ,
Use proc reg in SAS to fit this linear regression model to the data with the method of OLS.
Include appropriate options in the model statement of proc reg to obtain 95% confidence
intervals for α and β 2 as well as 95% confidence intervals for the individual MRS values.
data loglog;
set mammals;
lny = ___________________;
lnx = ___________________;
run;
proc reg data = loglog plot = none;
model _____________________________________________;
id mammal;
run;
(4)
z www.campaigns.pnp.co.za/superanimals/
α̂
βˆ2
(2)
(2)
(d) Use a 95% confidence interval to test whether the mean MRS will increase by 0.2% if the body
mass increases by 1%.
o specify the null and alternative hypotheses in terms of the relevant parameter(s),
o write down the 95% confidence interval given in the SAS Output,
o indicate, with appropriate explanation, whether the null hypothesis is rejected or not,
o and provide a clear, concise conclusion.
(4)
Y * = α + β 2 X * + β 3D + u
Use proc reg in SAS to fit this linear regression model to the data with the method of OLS.
Determine whether there is a significant difference between the mean MRS of ungulates and
carnivores using an appropriate t-test.
o specify the null and alternative hypotheses in terms of the relevant parameter(s),
o write down the p-value given in the SAS Output,
o indicate, with appropriate explanation, whether the null hypothesis is rejected or not,
o and provide a clear, concise conclusion.
(4)
[16]
The data set is given in the file “donkeys.txt” with the values of Y in the first column, the values of
X 2 in the second column, the values of X 3 in the third column and the values of X 4 in the fourth
column.
Use proc corr in SAS to calculate the partial correlation coefficient between weight and
girth.
ii. Give and interpret the partial correlation coefficient between weight and girth.
(3)
l Milner, K. & Rougier, J. 2014. How to weigh a donkey in the Kenyan countryside. Significance, 11(4), 40-43.
Y = β1 + β2 X 2 + β3 X 3 + β 4 X 4 + u .
Use proc reg in SAS to fit this linear regression model to the data with the method of OLS.
Include a test statement in proc reg to obtain an F-test to determine whether the mean
weight of a donkey will increase by 2.5kg if there is a 1cm increase in the girth of the donkey
while its height and length remain unchanged.
Do the F-test by
o specifying the null and alternative hypotheses in terms of the relevant parameter(s),
o writing down the p-value given in the SAS Output,
o indicating, with appropriate explanation, whether the null hypothesis is rejected or not,
o and providing a clear, concise conclusion.
(4)
(c) Considering all three available explanatory variables, use proc reg in SAS to find the best
possible three-variable linear regression model based upon the adjusted coefficient of
determination.
That is, find the best linear regression model using two out of the three available explanatory
variables to explain weight.
Give the two selected explanatory variables and the corresponding value of the adjusted
coefficient of determination:
(2)
[13]
TOTAL MARKS: 40
APPENDIX: FORMULAE
û ( x − µ )2 þ
( )
If X ~ N µ , σ 2 , then f X ( x ) =
1
expüü −
2σ 2 øÿ
ÿ
2πσ 2 ý
( )
cov βˆ1 , βˆ2 = − X var βˆ2 ( ) σ̂ 2 = 3 uˆi2
n−k
n 3 X iYi − 3 X i 3Yi 3 xi yi
r= =
(n3 X i
2
− (3 X i )
2
) (n3Y i
2
− (3Yi )
2
) 3 xi2 3 yi2
R 2
= R2 =1−
3 (Yi − Y )
2
3 yi2 3 yi2 (n − 1) ýn−kø
βˆ j − β j
t= ~ t (n − k ) for j = 1, 2, ..., k βˆ j ± tα 2 ( )
var βˆ j for j = 1, 2, ..., k
( )
var βˆ j
σˆ 2 û 2 2 þ
W = (n − k ) ~ χ 2 (n − k ) ü (n − k ) σˆ , ( n − k ) σˆ ÿ
σ 2 ü χα2 2 χ12−α ÿ
ý 2ø
ESS ( k − 1) R 2 ( k − 1)
F= = ~ F (k − 1 , n − k )
RSS (n − k ) (1 − R 2 ) ( n − k )
2
( RSSR − RSSUR ) m ( RUR − RR2 ) m
F= = 2
~ F (m , n − k )
RSSUR (n − k ) (1 − RUR ) (n − k )
û 1 ( X − X )2 þ
( )
var Yˆ0 = σ 2 ü + 0 2 ÿ
ün
Yˆ0 ± tα ( )
var Yˆ0
3 xi øÿ
2
ý
û 1 ( X − X )2 þ
( )
var Y0 − Yˆ0 = σ 2 ü1 + + 0 2 ÿ
ü n
Yˆ0 ± tα (
var Y0 − Yˆ0 )
3 xi øÿ
2
ý