{"id":4305,"date":"2014-10-06T00:31:54","date_gmt":"2014-10-06T05:31:54","guid":{"rendered":"http:\/\/www.thejuliagroup.com\/blog\/?p=4305"},"modified":"2019-01-27T18:54:27","modified_gmt":"2019-01-27T23:54:27","slug":"how-much-matrix-algebra-do-statistics-students-really-need","status":"publish","type":"post","link":"https:\/\/www.thejuliagroup.com\/blog\/how-much-matrix-algebra-do-statistics-students-really-need\/","title":{"rendered":"How much matrix algebra do statistics students REALLY need?"},"content":{"rendered":"<p>Following a discussion using matrix algebra to show computation in a Multivariate Analysis of Variance, a doctoral student asked me,<\/p>\n<blockquote><p>&#8220;Professor, when will I ever use this? Why do I need to know this?&#8221;<\/p><\/blockquote>\n<p>He had a valid point. I&#8217;m always asking myself why I&#8217;m teaching something. Is it because it interests me personally, because it is in the textbook or because students really need to know it.<\/p>\n<p>Let&#8217;s take some things about matrix algebra we always teach students in statistics.<\/p>\n<p><em>What conformable means and why it might matter<\/em><\/p>\n<p>Two matrices are conformable if they can be multiplied together. When you multiply two matrices,\u00a0the row of the first matrix will be multiplied by the column of the second matrix. You sum the products and that is the first element in the matrix. You repeat this until you have multiplied all of the rows in the first matrix by all of the columns in the second.<\/p>\n<p>So &#8212; you can multiply a 3 x 2 matrix by a 2 x 3 matrix but not vice versa.<\/p>\n<p>Multiplying a matrix of dimension a x b and a matrix of dimension c x d will give you a resulting matrix with a rows and d columns, that is, of dimensions a x d .<\/p>\n<p>This can give you results that sometimes seem counter-intuitive, like that the product of a 1 x 3 matrix and a 3 x 1 matrix is a 3 x 3 matrix.<\/p>\n<p>It may seem weird that the result of matrix multiplication can either be a larger matrix than both of the matrices you multiplied, or smaller than both of them, but there it is.<\/p>\n<p>If both matrices are square, that is, of dimension n x n, then the resulting product will also be an n x n matrix.<\/p>\n<p>And, of course, any matrix can be multiplied by its transpose because the transpose of an m x n matrix will always be n x m .<\/p>\n<p>If a square matrix is of full rank, it means that none of the rows are linearly dependent. If you DO have linear dependence, it means you have redundant measures. Now, I could go on to prove this mathematically and all of it is very interesting to me.<\/p>\n<p>I question, though, whether you really need to know anything about matrix algebra to understand that redundant measures are a bad thing.<\/p>\n<p>Do you need matrix algebra to explain that we are going to apply coefficients (do you even need to refer to it as a vector?) to the values of each variable for each record and get a predicted score such that<\/p>\n<p>predicted score = b0 + b1X1 + b2X2 \u00a0&#8230;. b.Xn<\/p>\n<p>When I was in graduate school, calculators that did statistical analyses, even as simple as regression, cost a few hundred dollars which was the equivalent of three months of my car payment. Computer time was charged to your department by the hour. So &#8230; my first few courses, I did all of my homework problems using a pencil and paper, transposing and inverting matrices &#8211; and it was a huge pain in the ass.<\/p>\n<p>Then, I got a job as a research assistant and one of the perks was hours of computer time. I thought I&#8217;d died and gone to heaven. It \u00a0took me less than half an hour to get all of my homework done using SAS (which ran on a mini-computer and spit out printouts that I had to walk across campus to pick up).<\/p>\n<p>My students are learning in a completely different environment. So &#8230; do they need to learn the same things in the same way I did? This is a question I ponder a lot.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following a discussion using matrix algebra to show computation in a Multivariate Analysis of Variance, a doctoral student asked me, &#8220;Professor, when will I ever use this? Why do I need to know this?&#8221; He had a valid point. I&#8217;m always asking myself why I&#8217;m teaching something. Is it because it interests me personally, because&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,1,11],"tags":[],"class_list":["post-4305","post","type-post","status-publish","format-standard","hentry","category-algebra","category-dr-de-mars-general-life-ramblings","category-statistics"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/4305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/comments?post=4305"}],"version-history":[{"count":4,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/4305\/revisions"}],"predecessor-version":[{"id":5690,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/posts\/4305\/revisions\/5690"}],"wp:attachment":[{"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/media?parent=4305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/categories?post=4305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thejuliagroup.com\/blog\/wp-json\/wp\/v2\/tags?post=4305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}