RandomVariable - Maple Help

Random variables available in Student[Statistics]

Description

 • The Student[Statistics] subpackage represents distributions by random variables that follow that distribution.
 • Commands in this section are of the general form NameRandomVariable(arguments) where Name is the name of a distribution and arguments are the parameters for that distribution. For example, NormalRandomVariable(1,2) is a random variable distributed as $\mathrm{Normal}\left(1,2\right)$ and PoissonRandomVariable(a) is a random variable distributed as $\mathrm{Poisson}\left(a\right)$.
 • Random variable commands available in Student[Statistics] subpackage are:

 • The command Sample can be used to generate a data sample which will follow the specified distribution and with the specified sample size.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{Statistics}\right]\right):$

Define a discrete distribution that follows $\mathrm{Binomial}\left(6,\frac{1}{4}\right)$

 > $A≔\mathrm{BinomialRandomVariable}\left(6,\frac{1}{4}\right):$
 > $\mathrm{ProbabilityFunction}\left(A,x,\mathrm{output}=\mathrm{plot}\right)$
 > $\mathrm{StandardDeviation}\left(A\right)$
 $\frac{{3}{}\sqrt{{2}}}{{4}}$ (1)
 > $\mathrm{Mean}\left(A\right)$
 $\frac{{3}}{{2}}$ (2)

Define a continuous distribution that follow $\mathrm{Exponential}\left(3\right)$

 > $B≔\mathrm{ExponentialRandomVariable}\left(3\right):$
 > $\mathrm{ProbabilityDensityFunction}\left(B,x\right)$
 $\left\{\begin{array}{cc}{0}& {x}{<}{0}\\ \frac{{{ⅇ}}^{{-}\frac{{x}}{{3}}}}{{3}}& {\mathrm{otherwise}}\end{array}\right\$ (3)
 > $\mathrm{CDF}\left(B,x,\mathrm{output}=\mathrm{plot}\right)$
 > $\mathrm{Variance}\left(B\right)$
 ${9}$ (4)

Define a distribution that follow $2\mathrm{Binomial}\left(6,\frac{1}{4}\right)+\mathrm{Exponential}\left(3\right)$

 > $C≔2A+B:$
 > $\mathrm{Kurtosis}\left(C\right)$
 $\frac{{458}}{{81}}$ (5)
 > $\mathrm{Skewness}\left(C\right)$
 $\frac{{13}{}\sqrt{{6}}}{{27}}$ (6)

We can also randomly generate a sample from this distribution with sample size equal to 1000.

 > $\mathrm{Sample}\left(C,1000\right)$
 $\left[{2.48466998353152}{,}{7.77439725974354}{,}{4.78275800712335}{,}{2.64227075130962}{,}{11.0453426065179}{,}{2.74652026502560}{,}{8.06472380269561}{,}{13.6631975290842}{,}{5.56352252253889}{,}{2.58110649021619}{,}{2.27016972112320}{,}{0.976800565609142}{,}{6.13594738918389}{,}{4.95150398037618}{,}{0.180725358009541}{,}{2.62584025854149}{,}{7.07380613670492}{,}{3.08271795182814}{,}{6.18063261379935}{,}{4.33223593858277}{,}{6.81222428426989}{,}{0.289149268542139}{,}{17.3264117960489}{,}{6.83706093647346}{,}{4.99520346066036}{,}{2.41363989843860}{,}{8.98732861057565}{,}{7.48913448365461}{,}{0.0469552823869628}{,}{5.55125244438150}{,}{4.58150846343969}{,}{3.88650803499280}{,}{2.83043299279514}{,}{3.07806778754470}{,}{3.17140397169609}{,}{9.93168049975396}{,}{6.67257275985396}{,}{4.15782797300241}{,}{6.97326753517901}{,}{4.47362113186557}{,}{1.54666908133360}{,}{6.69163957130109}{,}{2.07945978534720}{,}{2.04745199525005}{,}{3.28763177963972}{,}{4.96667134775745}{,}{3.81345387191222}{,}{5.03084264942554}{,}{6.14078314094173}{,}{5.94966745296547}{,}{1.40903432814941}{,}{7.05437368167844}{,}{6.23723040219234}{,}{10.6513990341751}{,}{2.53444236442640}{,}{6.07877827157173}{,}{9.95985276436900}{,}{6.36246873936350}{,}{3.90942296673929}{,}{7.09878826057811}{,}{6.69471067774276}{,}{3.49355672949018}{,}{0.661509717591572}{,}{5.81390950611851}{,}{1.13451739252842}{,}{7.63902474796554}{,}{3.19655990868765}{,}{1.39291537729941}{,}{0.0578418548076576}{,}{6.51703552083120}{,}{12.3484443183855}{,}{10.0568432993359}{,}{2.44916127233082}{,}{11.3536423380737}{,}{9.18293281545800}{,}{3.48727323726787}{,}{2.62007043159306}{,}{2.71480903625125}{,}{7.00660533981913}{,}{1.07362568991261}{,}{5.46878494889028}{,}{0.731371469739179}{,}{0.781303973562075}{,}{5.17984897261302}{,}{4.93044029549323}{,}{4.64944853673596}{,}{9.43454082856064}{,}{4.85733694910028}{,}{6.59899558292129}{,}{4.94237564944424}{,}{6.22605076497462}{,}{3.60411541311169}{,}{9.71044837917128}{,}{3.51817878157215}{,}{6.56881208350422}{,}{4.72961181374425}{,}{4.02149775564965}{,}{9.67008620670676}{,}{11.9687563898451}{,}{8.32583873832573}{,}{\dots }{,}{\text{⋯ 900 row vector entries not shown}}\right]$ (7)

Compatibility

 • The Random variables available in Student[Statistics] command was introduced in Maple 18.