Statistics
Linear Regression
Hypothesis Testing
Summary and Tabulation
Visualizations
All linear regression commands have been updated in Maple 2016 with a new option, summarize, that allows for the display of a summary for the given regression model.
withStatistics:
X ≔ Vector1, 2, 3, 4, 5, 6, datatype=float:
Y ≔ Vector2, 3, 4, 3.5, 5.8, 7, datatype=float:
By default, the Fit command returns the resulting regression model for the given model function:
Fita+b*t+c*t^2, X, Y, t;
1.96000000000000+0.164999999999999⁢t+0.110714285714286⁢t2
The summarize option includes a full summary for each of the regression coefficients, as well as values for the r-squared and adjusted r-squared for the model. Also, the solution module for regression commands has been extended with the ability to return values for r-squared, adjusted r-squared, and the value of the t-statistic for testing whether the corresponding regression coefficient is different than 0 and its corresponding probability.
Summary: ---------------- Model: 1.9600000+.16500000*t+.11071429*t^2 ---------------- Coefficients: Estimate Std. Error t-value P(>|t|) a 1.9600 1.1720 1.6724 0.1930 b 0.1650 0.7667 0.2152 0.8434 c 0.1107 0.1072 1.0325 0.3778 ---------------- R-squared: 0.9252, Adjusted R-squared: 0.8753
The summarize option can also be used to return an embedded table, which contains more details on the residuals:
Fita+b*t+c*t^2, X, Y, t, summarize=embed:
Model:
1.9600000+0.16500000⁢t+0.11071429⁢t2
Coefficients
Estimate
Standard Error
t-value
P(>|t|)
a
1.96000
1.17199
1.67237
0.193045
b
0.165000
0.766748
0.215194
0.843415
c
0.110714
0.107226
1.03253
0.377769
R-squared:
0.925169
Adjusted R-squared:
0.875282
Residuals
Residual Sum of Squares
Residual Mean Square
Residual Standard Error
Degrees of Freedom
1.28771
0.429238
0.655163
3
Five Point Summary
Minimum
First Quartile
Median
Third Quartile
Maximum
−0.891429
−0.290357
0.155714
0.290595
0.548571
The summarize option has also been added to all hypothesis testing commands. Previously, the infolevel command would have been required to print the results of a hypothesis test as a report.
X ≔ Array9, 10, 8, 4, 8, 3, 0, 10, 15, 9:
OneSampleChiSquareTestX, 7, confidence=.95, summarize=embed:
Null Hypothesis:
Sample drawn from population with standard deviation equal to 7
Alternative Hypothesis:
Sample drawn from population with standard deviation not equal to 7
Sample Size
Sample Standard Deviation
Distribution
Computed Statistic
Computed p-value
Confidence Interval
10.
4.24788
ChiSquare⁡9
3.31429
0.0989571
2.92184..7.75496
Result:
Accepted: This statistical test does not provide enough evidence to conclude that the null hypothesis is false.
The DataSummary, FivePointSummary, and FrequencyTable commands can also accept a summarize option as well as be used to return summary statistics for DataFrames:
X ≔ DataFrameSampleUniform⁡0,1,50,2|LinearAlgebra:-RandomVector50,generator=rand⁡0..3
DataSummaryX,summarize=embed:
1
2
mean
0.5661101110386353
0.48987882283825
1.22
standarddeviation
0.3125414653315035
0.27855206779473884
1.1830434635864795
skewness
−0.3716519256798299
0.11582452515575123
0.3106598115832435
kurtosis
1.729650721370971
1.7837876411157099
1.5501229720154914
minimum
0.031832846377420676
0.011902069501241397
0.0
maximum
0.9705927817606157
0.9597439585160811
3.0
cumulativeweight
50.0
There are many new visualizations in Maple 2016 for statistics and data analysis, including new options for creating colorschemes using point values:
data ≔ Matrix⁡SampleUniform⁡0,1,50,2 | LinearAlgebra:-RandomVector50,generator=rand⁡0..3
Maple 2016 also introduces a new visualization in Statistics for generating heat maps. A heat map is a visualization method that represents the magnitude of the included data as a discrete density plot.
U ≔ seq0..10: V ≔ seqsini, i=0..10: W ≔ seqcosi, i=0..10:
CM≔CorrelationMatrixMatrixU, V, W, ignore;
There are also two new visualizations related to Principal Component Analysis: Biplot, and ScreePlot.
IrisDF ≔ Importdatasets/iris.csv,base=datadir
IrisDF≔Sepal LengthSepal WidthPetal LengthPetal WidthSpecies15.13.51.40.2setosa24.931.40.2setosa34.73.21.30.2setosa44.63.11.50.2setosa553.61.40.2setosa65.43.91.70.4setosa74.63.41.40.3setosa853.41.50.2setosa..................
The new GridPlot command is useful for visualizing multidimensional datasets. GridPlot generates a matrix of plots corresponding to the columns of a dataset.
GridPlotIrisDF`Sepal Length`,`Sepal Width`,`Petal Length`,`Petal Width`,upper = ScatterPlot, lower=SunflowerPlot, width=600, widthmode=pixels;
`Sepal Length`
`Sepal Width`
`Petal Length`
`Petal Width`
Download Help Document