(***********************************************************************

                    Mathematica-Compatible Notebook

This notebook can be used on any computer system with Mathematica 4.0,
MathReader 4.0, or any compatible application. The data for the notebook 
starts with the line containing stars above.

To get the notebook into a Mathematica-compatible application, do one of 
the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing the 
word CacheID, otherwise Mathematica-compatible applications may try to 
use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info@wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from 
Wolfram Research.
***********************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[     23482,        610]*)
(*NotebookOutlinePosition[     27873,        746]*)
(*  CellTagsIndexPosition[     27497,        727]*)
(*WindowFrame->Normal*)



Notebook[{
Cell[TextData[{
  "Statistics",
  StyleBox["`", "MB"],
  "DiscreteDistributions",
  StyleBox["`", "MB"]
}], "Subsection",
  CellTags->{"S5.99.1", "1.1"}],

Cell[TextData[{
  "This package gives you access to the most commonly used discrete \
statistical distributions. You can compute their densities, means, variances, \
and other related properties. The distributions themselves are represented in \
the symbolic form ",
  StyleBox["name", "TI"],
  StyleBox["[", "MR"],
  Cell[BoxData[
      FormBox[
        SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"param\\\\\\\"\\\", \\\
\"TI\\\"]\\)\"\>", "1"], TraditionalForm]], "InlineFormula"],
  StyleBox[",", "MR"],
  " ",
  Cell[BoxData[
      FormBox[
        SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"param\\\\\\\"\\\", \\\
\"TI\\\"]\\)\"\>", "2"], TraditionalForm]], "InlineFormula"],
  StyleBox[",", "MR"],
  " \[Ellipsis] ",
  StyleBox["]", "MR"],
  ". Functions such as ",
  StyleBox["Mean", "MR"],
  ", which give properties of statistical distributions, take the symbolic \
representation of the distribution as an argument. The package ",
  StyleBox["ContinuousDistributions", "MR"],
  " contains many continuous statistical distributions. "
}], "Text",
  CellTags->{"S5.99.1", "1.2"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"BernoulliDistribution[\\\\\
\\\"\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"p\\\\\\\"\\\", \\\"TI\\\
\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                  RowBox[{"\<\"Bernoulli distribution with mean \"\>", 
                    StyleBox["p",
                      "InlineFormula"], "\<\" \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"BinomialDistribution[\\\\\
\\\"\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \\\"TI\\\
\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \
\\!\\(\\*StyleBox[\\\"\\\\\\\"p\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\\(\\*StyleBox[\
\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                  
                  RowBox[{"\<\"binomial distribution for the number of \
successes that occur in \"\>", 
                    StyleBox["n",
                      
                      "InlineFormula"], "\<\" trials, where the probability \
of success in a trial is \"\>", 
                    StyleBox["p",
                      "InlineFormula"], "\<\" \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"\
DiscreteUniformDistribution[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                  RowBox[{"\<\"discrete uniform distribution with \"\>", 
                    StyleBox["n",
                      "InlineFormula"], "\<\" states \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"GeometricDistribution[\\\\\
\\\"\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"p\\\\\\\"\\\", \\\"TI\\\
\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                  
                  RowBox[{"\<\"geometric distribution for the number of \
trials before the first success, where the probability of success in a trial \
is \"\>", 
                    StyleBox["p",
                      "InlineFormula"], "\<\" \"\>"}]},
                {
                  
                  RowBox[{"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"\
HypergeometricDistribution[\\\\\\\"\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\
\\\\\\\"n\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", \(s  u  c  c\)],
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", \(t  o  t\)],
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>"}], 
                  
                  RowBox[{"\<\"hypergeometric distribution for the number of \
successes out of a sample of size \"\>", 
                    StyleBox["n",
                      
                      "InlineFormula"], "\<\", from a population of size \
\"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", \(t  o  t\)],
                      "InlineFormula"], "\<\" containing \"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", \(s  u  c  c\)],
                      "InlineFormula"], "\<\" successes \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"LogSeriesDistribution[\\\\\
\\\"\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"theta\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                  
                  RowBox[{"\<\"logarithmic series distribution with parameter \
\"\>", 
                    StyleBox["\[Theta]",
                      "InlineFormula"], "\<\" \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"\
NegativeBinomialDistribution[\\\\\\\"\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\
\"\\\\\\\"n\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"p\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                  
                  RowBox[{"\<\"negative binomial distribution for the number \
of failures that occur before achieving \"\>", 
                    StyleBox["n",
                      
                      "InlineFormula"], "\<\" successes, where the \
probability of success in a trial is \"\>", 
                    StyleBox["p",
                      "InlineFormula"], "\<\" \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"PoissonDistribution[\\\\\\\
\"\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"mu\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                  RowBox[{"\<\"Poisson distribution with mean \"\>", 
                    StyleBox["\[Mu]",
                      "InlineFormula"], "\<\" \"\>"}]}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S5.99.1", "1.3"}],

Cell[TextData[{
  "Statistical distributions from the package ",
  StyleBox["DiscreteDistributions", "MR"],
  "."
}], "Caption",
  CellTags->"S5.99.1"],

Cell[TextData[{
  "Most of the common discrete statistical distributions can be understood by \
considering a sequence of trials, each with two possible outcomes, for \
example, success and failure. \nThe ",
  StyleBox["Bernoulli distribution", "TB"],
  " ",
  StyleBox["BernoulliDistribution[", "MR"],
  StyleBox["p", "TI"],
  StyleBox["]", "MR"],
  " is the probability distribution for a single trial in which success, \
corresponding to value 1, occurs with probability ",
  Cell[BoxData[
      \(TraditionalForm\`p\)], "InlineFormula"],
  ", and failure, corresponding to value 0, occurs with probability ",
  Cell[BoxData[
      \(TraditionalForm\`1 - p\)], "InlineFormula"],
  ". \nThe ",
  StyleBox["binomial distribution", "TB"],
  " ",
  StyleBox["BinomialDistribution[", "MR"],
  StyleBox["n", "TI"],
  StyleBox[",", "MR"],
  " ",
  StyleBox["p", "TI"],
  StyleBox["]", "MR"],
  " is the distribution of the number of successes that occur in ",
  Cell[BoxData[
      \(TraditionalForm\`n\)], "InlineFormula"],
  " independent trials, where the probability of success in each trial is ",
  Cell[BoxData[
      \(TraditionalForm\`p\)], "InlineFormula"],
  ". \nThe ",
  StyleBox["negative binomial distribution", "TB"],
  " ",
  StyleBox["NegativeBinomialDistribution[", "MR"],
  StyleBox["n", "TI"],
  StyleBox[",", "MR"],
  " ",
  StyleBox["p", "TI"],
  StyleBox["]", "MR"],
  " is the distribution of the number of failures that occur in a sequence of \
trials before ",
  Cell[BoxData[
      \(TraditionalForm\`n\)], "InlineFormula"],
  " successes have occurred, where the probability of success in each trial \
is ",
  Cell[BoxData[
      \(TraditionalForm\`p\)], "InlineFormula"],
  ". \nThe terms in the series expansion of ",
  Cell[BoxData[
      \(TraditionalForm\`l  o  g \((1 - \[Theta])\)\)], "InlineFormula"],
  " about ",
  Cell[BoxData[
      \(TraditionalForm\`\[Theta] = 0\)], "InlineFormula"],
  " are proportional to the probabilities of a discrete random variable \
following the ",
  StyleBox["logarithmic series distribution", "TB"],
  " ",
  StyleBox["LogSeriesDistribution[", "MR"],
  StyleBox["theta", "TI"],
  StyleBox["]", "MR"],
  ". The distribution of the number of items of a product purchased by a \
buyer in a specified interval is sometimes modeled by this distribution. \n\
The ",
  StyleBox["geometric distribution", "TB"],
  " ",
  StyleBox["GeometricDistribution[", "MR"],
  StyleBox["p", "TI"],
  StyleBox["]", "MR"],
  " is the distribution of the total number of trials before the first \
success occurs, where the probability of success in each trial is ",
  Cell[BoxData[
      \(TraditionalForm\`p\)], "InlineFormula"],
  ". \nThe ",
  StyleBox["hypergeometric distribution", "TB"],
  " ",
  StyleBox["HypergeometricDistribution[", "MR"],
  StyleBox["n", "TI"],
  StyleBox[",", "MR"],
  " ",
  Cell[BoxData[
      FormBox[
        SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \\\"TI\
\\\"]\\)\"\>", \(s  u  c  c\)], TraditionalForm]], "InlineFormula"],
  StyleBox[",", "MR"],
  " ",
  Cell[BoxData[
      FormBox[
        SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"n\\\\\\\"\\\", \\\"TI\
\\\"]\\)\"\>", \(t  o  t\)], TraditionalForm]], "InlineFormula"],
  StyleBox["]", "MR"],
  " is used in place of the binomial distribution for experiments in which \
the ",
  Cell[BoxData[
      \(TraditionalForm\`n\)], "InlineFormula"],
  " trials correspond to sampling without replacement from a population of \
size ",
  Cell[BoxData[
      \(TraditionalForm\`n\_\(t  o  t\)\)], "InlineFormula"],
  " with ",
  Cell[BoxData[
      \(TraditionalForm\`n\_\(s  u  c  c\)\)], "InlineFormula"],
  " potential successes. \nThe ",
  StyleBox["discrete uniform distribution", "TB"],
  " ",
  StyleBox["DiscreteUniformDistribution[", "MR"],
  StyleBox["n", "TI"],
  StyleBox["]", "MR"],
  " represents an experiment with ",
  Cell[BoxData[
      \(TraditionalForm\`n\)], "InlineFormula"],
  " outcomes that occur with equal probabilities. \nThe ",
  StyleBox["Poisson distribution", "TB"],
  " ",
  StyleBox["PoissonDistribution[", "MR"],
  StyleBox["mu", "TI"],
  StyleBox["]", "MR"],
  " describes the number of points in a unit interval, where points are \
distributed with uniform density ",
  Cell[BoxData[
      \(TraditionalForm\`\[Mu]\)], "InlineFormula"],
  ". "
}], "Text",
  CellTags->{"S5.99.1", "1.4"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"PDF[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"x\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                  RowBox[{"\<\"probability density function at \"\>", 
                    StyleBox["x",
                      "InlineFormula"], "\<\" \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"CDF[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"x\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                  RowBox[{"\<\"cumulative distribution function at \"\>", 
                    StyleBox["x",
                      "InlineFormula"], "\<\" \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Quantile[\\\\\\\"\\\", \\\
\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\
\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\
\"\\\\\\\"q\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                  RowBox[{
                    StyleBox["q",
                      "InlineFormula"], 
                    StyleBox[\(\[Null]\^"th"\),
                      "InlineFormula"], "\<\" quantile \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Domain[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"range of values of the variable (support) \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Mean[\\\\\\\"\\\", \\\"MR\
\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"mean \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Variance[\\\\\\\"\\\", \\\
\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\
\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", "\<\"variance \
\"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"StandardDeviation[\\\\\\\"\
\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"standard deviation \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Skewness[\\\\\\\"\\\", \\\
\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\
\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", \
"\<\"coefficient of skewness \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Kurtosis[\\\\\\\"\\\", \\\
\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\
\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", \
"\<\"coefficient of kurtosis \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"KurtosisExcess[\\\\\\\"\\\
\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \\\"TI\\\"]\
\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", \
"\<\"kurtosis excess \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"CharacteristicFunction[\\\
\\\\\"\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"t\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                  RowBox[{"\<\"characteristic function \"\>", 
                    StyleBox[\(\[Phi] \((t)\)\),
                      "InlineFormula"], "\<\" \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"ExpectedValue[\\\\\\\"\\\"\
, \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"f\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\\(\\*StyleBox[\
\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                  RowBox[{"\<\"expected value of pure function \"\>", 
                    StyleBox["f",
                      
                      "InlineFormula"], "\<\" with respect to the specified \
distribution \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"ExpectedValue[\\\\\\\"\\\"\
, \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"f\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\\(\\*StyleBox[\
\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\"x\\\\\
\\\"\\\", \\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\
\"]\\) \"\>", 
                  RowBox[{"\<\"expected value of function \"\>", 
                    StyleBox["f",
                      "InlineFormula"], "\<\" of \"\>", 
                    StyleBox["x",
                      
                      "InlineFormula"], "\<\" with respect to the specified \
distribution \"\>"}]},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"Random[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", "\<\"pseudorandom number with specified distribution \"\>"},
                {"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"RandomArray[\\\\\\\"\\\", \
\\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"dist\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\
\\(\\*StyleBox[\\\"\\\\\\\"dims\\\\\\\"\\\", \\\"TI\\\"]\\)\\!\\(\\*StyleBox[\
\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>", 
                  RowBox[{"\<\"pseudorandom array with dimensionality \"\>", 
                    StyleBox[\(d  i  m  s\),
                      
                      "InlineFormula"], "\<\", and elements from the \
specified distribution \"\>"}]}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S5.99.1", "1.5"}],

Cell["Functions of statistical distributions. ", "Caption",
  CellTags->"S5.99.1"],

Cell[TextData[{
  "In this package distributions are represented in symbolic form. ",
  StyleBox["PDF[", "MR"],
  StyleBox["dist", "TI"],
  StyleBox[",", "MR"],
  " ",
  StyleBox["x", "TI"],
  StyleBox["]", "MR"],
  " evaluates the density at ",
  Cell[BoxData[
      \(TraditionalForm\`x\)], "InlineFormula"],
  " if ",
  Cell[BoxData[
      \(TraditionalForm\`x\)], "InlineFormula"],
  " is a numerical value, and otherwise leaves the function in symbolic form \
whenever possible. Similarly, ",
  StyleBox["CDF[", "MR"],
  StyleBox["dist", "TI"],
  StyleBox[",", "MR"],
  " ",
  StyleBox["x", "TI"],
  StyleBox["]", "MR"],
  " gives the cumulative distribution and ",
  StyleBox["Mean[", "MR"],
  StyleBox["dist", "TI"],
  StyleBox["]", "MR"],
  " gives the mean of the specified distribution. For a more complete \
description of the various functions of a statistical distribution, see the \
description of their continuous analogues in the section concerning the \
package ",
  StyleBox["Statistics`ContinuousDistributions`", "MR"],
  ". "
}], "Text",
  CellTags->{"S5.99.1", "1.6"}],

Cell["This loads the package. ", "MathCaption",
  CellTags->{"S5.99.1", "1.7"}],

Cell["<<Statistics`DiscreteDistributions`", "Input",
  CellLabel->"In[1]:= ",
  CellTags->"S5.99.1"],

Cell[TextData[{
  "Here is a symbolic representation of the binomial distribution for ",
  Cell[BoxData[
      \(TraditionalForm\`34\)], "InlineFormula"],
  " trials, each having probability ",
  Cell[BoxData[
      \(TraditionalForm\`0.3\)], "InlineFormula"],
  " of success. "
}], "MathCaption",
  CellTags->{"S5.99.1", "1.8"}],

Cell[CellGroupData[{

Cell["bdist = BinomialDistribution[34, 0.3]", "Input",
  CellLabel->"In[2]:= ",
  CellTags->"S5.99.1"],

Cell[BoxData[
    \(BinomialDistribution[34, 0.3`]\)], "Output",
  CellLabel->"Out[2]= ",
  CellTags->"S5.99.1"]
}, Open  ]],

Cell["This is the mean of the distribution. ", "MathCaption",
  CellTags->{"S5.99.1", "1.9"}],

Cell[CellGroupData[{

Cell["Mean[bdist]", "Input",
  CellLabel->"In[3]:= ",
  CellTags->"S5.99.1"],

Cell[BoxData[
    \(10.2`\)], "Output",
  CellLabel->"Out[3]= ",
  CellTags->"S5.99.1"]
}, Open  ]],

Cell["\<\
You can get the equation for the mean by using symbolic variables \
as arguments. \
\>", "MathCaption",
  CellTags->{"S5.99.1", "1.10"}],

Cell[CellGroupData[{

Cell["Mean[BinomialDistribution[n, p]]", "Input",
  CellLabel->"In[4]:= ",
  CellTags->"S5.99.1"],

Cell[BoxData[
    \(n\ p\)], "Output",
  CellLabel->"Out[4]= ",
  CellTags->"S5.99.1"]
}, Open  ]],

Cell[TextData[{
  "Here is the ",
  Cell[BoxData[
      \(TraditionalForm\`50  %\)], "InlineFormula"],
  " quantile, which is equal to the median. "
}], "MathCaption",
  CellTags->{"S5.99.1", "1.11"}],

Cell[CellGroupData[{

Cell["Quantile[bdist, 0.5]", "Input",
  CellLabel->"In[5]:= ",
  CellTags->"S5.99.1"],

Cell[BoxData[
    \(10\)], "Output",
  CellLabel->"Out[5]= ",
  CellTags->"S5.99.1"]
}, Open  ]],

Cell[TextData[{
  "This gives the expected value of ",
  Cell[BoxData[
      \(TraditionalForm\`x\^3\)], "InlineFormula"],
  " with respect to the binomial distribution. "
}], "MathCaption",
  CellTags->{"S5.99.1", "1.12"}],

Cell[CellGroupData[{

Cell["ExpectedValue[x^3, bdist, x]", "Input",
  CellLabel->"In[6]:= ",
  CellTags->"S5.99.1"],

Cell[BoxData[
    \(1282.5479999999975`\)], "Output",
  CellLabel->"Out[6]= ",
  CellTags->"S5.99.1"]
}, Open  ]],

Cell["\<\
The elements of this matrix are pseudorandom numbers from the \
binomial distribution. \
\>", "MathCaption",
  CellTags->{"S5.99.1", "1.13"}],

Cell[CellGroupData[{

Cell["RandomArray[bdist, {2, 3}]", "Input",
  CellLabel->"In[7]:= ",
  CellTags->"S5.99.1"],

Cell[BoxData[
    \({{8, 10, 7}, {12, 9, 6}}\)], "Output",
  CellLabel->"Out[7]= ",
  CellTags->"S5.99.1"]
}, Open  ]]
},
FrontEndVersion->"4.0 for X",
ScreenRectangle->{{0, 800}, {0, 600}},
WindowSize->{520, 455},
WindowMargins->{{140, Automatic}, {Automatic, 72}},
StyleDefinitions -> "HelpBrowser.nb"
]


(***********************************************************************
Cached data follows.  If you edit this Notebook file directly, not using
Mathematica, you must remove the line containing CacheID at the top of 
the file.  The cache data will then be recreated when you save this file 
from within Mathematica.
***********************************************************************)

(*CellTagsOutline
CellTagsIndex->{
  "S5.99.1"->{
    Cell[1717, 49, 153, 6, 70, "Subsection",
      CellTags->{"S5.99.1", "1.1"}],
    Cell[1873, 57, 1096, 27, 70, "Text",
      CellTags->{"S5.99.1", "1.2"}],
    Cell[2972, 86, 5636, 116, 70, "Text",
      CellTags->{"S5.99.1", "1.3"}],
    Cell[8611, 204, 151, 5, 70, "Caption",
      CellTags->"S5.99.1"],
    Cell[8765, 211, 4376, 123, 70, "Text",
      CellTags->{"S5.99.1", "1.4"}],
    Cell[13144, 336, 6452, 113, 70, "Text",
      CellTags->{"S5.99.1", "1.5"}],
    Cell[19599, 451, 82, 1, 70, "Caption",
      CellTags->"S5.99.1"],
    Cell[19684, 454, 1089, 33, 70, "Text",
      CellTags->{"S5.99.1", "1.6"}],
    Cell[20776, 489, 79, 1, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.7"}],
    Cell[20858, 492, 100, 2, 70, "Input",
      CellTags->"S5.99.1"],
    Cell[20961, 496, 329, 9, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.8"}],
    Cell[21315, 509, 102, 2, 70, "Input",
      CellTags->"S5.99.1"],
    Cell[21420, 513, 112, 3, 70, "Output",
      CellTags->"S5.99.1"],
    Cell[21547, 519, 93, 1, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.9"}],
    Cell[21665, 524, 76, 2, 70, "Input",
      CellTags->"S5.99.1"],
    Cell[21744, 528, 87, 3, 70, "Output",
      CellTags->"S5.99.1"],
    Cell[21846, 534, 146, 4, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.10"}],
    Cell[22017, 542, 97, 2, 70, "Input",
      CellTags->"S5.99.1"],
    Cell[22117, 546, 86, 3, 70, "Output",
      CellTags->"S5.99.1"],
    Cell[22218, 552, 200, 6, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.11"}],
    Cell[22443, 562, 85, 2, 70, "Input",
      CellTags->"S5.99.1"],
    Cell[22531, 566, 84, 3, 70, "Output",
      CellTags->"S5.99.1"],
    Cell[22630, 572, 223, 6, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.12"}],
    Cell[22878, 582, 93, 2, 70, "Input",
      CellTags->"S5.99.1"],
    Cell[22974, 586, 101, 3, 70, "Output",
      CellTags->"S5.99.1"],
    Cell[23090, 592, 151, 4, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.13"}],
    Cell[23266, 600, 91, 2, 70, "Input",
      CellTags->"S5.99.1"],
    Cell[23360, 604, 106, 3, 70, "Output",
      CellTags->"S5.99.1"]},
  "1.1"->{
    Cell[1717, 49, 153, 6, 70, "Subsection",
      CellTags->{"S5.99.1", "1.1"}]},
  "1.2"->{
    Cell[1873, 57, 1096, 27, 70, "Text",
      CellTags->{"S5.99.1", "1.2"}]},
  "1.3"->{
    Cell[2972, 86, 5636, 116, 70, "Text",
      CellTags->{"S5.99.1", "1.3"}]},
  "1.4"->{
    Cell[8765, 211, 4376, 123, 70, "Text",
      CellTags->{"S5.99.1", "1.4"}]},
  "1.5"->{
    Cell[13144, 336, 6452, 113, 70, "Text",
      CellTags->{"S5.99.1", "1.5"}]},
  "1.6"->{
    Cell[19684, 454, 1089, 33, 70, "Text",
      CellTags->{"S5.99.1", "1.6"}]},
  "1.7"->{
    Cell[20776, 489, 79, 1, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.7"}]},
  "1.8"->{
    Cell[20961, 496, 329, 9, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.8"}]},
  "1.9"->{
    Cell[21547, 519, 93, 1, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.9"}]},
  "1.10"->{
    Cell[21846, 534, 146, 4, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.10"}]},
  "1.11"->{
    Cell[22218, 552, 200, 6, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.11"}]},
  "1.12"->{
    Cell[22630, 572, 223, 6, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.12"}]},
  "1.13"->{
    Cell[23090, 592, 151, 4, 70, "MathCaption",
      CellTags->{"S5.99.1", "1.13"}]}
  }
*)

(*CellTagsIndex
CellTagsIndex->{
  {"S5.99.1", 24107, 627},
  {"1.1", 26246, 684},
  {"1.2", 26340, 687},
  {"1.3", 26430, 690},
  {"1.4", 26521, 693},
  {"1.5", 26613, 696},
  {"1.6", 26706, 699},
  {"1.7", 26798, 702},
  {"1.8", 26894, 705},
  {"1.9", 26991, 708},
  {"1.10", 27088, 711},
  {"1.11", 27187, 714},
  {"1.12", 27286, 717},
  {"1.13", 27385, 720}
  }
*)

(*NotebookFileOutline
Notebook[{
Cell[1717, 49, 153, 6, 70, "Subsection",
  CellTags->{"S5.99.1", "1.1"}],
Cell[1873, 57, 1096, 27, 70, "Text",
  CellTags->{"S5.99.1", "1.2"}],
Cell[2972, 86, 5636, 116, 70, "Text",
  CellTags->{"S5.99.1", "1.3"}],
Cell[8611, 204, 151, 5, 70, "Caption",
  CellTags->"S5.99.1"],
Cell[8765, 211, 4376, 123, 70, "Text",
  CellTags->{"S5.99.1", "1.4"}],
Cell[13144, 336, 6452, 113, 70, "Text",
  CellTags->{"S5.99.1", "1.5"}],
Cell[19599, 451, 82, 1, 70, "Caption",
  CellTags->"S5.99.1"],
Cell[19684, 454, 1089, 33, 70, "Text",
  CellTags->{"S5.99.1", "1.6"}],
Cell[20776, 489, 79, 1, 70, "MathCaption",
  CellTags->{"S5.99.1", "1.7"}],
Cell[20858, 492, 100, 2, 70, "Input",
  CellTags->"S5.99.1"],
Cell[20961, 496, 329, 9, 70, "MathCaption",
  CellTags->{"S5.99.1", "1.8"}],

Cell[CellGroupData[{
Cell[21315, 509, 102, 2, 70, "Input",
  CellTags->"S5.99.1"],
Cell[21420, 513, 112, 3, 70, "Output",
  CellTags->"S5.99.1"]
}, Open  ]],
Cell[21547, 519, 93, 1, 70, "MathCaption",
  CellTags->{"S5.99.1", "1.9"}],

Cell[CellGroupData[{
Cell[21665, 524, 76, 2, 70, "Input",
  CellTags->"S5.99.1"],
Cell[21744, 528, 87, 3, 70, "Output",
  CellTags->"S5.99.1"]
}, Open  ]],
Cell[21846, 534, 146, 4, 70, "MathCaption",
  CellTags->{"S5.99.1", "1.10"}],

Cell[CellGroupData[{
Cell[22017, 542, 97, 2, 70, "Input",
  CellTags->"S5.99.1"],
Cell[22117, 546, 86, 3, 70, "Output",
  CellTags->"S5.99.1"]
}, Open  ]],
Cell[22218, 552, 200, 6, 70, "MathCaption",
  CellTags->{"S5.99.1", "1.11"}],

Cell[CellGroupData[{
Cell[22443, 562, 85, 2, 70, "Input",
  CellTags->"S5.99.1"],
Cell[22531, 566, 84, 3, 70, "Output",
  CellTags->"S5.99.1"]
}, Open  ]],
Cell[22630, 572, 223, 6, 70, "MathCaption",
  CellTags->{"S5.99.1", "1.12"}],

Cell[CellGroupData[{
Cell[22878, 582, 93, 2, 70, "Input",
  CellTags->"S5.99.1"],
Cell[22974, 586, 101, 3, 70, "Output",
  CellTags->"S5.99.1"]
}, Open  ]],
Cell[23090, 592, 151, 4, 70, "MathCaption",
  CellTags->{"S5.99.1", "1.13"}],

Cell[CellGroupData[{
Cell[23266, 600, 91, 2, 70, "Input",
  CellTags->"S5.99.1"],
Cell[23360, 604, 106, 3, 70, "Output",
  CellTags->"S5.99.1"]
}, Open  ]]
}
]
*)




(***********************************************************************
End of Mathematica Notebook file.
***********************************************************************)

