Monday, 1 May 2017

STA 421: STATISTICAL COMPUTING

The task is to be undertaken in groups of a maximum of 6 individuals.  Copying will result in the final mark being divided by the number of similar copies

Q1
Consider the dataset format in the table below that depicts the final mark of students taking three common units; SAS 102, BAS 202 and SOC 222.  The students were drawn from BA (Community Development), BA (Criminology) and BA (Sociology). The age of the students were recorded. Further the students were asked the number of hours they studied in a week. Use R for this question giving the command used in each case.

Sno
Course
Age
SAS102
BAS202
SOC222
Sex
Study Hours
1







2







3








a)      Use R  to generate the data having 30 records as follows:
Course: A uniform random number between 1 and 3 with 1 representing Community Development, 2- Criminology and 3- Sociology
Age: A uniform random number between 18 and 28
SAS102: A normal random number with mean 62 and standard deviation 5.5
BAS202: A normal random number with mean 52 and standard deviation 8.6
SOC222: A normal random number with mean 57 and standard deviation 3.9
Sex: A uniform random number between 0 and 1 with 0 representing female and 1 representing male
Study Hours: A uniform random number between 3.2 and 18.6
Submit the generated dataset

b)     Present the appropriate summaries for the data
c)      Did male students perform better than their female counterparts in the three units?
d)     Compare the performance in the three units
e)      Are the mean marks of the three units the same for the courses the students were drawn from?
f)       Using the usual grade classification, determine whether the grades for the three units are independent of the course.
g)     Obtain the regression equation for the relationship between study hours and the final mark for the three units. Interpret your finding
 (30 marks)
Q2
Discuss the process of Monte–Carlo simulation
                                                                                                                                    (10 marks)
Q3
Generate 20 N(0,1) random numbers in Ms Excel using the Box-Muller Algorithm                                                                                                                                                (5 marks)
Q4
Explain the following methods of testing the randomness of a sequence of numbers and perform the test for the data generate in Q3 above
a)      Frequency Test                                                                                             (7 marks)
Run Test                                                                                                        (8 marks

No comments:

Post a Comment