Matrix Data Sets in Statistics
|
Description
|
|
•
|
This help page describes how to use Statistics commands on spreadsheet-type data in matrices.
|
•
|
Many of the data sets you might encounter are two-dimensional in nature. They will have information about a number of items or events; for each item or event, the same properties are known. Such data sets can easily be represented in a Matrix by having each row of the Matrix correspond to an item and each column to one property of all these items. This is how you would typically store such data in a spreadsheet.
|
•
|
Many commands in the Statistics package can be used with this type of data:
|
–
|
The following commands can be run on Matrix data sets; they are computed per column and the results are returned in a row Vector:
|
|
|
Examples
|
|
>
|
|
We construct a Matrix with housing data. The first column has number of bedrooms, the second has number of square feet, the third has price.
>
|
|
| (1) |
We can create box plots of the price for subgroups of sales defined by number of bedrooms.
>
|
|
| (2) |
We can determine the average area and price for the whole data set and for the sets with , , and bedrooms. For the latter, we use the elementwise version of Mean by appending a tilde to the command.
>
|
|
| (3) |
>
|
|
| (4) |
We can also determine the standard error for this mean.
>
|
|
| (5) |
Or the 30th percentile for each column.
>
|
|
| (6) |
Some commands have calling sequences where one of the arguments is compared to the data; this is the case for the second argument of AbsoluteDeviation and for the origin parameter of Moment. In these cases, it typically doesn't make much sense to use the same value for each column, so Maple supports using a list or Vector of values instead.
>
|
|
| (7) |
>
|
|
| (8) |
|
|
Download Help Document
Was this information helpful?