We construct a DataFrame with housing data. The first column has number of bedrooms, the second has the area in square feet, the third has price.
>
|
|
>
|
|
>
|
|
>
|
|
We can determine the average number of bedrooms, average area, and average price with just the Mean command.
We can also determine the standard error for this mean.
>
|
|
Or the 30th percentile for each column.
>
|
|
The GridPlot command can display scatter plots of pairs of columns.
>
|
|
We can use the lower diagonal entries to display the values for the correlation.
>
|
|
|
|
|
|
|
|
|
|
|
|
|
We can determine the average area and price for subgroups of sales defined by number of bedrooms. (The Aggregate command is part of the DataFrame object, not the Statistics package, so it is not available for Matrices.)
>
|
|
To create a box plot of prices for each number of bedrooms requires a little more effort.
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
Most of the things mentioned above can be done with a Matrix, too. Consider the following examples.
>
|
|
>
|
|
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 does not make much sense to use the same value for each column, so Maple supports using a list or Vector of values instead. These commands do not yet work directly with DataFrame objects.
>
|
|
>
|
|