0% found this document useful (0 votes)
75 views30 pages

MIT

MIT notes

Uploaded by

Irene Wambui
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
75 views30 pages

MIT

MIT notes

Uploaded by

Irene Wambui
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 30
MASENO UNIVERSITY UNIVERSITY EXAMINATIONS 2014/2015 SECOND YEAR FIRST SEMESTER EXAMINATIONS FOR THE DEGREE OF BACHELOR OF SCIENCE IN MATHEMATICAL. SCIENCE, APPLIED STATISTICS, ACTUARIAL SCIENCE AND MATHEMATICS AND ECONOMICS WITH INFORMATION TECHNOLOGY (MAIN CAMPUS) MIT 201: STATISTICAL COMPUTING I Date: 26" March 2015 Time: 8.30 - 10.30 am. INSTRUCTIONS: © Answer question ONE and any other TWO questions. MASENO UNIVERSITY 10 9001:2008 CERTIFIED ©) SECOND YEAR FIRST SEMESTER EXAM FOR THE DEGREE OF BACHELOR OF SCIENCE IN MATHEMATICAL SCIENCES, APPLIED STATISTICS, ACTUARIAL SCIENCE AND MATHEMATICS AND ECONOMICS, . MIT 201: STATISTICAL COMPUTING I Instruction: Answer Question One and any other two questions. Question One [30 marks] (s) Bxplain the difference between the following terms: (6 marks} i. Sample and Population li. Diserete and Continuous random variables iil, Workbook in Excel and Workshoot in Excel (b) How would you sort student grades for MITT 201 in Hxeel to see who had the highest score? [2 marks} (6) How would you combine several cells into one in Bxoel? (1 mark] (@) You have boen provided with an Excel Workbook. ‘The task is to create a list of 50 uniform random numbers. Deseribe how you would go about creating them. {8 marks] (e) The length of similar components produced by a company are approximated by a normal distribution model with a ‘mean of 5 em and a standard deviation of 0.02 em. If component is chosen at random, i. what is the probability that the length of this component is between 4.98 and 5.02 om? [2 marks} 5, what is the probability that the length of this component is between 4.96 and 5:04 ca? [2 marks} iii, Bxplain the inputs in the Excel function NORM.DIST(x,s, a, cumulative). [2 marks} (8) The thickness x of a protective coating applied to conductor designed to work in corrosive conditions follows a uniform distributions over the interval {20,40} microns i. Find the mean and the standard deviations of the thickness of the protective coating. [2 marks} 4i, Coinpute the cumulative distribution function of the protective coating. [2 smarts} fii, Calculate the probsbilty that the coating isles than 35 microns thick. (2 marks} fv, Explain the inputs in the Excel function UNIFORM.DIST(sa, f, cumulative). How would you use Excel function UNIFORMDIST()to answer question (ii) above. [8 marks) (g) If the random variable X follows a Poisson distribution with mean 3.4, find P(X = 6). How would you solvé the same problem using the Bxcel function POISSON, cumulative). [8 aris} Question Two [20 marks] (a) Bxplain the inputs in the following excel funetions and state what each function is used for. § 21) (2 mars) ii, P(Q0=0,F2<120),F2,"NA") [4 mks] £) Discuss the importance of learning to use syntax for different statistical software. [3 marks] 2) Give four things to consider when naming variables in a statistical package? [4 mks] Question 2: {20 mks} a) State and explain five good practices when using Excel [10 mks] b) Consider the figure below. It shows data entered in Excel. A 8 c o E F Crown 0 Block Species i 2 3 4|Mean A.polycantha 673 852 920! 815 A.indica 378 420 415 420} 407 A.nilotica 268 420 443 602 433 Albizia lebeck 700 394 352| 482 Species Mean 504 411 570 S74 3 Crown 90 L Block 2 Species | a 2 3 4|Mean + A.polycantha 730 880 750] 787 4 A.indica 354 395 (440 370) 390 3 A.nilotica 375 401-402 S00], 20 3 Albizia lebeck 620 322 340} 427 7 Species Mean 520 373 574 490] (i) State four challenges you may face when trying to export it to a statistical package [4 mks] (ii)Prepare the data for use in a statistical package. Show in one table how it shall look like [6 mks] Question 3: [20 mks} a) State the outputs expected in the following R commands @ > 1:20 [2 mk] Gi)> pizl0 [3 mks] b) Write down an R command that shall generate the following outputs (0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 45 5.0 5.5 6.0 6.57.0 75 8.0 8.5 9.0 9.5 10.0 [3 mks] i)012012012012012012012012012012 — [3mks] Git) 000000000011111111112222222222 [3 mks] ©) State the output from the following commands [2 mks] ( >num_vect<-c(0.5,55,-10,6) >num_veet<1 (DG >5)& 4=—4) [2 mks] ree (ii) (111 >= 111) | (PRUE) & (4+ 1) =5) [2 mks] Question 4: [20 mks} a) A study of the health risks of smoking cigars estimated that the probability of dying from a particular type of cancer in the ten years of the study was 4.0% higher for cigar smokers than for non-smokers with a standard error of 1.8%, (i) Estimate the 95% Confidence interval [4 mks] (ii)Interpret the result in (i) above [3 mks] b) The annual rainfall in a region has been recorded in each of the last n=25 years. The standard deviation of the 25 annual rainfalls is 10 mm. (@ Calculate the standard error [3 mks] (ii)Interpret the output in (Question 4bi) above [3 nks] ¢) Random samples of n=30 values are selected from each of two populations. If the standard deviation in population A is less than that in population B, how would the 95% Cl compare between the two populations? [2 mks] d) A 90% confidence interval for the mean has been calculated from a random sample of n=30 values. Discuss the effect of changing the confidence level from 90% to 95%. [2 mks} e) A 99% confidence interval for the mean has been found from a random sample of n=20 values. If the sample size had been n=30 instead, what effect would it have had on the confidence interval? Explain. [3 mks] Question 5: (20 mks] You have been provided with the following data in CSV format. The data has 1323 rows and eight variables. At least five of its rows are numeric. Between them, there are at least 300 missing values. This data was stored in the folder “c:\r_data” and was saved as “exam.csv” 1 escondert Age [Bender}weigt Height Opmiont Opinion Opin Pikespondent. Rn ans ae ‘ ee Semone? Mata a8 ‘ 7] 2 espondent) = 2M aa ‘ 2] 3 esndens = 30M 586 88 2 5 y 6 Respondents 28M SST : 2 4 7 nespondenté = M58 a8 : toa @ hemondent? Mee 2 a Ta 3 Remondents —37F 33d i > 4 Onewondens eS? 2 cy hesondeni0 aM see 3 . 12 Rewpondentit alr saa a 3 2g by [ a) State the command you shall use to read in the table as a data frame. Read it in as “Newdata” [3 mks] b) State the command that you can use to in order to view the contents of the first five rows of the data [2 mks] ©) Which function shall give you the list of all variable names, their type and a view of a few entries? [2 mks] 4) Write down a command to subset only female respondents from the list, but include all variables. Save it in Newdata_female [3 mks] e) To check for any duplicated valued, one person used the function “duplicated(Newdata)”. Explain the output he got [3 mks] 1) Write down statements you may use to subset “Newdata” so that you only remain with complete rows/columns [3mks] g) Write down a command to create the following matrix [4 mks] 1 2 (: ‘) 5 6 i: on MASENO UNIVERSITY UNIVERSITY EXAMINATIONS 2014/2015 FOURTH YEAR FIRST SEMESTER EXAMINATIONS FOR THE DEGREE OF BACHELOR OF ARTS IN COMMUNICATION & MEDIA TECHNOLOGY WITH INFORMATION TECHNOLOGY (MAIN CAMPUS) MIT 302: STATISTICAL COMPUTING II Date: 25tk March 2015 __ Time: 8.30 - 10.30 am. INSTRUCTIONS: e Answer question ONE and any other TWO questions. MASENO UNIVERSITY ISO 9001:2008 CERTIFIED 6 wa 4 MAINCAMPUS 4™ YEAR 1' SEM AMT410: ENVIRONMENTAL COMMUNICATION INSTRUCTIONS: ANSWER QUESTION ONE AND ANY OTHER TWO QUESTIONS. DURATION:2HRS 1. Environmental awareness is self awareness. Discuss (30 Marks) 2. Wetlands are an invaluable natural resource. Clearly describe the challenges facing this resource and how environmental communication would help alleviate these challenges. (20marks) 3. Write a captivating feature story on Mau forest. (20 Marks) 4. Climate change is a reality. With relevant examples, discuss how it has affected your locality. (20 Marks) 5. a) Hazards can be categorized into various groups. Describe these various categories and explain their main causes. (10 Marks) b) The department of Film Services has approached you to advice on waste disposal. Clearly describe the type of waste you will encounter and how to dispose it. (10 Marks) MASENO UNIVERSITY UNIVERSITY EXAMINATIONS 2014/2015 FOURTH YEAR FIRST SEMESTER EXAMINATIONS FOR THE DEGREE OF BACHELOR OF SCIENCE WITH INFORMATION TECHNOLOGY (MAIN CAMPUS) MIT 401: BAYESIAN MODELLING Date: 8 April 2015 Time: 11.00 - 1.00 pm. INSTRUCTIONS: This paper consists of FIVE questions © Question ONE (compulsory) and any other TWO questions © Observe further instructions on the answer booklet. MASENO UNIVERSITY ISO 9001:2008 CERTIFIED So Pie 4 QUESTION ONE (Compulsory) [30 Marks] (a) Explain briefly what is meant by saying that, in a particular Bayesian statistics problem, a prior distribution is “conjugate” (4 Marks) (b) Explain what each of the following R. packages does in Bayesian Mod- cling; (i) bayesSurv (ii) MCMCpack (iii) bayesm (6 Marks) (c) Ina market research study, a random sample of n members of the public is to be chosen and each person in the sample will be asked whether he or she has used a certain product. We suppose that, given the value of the unknown population proportion 8, each person chosen has probability # of answering “Yes” and each person’s answer is independent of the others. Our prior distribution for 6 is a beta(a,b) distribution. Let the number answering “Yes” be «. (i) Explain briefly why the likelihood function for 6 given the data x is L(0) = (era -6y= i) Find the posterior distribution of 8. i) Given that a = 2, b = 3, n = 50 and x = 32, evaluate the posterior mean and the posterior standard deviation. (10 Marks) (a) Let @ be & gamma(a,b) random variable; (i) Write down the density function of 8 (2 Marks) (i) Evaluate the mean and variance of 8. (8 Marks) ; = | QUESTION TWO [20 Marks] (a) In a certain place it rains on one third of the days. The local evening newspaper attempts to predict whether or not it will rain the following day. Three quarters of rainy days and three fifths of dry days are correctly predicted by the previous evening’s paper. Given that this evening’s paper predicts rain, what is the probability that it will actually rain tomorrow? (10 Marks) (b) A particular species of fish makes an annual migration up a river. On a particular day there is a probability of 0.4 that the migration will start. If it does then an observer will have to wait T’ minutes before seeing a fish, where T has an exponential distribution with mean 20 (ie. an exponential(0.05) distribution). If the migration has not started then no fish will be seen; (i) Find the conditional probability that the migration has not started given that no fish has been seen after one hour. (5 Marks) (ii) How long does the observer have to wait without seeing a fish to be 90% sure that the migration has not started? (5 Marks) QUESTION THREE [20 Marks] (a) We are interested in the parameter, @, of a binomial(n, ) distribution We have a prior distribution for 9 with density 10 ~{peo-gemeem O 2.0. (iii) Find the likelihood. (iv) Find the posterior distribution of A. (v) Find the posterior mean and posterior standard deviation of A. (vi) Give the R codes for plotting a graph showing the prior and posterior probability density functions of \ on the same axes. Sketch the graph. (20 Marks) ERD se) MASENO UNIVERSITY UNIVERSITY EXAMINATIONS 2014/2015 FOURTH YEAR FIRST SEMESTER EXAMINATIONS FOR THE DEGREE OF BACHELOR OF SCIENCE WITH INFORMATION TECHNOLOGY (MAIN CAMPUS) MIT 403: WRITING MACROS WITH LATEX Date: 14% April 2015 Time: 11.00 - 1.00 pm. INSTRUCTIONS: © This paper consists of FIVE questions © Question ONE (compulsory) and any other TWO questions © Observe further instructions on the answer booklet. MASENO UNIVERSITY 180 9001:2008 CERTIFIED y Question One [80 Marks] (a) What is BTEX? What are its advantages? (5 Marks) (b) Can one only produce PDF documents from FTX? (5 marks) (c) Briefly describe how ETgXworks. (5 marks) (2) Is the term in square brackets after the item in a description list, the term you want to define? (5 marks) (d) Describe the five standard classes that are used to produce a document in BTRX, (10 Marks) Question Two {20 Marks] (a) What is a “macros” in IXTEX? Why is it neccessary to define one’s own procedures in a programming language? (b) Write the BTEXcodes that perform the following functions; (i) Define a command that typesets its argument as both bold and italic. (ii) Define a command that takes two arguments; a font sizing com- mand (e.g. small) and a line of text, and define the command so that the text in the second argument is centered and is sized ac- cording to the first: argument: Question Three : [20 Marks] Write B1}:XCode that produces the document entitled Poincaré’s h-Cobordism and the price of fish, shown below; The scientific world has been astonished by an announcement from Dr Tony Strainer, a mathematics lecturer at the University of Nuneaton, os- tablishing a definite link between Poincaré’s h-Cobordism and the price of fish. A partner in this remarkable work is Mr Bert Wilkins, fishmonger and amateur algebraic topologist. Explained Dr Strainer: “we have established a proof of Drivle’s Theorem when the fish function C is finitely-undermined, via a new form of the Rincewind inequality”. Their work is due to appear in the Proceedings of the Iceland Cod Fisheries Society of London, Series D. P-iesa Professor Hertz of Gottingen has remarked: “this result is very excit- ing... We may now be able to show that j(C) is indeed grease-proof, thus opening the way to a mathematical systematisation of wet fish” Question Four [20 Marks] Write TEXCode that produces a one page document titled “Actuarial Sci- ence Project”. Include ALL features of IfT}:Xthat you have learned so far. Question Five [20 Marks] Write ETXcodes that produce the following tables ‘Team sheet Goalkeeper | GK | Paul Robinson Defenders | CB | Dawson LB | Chimbonda CB | King RB | Gardner 9) Fypaietders [MC] Tainio MC | Zakora MC | Lennon Strikers | ST | Malbranque ST | Berbatov ST_| Defoe ‘Table 1: Team Sheet: Spurs v. Blackburn Day Min Temp Max Temp Summary Friday nc T7C Bright or sunny spells at first, generally becoming more cloudy, with show- ers developing, and with more prolonged rain spread- ing from the southwest. Moderate to fresh southwest winds with stronger gusts. Saturday 0G 18 Continuing unsettled with sunny intervals and showers Windy at. times. Sunday 10C 16C More generally cloudy with longer spells of rain, southerly winds of 15mph. ‘Table 2: Weather

You might also like