Simulate Quantities
Simulate waiting times from a quantity distribution.
In[1]:=
wait\[ScriptCapitalD] =
QuantityDistribution[ExponentialDistribution[.4], "Minutes"]
Out[1]=
Single observation is a Quantity.
In[2]:=
RandomVariate[wait\[ScriptCapitalD]]
Out[2]=
A sample of multiple observations is a QuantityArray.
In[3]:=
sample = RandomVariate[wait\[ScriptCapitalD], 100]
Out[3]=
Visualize the sample using Histogram.
In[4]:=
Histogram[sample, AxesLabel -> Automatic]
Out[4]=
Calculate selected descriptive statistics of the sample.
In[5]:=
stats = {Mean, Median, Min, Max};
TableForm[Map[#[sample] &, stats], TableHeadings -> {stats, None}]
Out[5]//TableForm=