STAT 475: Data Analysis with SAS Spring 08: Final exam NOTE: Example format for your answer code. /******************************* STAT 475 Final Exam YOUR NAME (YOUR ID) ********************************/ ***** PROBLEM #1 ***********; YOUR SAS CODE HERE; ***** OUTPUT ***************; /* PUT YOUR OUTPUT HERE (copy and paste from output window) */ ***** END OF PROBLEM #1 ****; Repeat for each problem. Each problem should start on a new page. 1) Suppose the following data (final08_1.txt) Bob A Johnson MATH STAT 542 345 555 544 2 1 33 455 Mike H Chen APPLIED REGRESSION 125 345 2 2 222 355 442 11 232 555 Mike H Chen EXP Design Analysis 554 344 445 333 1 22 444 555 Jane D Scheaffer STAT INFERENCE 455 555 54 344 554 Jane D Scheaffer BIOSTATISTICS 233 333 211 334 442 which consists of teachers name, course title, followed by student rating on 3 questions. For example there were 7 students in Bob's class. The first student rated Bob 5 on the first question, 4 on the second question and 2 on the third question. Note that there are some missing responses. Also note that there are two spaces between name and course title. Save the data and read into a SAS data set whose observations consist of teacher name, course name, and the 3 ratings. Then, (a) For each teacher/course compute the average score for each question, and the overall average (of the 3 questions). (b) Find the teacher/course with the best OVERALL rating. 2) Solve the equation G = (G1, G2) = (0, 0) using PROC IML, where G = (G1, G2) is as defined above: G1(x, y) = x - cos(y), G2(x, y) = y - exp(x). 3) Write a Macro function which calculates cumulative probability under Binomial distribution with probability function f(x) = [n!/(x!*(n-x)!)]* p**x * (1-p)**(n-x) and the cumulative probability is F(x) = f(0) + f(1) + ... + f(x-1) + f(x). Test your function with n=10, p=0.3. Your output should look like Cumulative Binomial Table with n = 10 and p = 0.3 x F(x) ____________ 0 .... 1 .... 2 .... 3 .... 4 .... 5 .... 6 .... 7 .... 8 .... 9 .... 10 .... Use F5.3 format for the probabilities. Note that FACT(n) can be used for n!.