0% found this document useful (0 votes)
20 views

STA 2311 Statistical PRINT READYogramming II - 2

Uploaded by

sean40708
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

STA 2311 Statistical PRINT READYogramming II - 2

Uploaded by

sean40708
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DEDAN KIMATHI UNIVERSITY OF TECHNOLOGY

University Examinations 2017/2018


Third Year First Semester Supplementary/special Examination for the Degree of Bachelor of Science in
Actuarial Science

Date: 15th M arch 2018 STA 2311: Statistical Programming II Time: 2−4PM
INSTRUCTIONS: Answer question ONE (COMPULSORY) and any other TWO questions.

QUESTION ONE [30 MARKS]


(a) Briefly explain the following statistical tests; z-test and t-testand give their respective R-codes. [5 marks]
(b) Suppose that as a manager, you own millions of KCB shares and you would like to know how the share will
perform tomorrow. If the past prices are stored in drive H in a folder called shares as price.csv with 2520 traded
days. With the help of R, write a script that reads the data, plots the past prices and estimate the regression
coefficients using the least squares method. [7 marks]
(c) Briefly describe post hoc analysis as used in data analysis, and hence explain any three methods used for this
analysis. [8 marks]
(d) Distinguish between Chi-squared goodness of fit tests and Chi-squared tests for homogeneity. [4 marks]
(e) Explain the concept of central limit theorem, and hence write the R-code that can justify this concept by using
randomly generated data from a normal distribution. [6 marks]

QUESTION TWO [20 MARKS]


(a) Discuss the concept of Sampling Size of Population Proportion. By using a 50% planned proportion estimate,
find the sample size needed to achieve 5% margin of error for the female student survey at 95% confidence level.[10 marks]
(b) Distinguish between Chi-squared distribution and Student t distribution. [2 marks]
(c) Briefly discuss how model assumptions can be tested in regression analysis, and hence give the R-code that can
produce the diagnostic plots and interpret each. [8 marks]

QUESTION THREE [20 MARKS]


(a) Briefly explain the concept of resistant measures of center and spread by using the relevant R-code. [5 marks]
(b) Briefly discuss the concept of multiple regression and hence; explain the following model formula as used in
regression analysis; [2 marks]
i. y ∼ x1 ∗ x2 [1 mark]
ii. y ∼ x1 + x2 + x3 [1 mark]
iii. y ∼ x1 [1 mark]
(c) Explain the use of multivariate data and hence describe any three ways to view multivariate data. [7 marks]
STA 2311: Statistical Programming II Page 2 of 2

QUESTION FOUR [20 MARKS]


(a) Briefly discuss the concept of Lower Tail Test of Population Mean with Unknown Variance and hence;
Suppose the manufacturer claims that the mean lifetime of a light bulb is more than 10,000 hours. In a sample
of 30 light bulbs, it was found that they only last 9,900 hours on average. Assume the sample standard deviation
is 125 hours. At 0.05 significance level, can we reject the claim by the manufacturer? (Hint: write R-code for
every step as you do the computation) [10 marks]
(b) Consider the following R-code and hence explain what each line of code does;
(c) Stem and leaf plot is commonly used in data analysis, briefly discuss and hence give an example to generate a
stem and leaf plot. [5 marks]

QUESTION FIVE [20 MARKS]


(a) Discuss the concept of looping as used in R programming. [5 marks]
(b) Explain the underlying concepts of the functions, f ivenum() and the quantiles() hence give an example for
each using appropriate R commands. [4 marks]
(c) Describe the steps to be followed when carrying out an ANOVA test during statistical analysis. [6 marks]
(d) Explain the concept of bootstrap sampling and hence give some of the benefits of sampling. [5 marks]

END OF EXAM

Semester one exam Last page

You might also like