New in Wolfram
Mathematica
8: Statistical Visualization
◄
previous
|
next
►
Graphics & Visualization
Compare Data and Distributions with Probability Plots
Use probability-probability plots to compare data to distributions, data to data, distributions to data, and distributions to distributions by corresponding CDF values.
In[1]:=
X
data1 = RandomReal[NormalDistribution[], 25]; data2 = RandomReal[UniformDistribution[{-2, 2}], 25]; dist1 = NormalDistribution[]; dist2 = UniformDistribution[{-2, 2}];
In[2]:=
X
Grid[Partition[ MapThread[ ProbabilityPlot[# /. HoldForm -> Identity, #2 /. HoldForm -> Identity, ImageSize -> 275, ImagePadding -> {{20, 5}, {20, 5}}, AspectRatio -> 1, PlotStyle -> Directive[PointSize[Large], #3], Filling -> {2 -> {1}}, FillingStyle -> Directive[Thick, Lighter[#3, 0.5]], ReferenceLineStyle -> Directive[Dotted, Thick, Lighter[#3, 0.5]], PlotLabel -> Row[{#, " vs. ", #2}], BaseStyle -> {FontFamily -> "Helvetica"}, LabelStyle -> Bold] &, {{HoldForm[data1], HoldForm[data1], HoldForm[dist1], HoldForm[dist1]}, {HoldForm[data2], HoldForm[dist2], HoldForm[data2], HoldForm[dist2]}, ColorData[28] /@ {1, 3, 7, 9}}], 2]]
Out[2]=