Question is on 3rd and 4th page from part A to part J.
Problem Set 1 R for Probability Matrices Prep Work: To perform exponential math on a matrix, you will need to load the expm package. If you are prompted for a mirror, simply select the state you are in. Install the ability to exponentiate matrices by typing the following at the prompt in R: install.packages(expm) >librarylexpm) Matrix Math Overview in R: The following information provides a basis for the homework. Please review A-D below: A. Matrix Multiplication Multiplying 2x2 matrices: AE+BG) (AF+BH CE+DG) (CF+DH) Gives you another 2x2 matrix as a result Multiplying a 1x2 with a 2x2 matrix: Gives you a 1x2 matrix as a result To multiply two conforming matrices in R matresults mat %4% 2 IR output.. L1]L2] 1,] 7 10 2,] 15 22 Let's continue to build by adding mat1 to mat2 cubed >Mat! + (mat2 %4% 3) R output.. L1]L2] [1.] 882 1028 2,] 1200 1398 Finally, let's add the square root of mat1 to mat2 cubed: > (mat1%4% .5) + (mat2 %4% 3) R output. 11L2] 1] 882 1026 (2.] 1197 1395 Common Mistakes in R *R is not straightforward about matrix manipulations. For example, you cannot do a proper matrix multiplication by stating: mati mat2 This is wrong. It will simply do an item-by item multiplication. To do the real matrix multiplication, you must state it the correct way: mat %4% mat2 Similarly, with exponentiation, the correct way you must state it is: * mat %4% mat2 Problems: Now, calculate these matrices using R. Copy the R session showing your commands and results and paste into a Word document to submit to the classroom. All problems below can be completed using the information found in the prior sections of this document. If you have any questions, please post to the General Questions area of your classroom and your instructor or other students will be able to assist you. Feel free to extend your learning and practice additional matrix commands. Post any questions you have. Hint: Remember to create the datasets as your first step and then perform the math operation A) B) []"[] C) 3.3 D) 5 .5 25.75 E) F) 1 2 G) .08.921 H) Remember to use the correct order of operations by careful use of parentheses: .08.92 J) 0143