(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 563959, 22460] NotebookOptionsPosition[ 537444, 21649] NotebookOutlinePosition[ 539409, 21708] CellTagsIndexPosition[ 538925, 21694] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell["\<\ Copyright (C) 2005-2009 Chad Brassil; Last modified 18 March 2009\ \>", "Text", CellChangeTimes->{{3.4169131987469997`*^9, 3.416913202906*^9}, { 3.4265062669387455`*^9, 3.4265062738497458`*^9}, {3.4428610875815706`*^9, 3.4428610965827703`*^9}, {3.4434514225251603`*^9, 3.4434514232271605`*^9}, { 3.4463933068394003`*^9, 3.4463933130014*^9}}], Cell[CellGroupData[{ Cell["Set-up", "Subtitle"], Cell["Execute this section first", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "These", " ", "commands", " ", "turn", " ", "off", " ", "some", " ", "spelling", " ", "warning", " ", "messages"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Off", "[", RowBox[{"General", "::", "\"\\""}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Off", "[", RowBox[{"Graphics", "::", "gptn"}], "]"}], ";"}]}]}]], "Input", CellChangeTimes->{{3.44286060168377*^9, 3.4428606020581703`*^9}}], Cell[BoxData[ RowBox[{"(*", RowBox[{ RowBox[{"**", "**"}], "*", " ", "OTHER", " ", "FUNCTIONS"}], " ", "******)"}]], "Input"], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", "\n", RowBox[{ RowBox[{ RowBox[{"Clear", "[", "CPlot", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CPlot", "[", RowBox[{"x_List", ",", "y_List", ",", "opt__"}], "]"}], ":=", RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], "]"}], ",", "opt", ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.02`", "]"}]}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "x"}], "]"}], "]"}], "\[NotEqual]", "0"}], ",", RowBox[{"labels", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "x"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "\[RightDoubleBracket]"}], ",", "\"\<\>\""}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "y"}], "]"}], "]"}], "\[NotEqual]", "0"}], ",", RowBox[{"labels", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "y"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "\[RightDoubleBracket]"}], ",", "\"\<\>\""}], "]"}]}], "}"}]}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "}"}]}], ",", RowBox[{"PlotRegion", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0.99`"}], "}"}]}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "350"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CPlot", "[", RowBox[{"x_List", ",", "y_List"}], "]"}], ":=", RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.02`", "]"}]}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "x"}], "]"}], "]"}], "\[NotEqual]", "0"}], ",", RowBox[{"labels", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "x"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "\[RightDoubleBracket]"}], ",", "\"\<\>\""}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "y"}], "]"}], "]"}], "\[NotEqual]", "0"}], ",", RowBox[{"labels", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "y"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "\[RightDoubleBracket]"}], ",", "\"\<\>\""}], "]"}]}], "}"}]}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "}"}]}], ",", RowBox[{"PlotRegion", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0.99`"}], "}"}]}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "350"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CPlot", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"CPlot3D", "[", RowBox[{"x_List", ",", "y_List", ",", "z_List", ",", "opt__"}], "]"}], ":=", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.02`", "]"}], ",", RowBox[{"Point", "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"x", ",", "y", ",", "z"}], "}"}], "]"}]}]}], "}"}], "]"}], ",", "opt", ",", RowBox[{"BoxRatios", "\[Rule]", RowBox[{"{", RowBox[{"1.5`", ",", "1.5`", ",", "1"}], "}"}]}], ",", RowBox[{"Axes", "\[Rule]", "True"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "x"}], "]"}], "]"}], "\[NotEqual]", "0"}], ",", RowBox[{"labels", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "x"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "\[RightDoubleBracket]"}], ",", "\"\<\>\""}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "y"}], "]"}], "]"}], "\[NotEqual]", "0"}], ",", RowBox[{"labels", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "y"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "\[RightDoubleBracket]"}], ",", "\"\<\>\""}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "z"}], "]"}], "]"}], "\[NotEqual]", "0"}], ",", RowBox[{"labels", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "z"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "\[RightDoubleBracket]"}], ",", "\"\<\>\""}], "]"}]}], "}"}]}], ",", RowBox[{"AxesEdge", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "}"}]}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "350"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CPlot3D", "[", RowBox[{"x_List", ",", "y_List", ",", "z_List"}], "]"}], ":=", RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{ RowBox[{"PointSize", "[", "0.02`", "]"}], ",", RowBox[{"Point", "/@", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"x", ",", "y", ",", "z"}], "}"}], "]"}]}]}], "}"}], "]"}], ",", RowBox[{"BoxRatios", "\[Rule]", RowBox[{"{", RowBox[{"1.5`", ",", "1.5`", ",", "1"}], "}"}]}], ",", RowBox[{"Axes", "\[Rule]", "True"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "x"}], "]"}], "]"}], "\[NotEqual]", "0"}], ",", RowBox[{"labels", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "x"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "\[RightDoubleBracket]"}], ",", "\"\<\>\""}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "y"}], "]"}], "]"}], "\[NotEqual]", "0"}], ",", RowBox[{"labels", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "y"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "\[RightDoubleBracket]"}], ",", "\"\<\>\""}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "z"}], "]"}], "]"}], "\[NotEqual]", "0"}], ",", RowBox[{"labels", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"Transpose", "[", "data", "]"}], ",", "z"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "\[RightDoubleBracket]"}], ",", "\"\<\>\""}], "]"}]}], "}"}]}], ",", RowBox[{"AxesEdge", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}]}], "}"}]}], ",", RowBox[{"BaseStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "\"\\""}], ",", RowBox[{"FontSize", "\[Rule]", "12"}]}], "}"}]}], ",", RowBox[{"ImageSize", "\[Rule]", "350"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CPlot3D", "::", "\"\\""}], "=", "\"\\ \""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Categorical", "[", RowBox[{"parameter_", ",", "categoryLabel_List", ",", "opt___"}], "]"}], ":=", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", "tempCategoryLabel"}], "}"}], ",", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Dimensions", "[", "categoryLabel", "]"}], "]"}], ">", "1"}], ",", RowBox[{"tempCategoryLabel", "=", RowBox[{"StringJoin", "/@", RowBox[{"Transpose", "[", "categoryLabel", "]"}]}]}], ",", RowBox[{ RowBox[{"tempCategoryLabel", "=", "categoryLabel"}], ";"}]}], "]"}], ";", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ SubscriptBox["parameter", RowBox[{"Symbol", "[", RowBox[{ "tempCategoryLabel", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}]], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "tempCategoryLabel", "]"}]}], "}"}]}], "]"}], "/.", "\[InvisibleSpace]", RowBox[{"{", "opt", "}"}]}], "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Categorical", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CategoricalMean", "[", RowBox[{"dataColumn_List", ",", "categoryLabel_List", ",", "opt___"}], "]"}], ":=", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{ "i", ",", "tempCategoryLabel", ",", "categoricalList", ",", "meansPerCat"}], "}"}], ",", RowBox[{ RowBox[{"tempCategoryLabel", "=", RowBox[{"categoryLabel", "/.", "\[InvisibleSpace]", RowBox[{"{", "opt", "}"}]}]}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "[", RowBox[{"Dimensions", "[", "tempCategoryLabel", "]"}], "]"}], ">", "1"}], ",", RowBox[{"tempCategoryLabel", "=", RowBox[{"StringJoin", "/@", RowBox[{"Transpose", "[", "tempCategoryLabel", "]"}]}]}]}], "]"}], ";", RowBox[{"categoricalList", "=", RowBox[{"Symbol", "/@", RowBox[{"Column", "[", RowBox[{ RowBox[{"Reverse", "[", RowBox[{ RowBox[{"Sort", "[", RowBox[{"Tally", "[", "tempCategoryLabel", "]"}], "]"}], ",", "2"}], "]"}], ",", "2"}], "]"}]}]}], ";", RowBox[{"meansPerCat", "=", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Mean", "[", RowBox[{"SelectCases", "[", RowBox[{"dataColumn", ",", "tempCategoryLabel", ",", "#1"}], "]"}], "]"}], "&"}], ")"}], "/@", "categoricalList"}]}], ";", RowBox[{"Thread", "[", RowBox[{"categoricalList", "\[Rule]", "meansPerCat"}], "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CategoricalMean", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CategoricalSymbols", "[", "categoryLabel_List", "]"}], ":=", RowBox[{"Symbol", "/@", RowBox[{"Column", "[", RowBox[{ RowBox[{"Reverse", "[", RowBox[{ RowBox[{"Sort", "[", RowBox[{"Tally", "[", "categoryLabel", "]"}], "]"}], ",", "2"}], "]"}], ",", "2"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"CategoricalSymbols", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SelectCases", "[", RowBox[{ "dataColumn_List", ",", "categoryColumn_List", ",", "equalToCriteria_"}], "]"}], ":=", RowBox[{"Extract", "[", RowBox[{"dataColumn", ",", RowBox[{"Position", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"TrueQ", "[", RowBox[{"Or", "@@", RowBox[{"Thread", "[", RowBox[{"#1", "\[Equal]", RowBox[{"Flatten", "[", RowBox[{"{", "equalToCriteria", "}"}], "]"}]}], "]"}]}], "]"}], "&"}], ")"}], "/@", RowBox[{"ToExpression", "[", "categoryColumn", "]"}]}], ",", "True"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SelectCases", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ProcessData", "[", "dataInput_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "}"}], ",", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"NumericQ", "[", RowBox[{"dataInput", "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "]"}], "\[Equal]", "False"}], ",", RowBox[{ RowBox[{"labels", "=", RowBox[{ "dataInput", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], ";", RowBox[{"data", "=", RowBox[{"Drop", "[", RowBox[{"dataInput", ",", "1"}], "]"}]}], ";"}]}], "]"}], ";", RowBox[{"Clear", "@@", "labels"}], ";", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"Symbol", "[", RowBox[{ "labels", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "]"}], "=", RowBox[{"data", "\[LeftDoubleBracket]", RowBox[{"All", ",", "i"}], "\[RightDoubleBracket]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "labels", "]"}]}], "}"}]}], "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ProcessData", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ProcessVars", "[", "ll_", "]"}], ":=", RowBox[{ RowBox[{"Tally", "[", RowBox[{"Select", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"ll", "/.", "\[InvisibleSpace]", RowBox[{"{", RowBox[{ RowBox[{"sfPoisson", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"sfNegBinom", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"sfGenPoisson", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"sfBinomial", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"sfNormal", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"sfBimodalNormal", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"sfLogNormal", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"sfBetaMean", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"sfBetaMeanShape", "->", RowBox[{"(", RowBox[{ RowBox[{"{", "##", "}"}], "&"}], ")"}]}], ",", RowBox[{"sfBetaBinomial", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"Plus", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"Times", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"Power", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"Log", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{"{", "##1", "}"}], "&"}], ")"}]}], ",", RowBox[{"\"\\"", "\[Rule]", "0"}]}], "}"}]}], "]"}], ",", RowBox[{ RowBox[{"!", RowBox[{"NumericQ", "[", "#1", "]"}]}], "&"}]}], "]"}], "]"}], "\[LeftDoubleBracket]", RowBox[{"All", ",", "1"}], "\[RightDoubleBracket]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ProcessConstraints", "[", "ll_", "]"}], ":=", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", "output", "}"}], ",", RowBox[{"Switch", "[", RowBox[{ RowBox[{"Head", "[", RowBox[{"First", "[", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2"}], "\[RightDoubleBracket]"}], "]"}], "]"}], ",", "\[IndentingNewLine]", "sfNormal", ",", RowBox[{"If", "[", RowBox[{ RowBox[{"TrueQ", "[", RowBox[{ RowBox[{"Head", "[", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "3"}], "\[RightDoubleBracket]"}], "]"}], "\[Equal]", "List"}], "]"}], ",", RowBox[{"And", "@@", RowBox[{"Thread", "[", RowBox[{ RowBox[{"Column", "[", RowBox[{ RowBox[{"Tally", "[", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "3"}], "\[RightDoubleBracket]"}], "]"}], ",", "2"}], "]"}], ">", "0"}], "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "3"}], "\[RightDoubleBracket]"}], ">", "0"}]}], "]"}], ",", "\[IndentingNewLine]", "sfBinomial", ",", RowBox[{"If", "[", RowBox[{ RowBox[{"TrueQ", "[", RowBox[{ RowBox[{"Head", "[", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "3"}], "\[RightDoubleBracket]"}], "]"}], "\[Equal]", "List"}], "]"}], ",", RowBox[{"And", "@@", RowBox[{"Thread", "[", RowBox[{"0", "\[LessEqual]", RowBox[{"Column", "[", RowBox[{ RowBox[{"Tally", "[", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "3"}], "\[RightDoubleBracket]"}], "]"}], ",", "2"}], "]"}], "\[LessEqual]", "1"}], "]"}]}], ",", RowBox[{"0", "\[LessEqual]", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "3"}], "\[RightDoubleBracket]"}], "\[LessEqual]", "1"}]}], "]"}], ",", "\[IndentingNewLine]", "sfBetaBinomial", ",", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"TrueQ", "[", RowBox[{ RowBox[{"Head", "[", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "3"}], "\[RightDoubleBracket]"}], "]"}], "\[Equal]", "List"}], "]"}], ",", RowBox[{"output", "=", RowBox[{"And", "@@", RowBox[{"Thread", "[", RowBox[{"0", "\[LessEqual]", RowBox[{"Column", "[", RowBox[{ RowBox[{"Tally", "[", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "3"}], "\[RightDoubleBracket]"}], "]"}], ",", "2"}], "]"}], "\[LessEqual]", "1"}], "]"}]}]}], ",", RowBox[{"output", "=", RowBox[{"0", "\[LessEqual]", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "3"}], "\[RightDoubleBracket]"}], "\[LessEqual]", "1"}]}]}], "]"}], ";", RowBox[{"If", "[", RowBox[{ RowBox[{"TrueQ", "[", RowBox[{ RowBox[{"Head", "[", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "4"}], "\[RightDoubleBracket]"}], "]"}], "\[Equal]", "List"}], "]"}], ",", RowBox[{"output", "=", RowBox[{"output", "&&", RowBox[{"And", "@@", RowBox[{"Thread", "[", RowBox[{"0", "<", RowBox[{"Column", "[", RowBox[{ RowBox[{"Tally", "[", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "4"}], "\[RightDoubleBracket]"}], "]"}], ",", "2"}], "]"}]}], "]"}]}]}]}], ",", RowBox[{"output", "=", RowBox[{"output", "&&", RowBox[{"0", "<", RowBox[{ RowBox[{"DownValues", "[", "ll", "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "2", ",", "2", ",", "4"}], "\[RightDoubleBracket]"}]}]}]}]}], "]"}], ";", "output"}], ",", "\[IndentingNewLine]", "_", ",", "True"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"sfPunishmentConstant", "=", "10000.`"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfPoisson", "[", RowBox[{"z_", ",", RowBox[{"\[Lambda]_", "?", "NumberQ"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "\[Equal]", "\"\\""}], ",", "0", ",", RowBox[{"If", "[", RowBox[{ RowBox[{"\[Lambda]", ">", "0"}], ",", RowBox[{"\[Lambda]", "-", RowBox[{"z", " ", RowBox[{"Log", "[", "\[Lambda]", "]"}]}], "+", RowBox[{"Log", "[", RowBox[{"z", "!"}], "]"}]}], ",", "sfPunishmentConstant"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"sfPoisson", ",", "Listable"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfPoisson", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Clear", "[", "sf", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfNegBinom", "[", RowBox[{"z_", ",", RowBox[{"m_", "?", "NumberQ"}], ",", RowBox[{"k_", "?", "NumberQ"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "\[Equal]", "\"\\""}], ",", "0", ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"m", ">", "0"}], "&&", RowBox[{"k", ">", "0"}]}], ",", RowBox[{ RowBox[{"-", RowBox[{"Log", "[", RowBox[{"Gamma", "[", RowBox[{"k", "+", "z"}], "]"}], "]"}]}], "+", RowBox[{"Log", "[", RowBox[{"z", "!"}], "]"}], "+", RowBox[{"Log", "[", RowBox[{"Gamma", "[", "k", "]"}], "]"}], "-", RowBox[{"k", " ", RowBox[{"Log", "[", "k", "]"}]}], "+", RowBox[{"k", " ", RowBox[{"Log", "[", RowBox[{"k", "+", "m"}], "]"}]}], "-", RowBox[{"z", " ", RowBox[{"Log", "[", "m", "]"}]}], "+", RowBox[{"z", " ", RowBox[{"Log", "[", RowBox[{"k", "+", "m"}], "]"}]}]}], ",", "sfPunishmentConstant"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"sfNegBinom", ",", "Listable"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfNegBinom", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfGenPoisson", "[", RowBox[{ RowBox[{"z_", "?", "NumberQ"}], ",", RowBox[{"\[Lambda]1_", "?", "NumberQ"}], ",", RowBox[{"\[Lambda]2_", "?", "NumberQ"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "\[Equal]", "\"\\""}], ",", "0", ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"\[Lambda]1", "+", RowBox[{"z", " ", "\[Lambda]2"}]}], ">", "0"}], ",", RowBox[{ RowBox[{"-", RowBox[{"Log", "[", "\[Lambda]1", "]"}]}], "-", RowBox[{ RowBox[{"(", RowBox[{"z", "-", "1"}], ")"}], " ", RowBox[{"Log", "[", RowBox[{"\[Lambda]1", "+", RowBox[{"z", " ", "\[Lambda]2"}]}], "]"}]}], "+", RowBox[{"(", RowBox[{"\[Lambda]1", "+", RowBox[{"z", " ", "\[Lambda]2"}]}], ")"}], "+", RowBox[{"Log", "[", RowBox[{"z", "!"}], "]"}]}], ",", "sfPunishmentConstant"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"sfGenPoisson", ",", "Listable"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfGenPoisson", "::", "\"\\""}], "=", "\"\\ \""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Unprotect", "[", "Power", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SuperscriptBox["x_", "0"], ":=", "1"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"Unprotect", "[", "Log", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Log", "[", "0.`", "]"}], ":=", RowBox[{"-", "\[Infinity]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfBinomial", "[", RowBox[{ RowBox[{"z_", "?", "NumberQ"}], ",", RowBox[{"n_", "?", "NumberQ"}], ",", RowBox[{"p_", "?", "NumberQ"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "\[Equal]", "\"\\""}], ",", "0", ",", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"Log", "[", RowBox[{"n", "!"}], "]"}]}], "+", RowBox[{"Log", "[", RowBox[{"z", "!"}], "]"}], "+", RowBox[{"Log", "[", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], "]"}], "-", RowBox[{"Log", "[", RowBox[{ SuperscriptBox["p", "z"], " ", SuperscriptBox[ RowBox[{"(", RowBox[{"1.`", "\[InvisibleSpace]", "-", "p"}], ")"}], RowBox[{"n", "-", "z"}]]}], "]"}]}], "/.", "\[InvisibleSpace]", RowBox[{"{", RowBox[{"\[Infinity]", "\[Rule]", "100000000000000"}], "}"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"sfBinomial", ",", "Listable"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfBinomial", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfBetaBinomial", "[", RowBox[{ RowBox[{"z_", "?", "NumberQ"}], ",", RowBox[{"n_", "?", "NumberQ"}], ",", RowBox[{"m_", "?", "NumberQ"}], ",", RowBox[{"s_", "?", "NumberQ"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "\[Equal]", "\"\\""}], ",", "0", ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"0", "<", "m", "<", "1"}], "&&", RowBox[{"s", ">", "0"}]}], ",", RowBox[{ RowBox[{ RowBox[{"Log", "[", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], "]"}], "+", RowBox[{"Log", "[", RowBox[{"z", "!"}], "]"}], "-", RowBox[{"Log", "[", RowBox[{"n", "!"}], "]"}], "+", RowBox[{"Log", "[", RowBox[{"Beta", "[", RowBox[{ RowBox[{"s", " ", "m"}], ",", RowBox[{"s", " ", RowBox[{"(", RowBox[{"1", "-", "m"}], ")"}]}]}], "]"}], "]"}], "-", RowBox[{"Log", "[", RowBox[{"Beta", "[", RowBox[{ RowBox[{ RowBox[{"s", " ", "m"}], "+", "z"}], ",", RowBox[{"n", "+", RowBox[{"s", " ", RowBox[{"(", RowBox[{"1", "-", "m"}], ")"}]}], "-", "z"}]}], "]"}], "]"}]}], "/.", "\[InvisibleSpace]", RowBox[{"{", RowBox[{"\[Infinity]", "\[Rule]", "100000000000000"}], "}"}]}], ",", "sfPunishmentConstant"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"sfBetaBinomial", ",", "Listable"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfBetaBinomial", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfLogNormal", "[", RowBox[{"z_", ",", RowBox[{"m_", "?", "NumberQ"}], ",", RowBox[{"\[Sigma]_", "?", "NumberQ"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "\[Equal]", "\"\\""}], ",", "0", ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"\[Sigma]", ">", "0"}], "&&", RowBox[{"m", ">", "0"}]}], ",", RowBox[{ RowBox[{"Log", "[", RowBox[{"z", " ", SqrtBox[ RowBox[{"2", " ", "\[Pi]", " ", SuperscriptBox["\[Sigma]", "2"]}]]}], "]"}], "+", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"Log", "[", "z", "]"}], "-", RowBox[{"Log", "[", "m", "]"}]}], ")"}], "2"], RowBox[{"2", " ", SuperscriptBox["\[Sigma]", "2"]}]]}], ",", "sfPunishmentConstant"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"sfLogNormal", ",", "Listable"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfLogNormal", "::", "\"\\""}], "=", "\"\ 0. m is the \ median and \[Sigma] is the standard deviation of the ln(data)\>\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfNormal", "[", RowBox[{"z_", ",", "m_", ",", RowBox[{"\[Sigma]_", "?", "NumberQ"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "\[Equal]", "\"\\""}], ",", "0", ",", RowBox[{ RowBox[{"Log", "[", SqrtBox[ RowBox[{"2", " ", "\[Pi]", " ", SuperscriptBox["\[Sigma]", "2"]}]], "]"}], "+", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m"}], ")"}], "2"], RowBox[{"2", " ", SuperscriptBox["\[Sigma]", "2"]}]]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"sfNormal", ",", "Listable"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfNormal", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfBimodalNormal", "[", RowBox[{"z_", ",", "m1_", ",", RowBox[{"\[Sigma]1_", "?", "NumberQ"}], ",", "m2_", ",", RowBox[{"\[Sigma]2_", "?", "NumberQ"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "\[Equal]", "\"\\""}], ",", "0", ",", RowBox[{ RowBox[{"Log", "[", RowBox[{"2", " ", SqrtBox[ RowBox[{"2", " ", "\[Pi]"}]]}], "]"}], "-", RowBox[{"Log", "[", RowBox[{ FractionBox[ RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m1"}], ")"}], "2"], RowBox[{"2", " ", SuperscriptBox["\[Sigma]1", "2"]}]]}], "]"}], SqrtBox[ SuperscriptBox["\[Sigma]1", "2"]]], "+", FractionBox[ RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m2"}], ")"}], "2"], RowBox[{"2", " ", SuperscriptBox["\[Sigma]2", "2"]}]]}], "]"}], SqrtBox[ SuperscriptBox["\[Sigma]2", "2"]]]}], "]"}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"sfBimodalNormal", ",", "Listable"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfBimodalNormal", "::", "\"\\""}], "=", "\"\\ \""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfBetaMean", "[", RowBox[{"z_", ",", RowBox[{"\[Mu]_", "?", "NumberQ"}], ",", RowBox[{"\[Sigma]_", "?", "NumberQ"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "\[Equal]", "\"\\""}], ",", "0", ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["\[Sigma]", "2"], "<", RowBox[{"\[Mu]", " ", RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}]}]}], "&&", RowBox[{"0", "\[LessEqual]", "\[Mu]", "\[LessEqual]", "1"}], "&&", RowBox[{"\[Sigma]", ">", "0"}]}], ",", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "\[Mu]"}], ")"}], " ", RowBox[{"(", RowBox[{ RowBox[{"-", "\[Mu]"}], "+", SuperscriptBox["\[Mu]", "2"], "+", SuperscriptBox["\[Sigma]", "2"]}], ")"}]}], SuperscriptBox["\[Sigma]", "2"]]}], ")"}], " ", RowBox[{"Log", "[", RowBox[{"1", "-", "z"}], "]"}]}], "+", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", SuperscriptBox["\[Mu]", "2"]}], "+", SuperscriptBox["\[Mu]", "3"], "+", SuperscriptBox["\[Sigma]", "2"], "+", RowBox[{"\[Mu]", " ", SuperscriptBox["\[Sigma]", "2"]}]}], ")"}], " ", RowBox[{"Log", "[", "z", "]"}]}], SuperscriptBox["\[Sigma]", "2"]], "+", RowBox[{"Log", "[", RowBox[{"Beta", "[", RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"\[Mu]", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "\[Mu]"}], "+", SuperscriptBox["\[Mu]", "2"], "+", SuperscriptBox["\[Sigma]", "2"]}], ")"}]}], SuperscriptBox["\[Sigma]", "2"]]}], ",", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "\[Mu]"}], ")"}], " ", RowBox[{"(", RowBox[{ RowBox[{"-", "\[Mu]"}], "+", SuperscriptBox["\[Mu]", "2"], "+", SuperscriptBox["\[Sigma]", "2"]}], ")"}]}], SuperscriptBox["\[Sigma]", "2"]]}], "]"}], "]"}]}], ",", "sfPunishmentConstant"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"sfBetaMean", ",", "Listable"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfBetaMean", "::", "\"\\""}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Beta", " ", "distribution", " ", "with", " ", "mean", " ", "and", " ", "shape", " ", "parameter"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfBetaMeanShape", "[", RowBox[{"z_", ",", RowBox[{"\[Mu]_", "?", "NumberQ"}], ",", RowBox[{"s_", "?", "NumberQ"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "==", "\"\\""}], ",", "0", ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"0", "\[LessEqual]", "\[Mu]", "\[LessEqual]", "1"}], "&&", RowBox[{"s", ">", "0"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Log", "[", RowBox[{"Beta", "[", RowBox[{ RowBox[{"s", " ", "\[Mu]"}], ",", RowBox[{"s", " ", RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}]}]}], "]"}], "]"}], "-", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"s", " ", "\[Mu]"}], "-", "1"}], ")"}], RowBox[{"Log", "[", "z", "]"}]}], "-", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"s", " ", RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}]}], "-", "1"}], ")"}], RowBox[{"Log", "[", RowBox[{"1", "-", "z"}], "]"}]}]}], " ", ",", "sfPunishmentConstant"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"sfBetaMeanShape", ",", "Listable"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sfBetaMeanShape", "::", "usage"}], "=", "\"\\""}], ";"}]}]}]], "Input", CellChangeTimes->{{3.4168705011803865`*^9, 3.4168705028283863`*^9}, { 3.416870941792386*^9, 3.416870969639386*^9}, {3.4168714786643863`*^9, 3.416871489172386*^9}, {3.4434514628355603`*^9, 3.4434514650195603`*^9}, { 3.4434514997607603`*^9, 3.4434515003379602`*^9}, {3.4463932641266003`*^9, 3.446393282675*^9}}], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"CStringQ", "[", "column_List", "]"}], ":=", RowBox[{"And", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"TrueQ", "[", RowBox[{ RowBox[{"Head", "[", RowBox[{ "column", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], "\[Equal]", "String"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "column", "]"}]}], "}"}]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ProcessCategorical", "[", "categoryHeading_", "]"}], ":=", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", "categoryNum", ",", "categoricalValues"}], "}"}], ",", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"!", RowBox[{"CStringQ", "[", "categoryHeading", "]"}]}], ",", RowBox[{ RowBox[{"Clear", "[", "dummyList", "]"}], ";", RowBox[{"Return", "[", "False", "]"}]}]}], "]"}], ";", RowBox[{"categoricalValues", "=", RowBox[{"Column", "[", RowBox[{ RowBox[{"Reverse", "[", RowBox[{ RowBox[{"Sort", "[", RowBox[{"Tally", "[", "categoryHeading", "]"}], "]"}], ",", "2"}], "]"}], ",", "2"}], "]"}]}], ";", RowBox[{"dummyList", "=", RowBox[{"{", "}"}]}], ";", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"Evaluate", "[", RowBox[{ RowBox[{ "categoricalValues", "\[LeftDoubleBracket]", "categoryNum", "\[RightDoubleBracket]"}], "<>", "\"\<$\>\""}], "]"}], "]"}], ";", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{"ToExpression", "[", RowBox[{ RowBox[{ "categoricalValues", "\[LeftDoubleBracket]", "categoryNum", "\[RightDoubleBracket]"}], "<>", "\"\<$\>\""}], "]"}], "]"}], "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ "categoryHeading", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "\[Equal]", RowBox[{ "categoricalValues", "\[LeftDoubleBracket]", "categoryNum", "\[RightDoubleBracket]"}]}], ",", "1", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "categoryHeading", "]"}]}], "}"}]}], "]"}]}], ";", RowBox[{"AppendTo", "[", RowBox[{"dummyList", ",", RowBox[{ RowBox[{ "categoricalValues", "\[LeftDoubleBracket]", "categoryNum", "\[RightDoubleBracket]"}], "<>", "\"\<$\>\""}]}], "]"}], ";"}], ",", RowBox[{"{", RowBox[{"categoryNum", ",", RowBox[{"Length", "[", "categoricalValues", "]"}]}], "}"}]}], "]"}], ";", "True"}]}], "]"}]}], ";"}]}]}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Reference: some basic distributions", "Subtitle"], Cell["\<\ An excellent reference for probability distributions is: Evans, Merran, \ Nicholas Hastings, and Brian Peacock. 2000. Statistical Distributions, 3rd \ Edition. John Wiley & Sons. New York.\ \>", "Text"], Cell[CellGroupData[{ Cell["Continuous", "Section"], Cell[TextData[{ "Expected, or mean\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"E", "[", "Z", "]"}], "=", RowBox[{"\[Integral]", RowBox[{"z", " ", RowBox[{"f", "(", "z", ")"}], RowBox[{"\[DifferentialD]", "z"}]}]}]}], TraditionalForm]]], "\t\nVariance\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"VAR", "(", "Z", ")"}], "=", RowBox[{ RowBox[{"E", "[", SuperscriptBox[ RowBox[{"(", RowBox[{"Z", "-", RowBox[{"E", "[", "Z", "]"}]}], ")"}], "2"], "]"}], "=", RowBox[{"\[Integral]", RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", RowBox[{"E", "[", "z", "]"}]}], ")"}], "2"], RowBox[{"f", "(", "z", ")"}], RowBox[{"\[DifferentialD]", "z"}], " "}]}]}]}], TraditionalForm]]], "\t\n\nFor continuous variables, the ", StyleBox["probability density function", FontWeight->"Bold"], " is the probability of the value ", StyleBox["z", FontSlant->"Italic"], " given the parameters" }], "Text"], Cell[CellGroupData[{ Cell["Uniform", "Subsection"], Cell[TextData[{ "Uniform Distribution:\na uniform distribution on the interval [a,b] where a \ < b\nprobability density function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", FractionBox["1", RowBox[{"b", "-", "a"}]]}], TraditionalForm]]], ", where a \[LessEqual] z \[LessEqual] b\nmean: ", Cell[BoxData[ FormBox[ FractionBox[ RowBox[{"b", "+", "a"}], "2"], TraditionalForm]]], StyleBox["\n", FontSlant->"Italic"], "variance: ", Cell[BoxData[ FormBox[ FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"b", "-", "a"}], ")"}], "2"], "12"], TraditionalForm]]] }], "Text"], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[ RowBox[{"dunif", RowBox[{"(", RowBox[{"z", ",", RowBox[{"min", " ", "=", " ", "a"}], ",", " ", RowBox[{"max", " ", "=", " ", "b"}]}], ")"}]}]], "Input"], Cell[BoxData[{ RowBox[{"#", " ", "generate", " ", "1", " ", "uniform", " ", "random", " ", "number", " ", "over", " ", "the", " ", "range", " ", "1.4", " ", "to", " ", "2.4"}], "\[IndentingNewLine]", RowBox[{"runif", RowBox[{"(", RowBox[{"1", ",", "1.4", ",", "2.4"}], ")"}]}]}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "a_", ",", "b_"}], "]"}], ":=", FractionBox["1", RowBox[{"b", "-", "a"}]]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", "\n", RowBox[{"RandomReal", "[", "]"}]}]], "Input"], Cell[BoxData["0.04072645154999933`"], "Output"] }, Open ]], Cell[BoxData[ RowBox[{"(*", " ", RowBox[{ "random", " ", "number", " ", "of", " ", "specified", " ", "range"}], " ", "*)"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"RandomReal", "[", RowBox[{"{", RowBox[{"3", ",", "6"}], "}"}], "]"}]], "Input"], Cell[BoxData["4.8734776291867`"], "Output"] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Normal", "Subsection"], Cell[TextData[{ "Normal Distribution:\nhas two parameters: ", StyleBox["m", FontSlant->"Italic"], " is the location parameter, in this case the mean; ", StyleBox["\[Sigma]", FontSlant->"Italic"], " is the scale parameter, in this case the standard deviation\nprobability \ density function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", RowBox[{ FractionBox["1", SqrtBox[ RowBox[{"2", " ", "\[Pi]", " ", SuperscriptBox["\[Sigma]", "2"]}]]], RowBox[{"exp", "(", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m"}], ")"}], "2"], RowBox[{"2", " ", SuperscriptBox["\[Sigma]", "2"]}]]}], ")"}]}]}], TraditionalForm]]], "\nmean: ", StyleBox["m\n", FontSlant->"Italic"], "variance: ", Cell[BoxData[ FormBox[ SuperscriptBox["\[Sigma]", "2"], TraditionalForm]]], StyleBox["\n", FontSlant->"Italic"], "note: plotting ", Cell[BoxData[ FormBox[ RowBox[{"f", "(", "z", ")"}], TraditionalForm]]], " will give you the familiar bell curve " }], "Text"], Cell[TextData[{ "An aside: If one transforms data and then peforms classical statistics \ assuming a normal distribution, the AIC values cannot be directly compared. \ In essence one has changed the data, which is forbidden. However, a simple \ transformation of the Likelihood values can render the AIC values comparable. \ See for a full derivation. I quote:\n\nIn general, if Z=T(y) is \ some transformation of the response variable such that T(y) has probability \ density function f(z). The likelihood as a function of y is given by the \ following expression.\n\n", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"L", "(", "y", ")"}], "=", RowBox[{"\[CapitalPi]", " ", RowBox[{"f", "(", RowBox[{"T", "(", SubscriptBox["y", "i"], ")"}], ")"}], FractionBox["d", RowBox[{"d", " ", SubscriptBox["y", "i"]}]], RowBox[{"T", "(", SubscriptBox["y", "i"], ")"}]}]}], TraditionalForm]]], "\n\nRemember this is the likelihood, not the negative log likelihood. \ Working this through a log-transformed data set means that you simple add ", Cell[BoxData[ FormBox[ RowBox[{"\[CapitalSigma]", " ", "2", " ", RowBox[{"ln", "(", SubscriptBox["y", "i"], ")"}]}], TraditionalForm]]], " to the AIC value from the transformed analysis, and you will have an AIC \ that can be compared to analysis on the untransformed data." }], "Text", CellChangeTimes->{{3.4265063033227453`*^9, 3.4265066178297453`*^9}, { 3.4265067275837455`*^9, 3.4265068300337453`*^9}}], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell["probability density function", "Text"], Cell[BoxData[{ RowBox[{"dnorm", RowBox[{"(", RowBox[{"z", ",", "mean", ",", "sd"}], ")"}]}], "\[IndentingNewLine]", RowBox[{"#", "plot", " ", "the", " ", "pdf"}], "\[IndentingNewLine]", RowBox[{"curve", RowBox[{"(", RowBox[{ RowBox[{"dnorm", RowBox[{"(", RowBox[{"x", ",", "4", ",", "1"}], ")"}]}], ",", "0", ",", "7"}], ")"}]}]}], "Input"], Cell[TextData[{ "random number generation, where ", StyleBox["n", FontSlant->"Italic"], " is the number random numbers to generation. In other words, ", StyleBox["n", FontSlant->"Italic"], " = 1 will create 1 random number." }], "Text"], Cell[BoxData[ RowBox[{"rnorm", RowBox[{"(", RowBox[{"n", ",", "mean", ",", "sd"}], ")"}]}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "m_", ",", "\[Sigma]_"}], "]"}], ":=", RowBox[{ FractionBox["1", SqrtBox[ RowBox[{"2", "\[Pi]", " ", SuperscriptBox["\[Sigma]", "2"]}]]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m"}], ")"}], "2"], RowBox[{"2", SuperscriptBox["\[Sigma]", "2"]}]]}], "]"}]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "4", ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "7"}], "}"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.136054 0.0147151 1.47541 [ [.15986 .00222 -3 -9 ] [.15986 .00222 3 0 ] [.29592 .00222 -3 -9 ] [.29592 .00222 3 0 ] [.43197 .00222 -3 -9 ] [.43197 .00222 3 0 ] [.56803 .00222 -3 -9 ] [.56803 .00222 3 0 ] [.70408 .00222 -3 -9 ] [.70408 .00222 3 0 ] [.84014 .00222 -3 -9 ] [.84014 .00222 3 0 ] [.97619 .00222 -3 -9 ] [.97619 .00222 3 0 ] [.01131 .16226 -18 -4.5 ] [.01131 .16226 0 4.5 ] [.01131 .3098 -18 -4.5 ] [.01131 .3098 0 4.5 ] [.01131 .45734 -18 -4.5 ] [.01131 .45734 0 4.5 ] [.01131 .60488 -18 -4.5 ] [.01131 .60488 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .15986 .01472 m .15986 .02097 L s [(1)] .15986 .00222 0 1 Mshowa .29592 .01472 m .29592 .02097 L s [(2)] .29592 .00222 0 1 Mshowa .43197 .01472 m .43197 .02097 L s [(3)] .43197 .00222 0 1 Mshowa .56803 .01472 m .56803 .02097 L s [(4)] .56803 .00222 0 1 Mshowa .70408 .01472 m .70408 .02097 L s [(5)] .70408 .00222 0 1 Mshowa .84014 .01472 m .84014 .02097 L s [(6)] .84014 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(7)] .97619 .00222 0 1 Mshowa .125 Mabswid .05102 .01472 m .05102 .01847 L s .07823 .01472 m .07823 .01847 L s .10544 .01472 m .10544 .01847 L s .13265 .01472 m .13265 .01847 L s .18707 .01472 m .18707 .01847 L s .21429 .01472 m .21429 .01847 L s .2415 .01472 m .2415 .01847 L s .26871 .01472 m .26871 .01847 L s .32313 .01472 m .32313 .01847 L s .35034 .01472 m .35034 .01847 L s .37755 .01472 m .37755 .01847 L s .40476 .01472 m .40476 .01847 L s .45918 .01472 m .45918 .01847 L s .48639 .01472 m .48639 .01847 L s .51361 .01472 m .51361 .01847 L s .54082 .01472 m .54082 .01847 L s .59524 .01472 m .59524 .01847 L s .62245 .01472 m .62245 .01847 L s .64966 .01472 m .64966 .01847 L s .67687 .01472 m .67687 .01847 L s .73129 .01472 m .73129 .01847 L s .7585 .01472 m .7585 .01847 L s .78571 .01472 m .78571 .01847 L s .81293 .01472 m .81293 .01847 L s .86735 .01472 m .86735 .01847 L s .89456 .01472 m .89456 .01847 L s .92177 .01472 m .92177 .01847 L s .94898 .01472 m .94898 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .16226 m .03006 .16226 L s [(0.1)] .01131 .16226 1 0 Mshowa .02381 .3098 m .03006 .3098 L s [(0.2)] .01131 .3098 1 0 Mshowa .02381 .45734 m .03006 .45734 L s [(0.3)] .01131 .45734 1 0 Mshowa .02381 .60488 m .03006 .60488 L s [(0.4)] .01131 .60488 1 0 Mshowa .125 Mabswid .02381 .04422 m .02756 .04422 L s .02381 .07373 m .02756 .07373 L s .02381 .10324 m .02756 .10324 L s .02381 .13275 m .02756 .13275 L s .02381 .19176 m .02756 .19176 L s .02381 .22127 m .02756 .22127 L s .02381 .25078 m .02756 .25078 L s .02381 .28029 m .02756 .28029 L s .02381 .33931 m .02756 .33931 L s .02381 .36881 m .02756 .36881 L s .02381 .39832 m .02756 .39832 L s .02381 .42783 m .02756 .42783 L s .02381 .48685 m .02756 .48685 L s .02381 .51635 m .02756 .51635 L s .02381 .54586 m .02756 .54586 L s .02381 .57537 m .02756 .57537 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .01491 m .03279 .01497 L .04262 .01506 L .05288 .01517 L .06244 .01531 L .0731 .0155 L .0828 .01573 L .094 .01608 L .10458 .01649 L .11428 .01698 L .12455 .01762 L .14299 .01919 L .1524 .02025 L .16253 .02165 L .18083 .02497 L .19093 .02735 L .20196 .03049 L .22205 .03792 L .24173 .04789 L .2627 .06216 L .28411 .08143 L .30428 .10462 L .34283 .16431 L .38383 .25013 L .42332 .34905 L .46129 .44741 L .48244 .49765 L .50172 .53741 L .51129 .5543 L .5217 .57017 L .53146 .58244 L .54063 .5915 L .54553 .59533 L .55003 .59819 L .55502 .60063 L .55764 .60161 L .5604 .6024 L .56169 .60268 L .56291 .6029 L .56359 .60301 L .56432 .6031 L .5656 .60323 L .56682 .6033 L .56811 .60332 L .56922 .6033 L .57043 .60323 L .57117 .60316 L .57186 .60309 L .57317 .6029 L .57457 .60264 L Mistroke .5761 .60228 L .57886 .60146 L .58141 .60048 L .5865 .59792 L .592 .59425 L .60197 .58528 L .61168 .5738 L .62059 .56099 L .66013 .48278 L .69815 .38726 L .73863 .28287 L .77759 .19445 L .79744 .15676 L .81901 .12209 L .83798 .09693 L .8589 .0746 L .87872 .05811 L .89974 .04485 L .91912 .03579 L .93999 .02874 L .95764 .02447 L .97619 .02125 L Mfstroke % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztnGlsFFUcwLe0Ug45jMRACFgCIhhEjqLc5SyI3LfcpRwtN225bxCQ+76P AooXiuB9i/dtVILRGGOMMX7Q+EXjF4218wbe7g6///Kms2/ZNhKdzv7e/H// tzvzdmbevLcDcoryps7OKcrPzcnoU5AzLy8/tzAje25BKUpNCYVSzpX+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FU2AHZUVNIuosT8FzWVqBOyYt2XQPKpbgR2X c5OiIbBiWfEJsAb+FDSnrD6wE7LiM2D1gJ2UFWpynLovrQulp+RAmtt3s5ad lgO/BHYTsMsK6kgJT0ChcQw0cbGmjnU7jP11n9C4EBrHcFFH0JgL88ym4yYu 6VaRrtfOGGdRN87iSCA1AVZNszprbHTH1Fz1e1zhHg+FtsXF59lULbcbm71j cK6j1jNtRpxpFhlD7SqyXK1f/uWrUMp/N7gFzg==\ \>"], ImageRangeCache->{{{79.5625, 308.938}, {265.25, 123.938}} -> {-3.29566, \ 0.35689, 0.0271521, 0.00250381}}] }, Open ]], Cell["Show that pdf integrates to 1", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "1", ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", RowBox[{"-", "\[Infinity]"}], ",", "\[Infinity]"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["1"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"<<", "Statistics`ContinuousDistributions`"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "normal", " ", "random", " ", "number", " ", "with", " ", "mean", " ", "of", " ", "3", " ", "and", " ", "standard", " ", "deviation", " ", "2"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Random", "[", RowBox[{"NormalDistribution", "[", RowBox[{"3", ",", "2"}], "]"}], "]"}]}], "Input"], Cell[BoxData["1.8745137852716334`"], "Output"] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Lognormal", "Subsection"], Cell[TextData[{ "Lognormal Distribution:\nhas two parameters: ", StyleBox["m", FontSlant->"Italic"], " is the location parameter; ", StyleBox["\[Sigma]", FontSlant->"Italic"], " is the shape parameter\nprobability density function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", RowBox[{ FractionBox["1", RowBox[{"z", SqrtBox[ RowBox[{"2", " ", "\[Pi]", " ", SuperscriptBox["\[Sigma]", "2"]}]]}]], RowBox[{"exp", "(", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"ln", "(", "z", ")"}], "-", RowBox[{"log", "(", "m", ")"}]}], ")"}], "2"], RowBox[{"2", " ", SuperscriptBox["\[Sigma]", "2"]}]]}], ")"}]}]}], TraditionalForm]]], ", where z > 0, ", StyleBox["m", FontSlant->"Italic"], " >0, and ", StyleBox["\[Sigma]", FontSlant->"Italic"], " >0\nmean: ", Cell[BoxData[ FormBox[ RowBox[{"m", " ", RowBox[{"exp", "(", FractionBox[ SuperscriptBox["\[Sigma]", "2"], "2"], ")"}]}], TraditionalForm]]], "\nmedian: ", StyleBox["m\n", FontSlant->"Italic"], Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["\[Sigma]", "2"], " "}], TraditionalForm]]], "is the variance of the ln(z)", StyleBox["\n", FontSlant->"Italic"], "variance: ", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["m", "2"], RowBox[{"exp", "(", SuperscriptBox["\[Sigma]", "2"], ")"}], RowBox[{"(", RowBox[{ RowBox[{"exp", "(", SuperscriptBox["\[Sigma]", "2"], ")"}], "-", "1"}], ")"}]}], TraditionalForm]]], StyleBox["\n", FontSlant->"Italic"], "note: This describes a variable in which the logarithm of the variable is \ a normal distribution. Whereas the normal distribution is additive, the \ lognormal distribution is multiplicative." }], "Text"], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[ RowBox[{"dlnorm", RowBox[{"(", RowBox[{"z", ",", RowBox[{"meanlog", " ", "=", " ", "m"}], ",", " ", RowBox[{"sdlog", " ", "=", " ", "\[Sigma]"}]}], ")"}]}]], "Input"], Cell[TextData[{ "R uses a slightly different form of the lognormal model. Use the following \ form so that ", StyleBox["m", FontSlant->"Italic"], " is defined in the same way as described in the ", StyleBox["f", FontSlant->"Italic"], "(", StyleBox["z", FontSlant->"Italic"], ") equation above." }], "Text"], Cell[BoxData[ RowBox[{"dlnorm", RowBox[{"(", RowBox[{"z", ",", RowBox[{"log", RowBox[{"(", " ", "m", ")"}]}], ",", " ", "\[Sigma]"}], ")"}]}]], "Input"], Cell[BoxData[{ RowBox[{"#", "generate", " ", "random", " ", "number"}], "\[IndentingNewLine]", RowBox[{"rlnorm", RowBox[{"(", RowBox[{"1", ",", RowBox[{"meanlog", " ", "=", " ", "1"}], ",", " ", RowBox[{"sdlog", " ", "=", " ", "1.2"}]}], ")"}]}]}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "m_", ",", "\[Sigma]_"}], "]"}], ":=", RowBox[{ FractionBox["1", RowBox[{"z", SqrtBox[ RowBox[{"2", "\[Pi]", " ", SuperscriptBox["\[Sigma]", "2"]}]]}]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"Log", "[", "z", "]"}], "-", RowBox[{"Log", "[", "m", "]"}]}], ")"}], "2"], RowBox[{"2", SuperscriptBox["\[Sigma]", "2"]}]]}], "]"}]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "1.7`", ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "20"}], "}"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.047619 0.0147151 1.52155 [ [.2619 .00222 -3 -9 ] [.2619 .00222 3 0 ] [.5 .00222 -6 -9 ] [.5 .00222 6 0 ] [.7381 .00222 -6 -9 ] [.7381 .00222 6 0 ] [.97619 .00222 -6 -9 ] [.97619 .00222 6 0 ] [.01131 .16687 -18 -4.5 ] [.01131 .16687 0 4.5 ] [.01131 .31903 -18 -4.5 ] [.01131 .31903 0 4.5 ] [.01131 .47118 -18 -4.5 ] [.01131 .47118 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .2619 .01472 m .2619 .02097 L s [(5)] .2619 .00222 0 1 Mshowa .5 .01472 m .5 .02097 L s [(10)] .5 .00222 0 1 Mshowa .7381 .01472 m .7381 .02097 L s [(15)] .7381 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(20)] .97619 .00222 0 1 Mshowa .125 Mabswid .07143 .01472 m .07143 .01847 L s .11905 .01472 m .11905 .01847 L s .16667 .01472 m .16667 .01847 L s .21429 .01472 m .21429 .01847 L s .30952 .01472 m .30952 .01847 L s .35714 .01472 m .35714 .01847 L s .40476 .01472 m .40476 .01847 L s .45238 .01472 m .45238 .01847 L s .54762 .01472 m .54762 .01847 L s .59524 .01472 m .59524 .01847 L s .64286 .01472 m .64286 .01847 L s .69048 .01472 m .69048 .01847 L s .78571 .01472 m .78571 .01847 L s .83333 .01472 m .83333 .01847 L s .88095 .01472 m .88095 .01847 L s .92857 .01472 m .92857 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .16687 m .03006 .16687 L s [(0.1)] .01131 .16687 1 0 Mshowa .02381 .31903 m .03006 .31903 L s [(0.2)] .01131 .31903 1 0 Mshowa .02381 .47118 m .03006 .47118 L s [(0.3)] .01131 .47118 1 0 Mshowa .125 Mabswid .02381 .04515 m .02756 .04515 L s .02381 .07558 m .02756 .07558 L s .02381 .10601 m .02756 .10601 L s .02381 .13644 m .02756 .13644 L s .02381 .1973 m .02756 .1973 L s .02381 .22773 m .02756 .22773 L s .02381 .25816 m .02756 .25816 L s .02381 .28859 m .02756 .28859 L s .02381 .34946 m .02756 .34946 L s .02381 .37989 m .02756 .37989 L s .02381 .41032 m .02756 .41032 L s .02381 .44075 m .02756 .44075 L s .02381 .50161 m .02756 .50161 L s .02381 .53204 m .02756 .53204 L s .02381 .56247 m .02756 .56247 L s .02381 .59291 m .02756 .59291 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .01472 m .03279 .30151 L .03543 .39285 L .03793 .46043 L .04018 .50691 L .04262 .54441 L .04387 .5592 L .0452 .57202 L .04634 .58097 L .04758 .58863 L .04888 .59476 L .0501 .59887 L .05085 .60067 L .05155 .60194 L .05219 .60273 L .05288 .60325 L .05414 .60332 L .05528 .60252 L .0566 .6007 L .05784 .5982 L .06005 .59217 L .06244 .58381 L .07312 .53315 L .08439 .47222 L .10458 .37259 L .12422 .29599 L .14255 .24092 L .1629 .19421 L .18146 .16155 L .20055 .13529 L .22131 .11305 L .24108 .09643 L .26209 .08245 L .29984 .06407 L .31919 .05706 L .34004 .05084 L .38118 .04157 L .42081 .03528 L .45891 .03087 L .49947 .02738 L .53852 .02486 L .58002 .02283 L .62 .02132 L .65847 .02018 L .69938 .01922 L .73879 .01848 L .77668 .01791 L .81701 .01741 L .85584 .01702 L .89712 .01667 L Mistroke .93688 .0164 L .97512 .01617 L .97619 .01617 L Mfstroke % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztW0tPE1EUHvoAAQEFQeUhVeShAoqKLxDkJYKgwcQQY4xp1KQkEl+4cuVO N+79AfoD3Lty58qVCxe6cGFijIkxxhijtfeMXqZnztcO01vaYif0zM053/ed MzNnZu5My2x0KXZtMbq0cCUambwdvRlbuHIncvLG7YQrWGJZJTHLst5GL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b0LfbFNVFKCO9G6X 7KH81JG+8XBMeU0kADoeH8iyUwF+IkmfT/pBBdnDPvLBE81Plgq9X70ePaPb kqV86R/vTOS13M976WWlXUHW/kJUPEul3+hIz99FHdbYks7RLOhQOOdVrKKO 9LqK7LGijl8d6UImXVXIDmRBh8I5r2IVdaRbAdnBoo76SD9jJns8j3VgF+dy aySOdN0gO1TUUR9p9kR2uKjjWYfC4BsNGozipBnRln2aM4Y5dEUPeEGSzZN/ N7BK/gDjh76w\ \>"], ImageRangeCache->{{{0, 359}, {221.375, 0}} -> {-1.65089, -0.0304544, \ 0.0771275, 0.00241381}}] }, Open ]], Cell["Show that pdf integrates to 1", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "1", ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["1"], "Output"] }, Open ]], Cell["Derive expected value", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"z", " ", RowBox[{"f", "[", RowBox[{"z", ",", "m", ",", "\[Sigma]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"\[Sigma]", ">", "0"}], ",", RowBox[{"m", ">", "0"}], ",", RowBox[{"\[Sigma]", "\[Element]", "Reals"}], ",", RowBox[{"m", "\[Element]", "Reals"}]}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ SuperscriptBox["\[ExponentialE]", FractionBox[ SuperscriptBox["\[Sigma]", "2"], "2"]], " ", "m"}]], "Output"] }, Open ]], Cell["Derive variance", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", RowBox[{"Integrate", "[", RowBox[{ RowBox[{"z", " ", RowBox[{"f", "[", RowBox[{"z", ",", "m", ",", "\[Sigma]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"\[Sigma]", ">", "0"}], ",", RowBox[{"m", ">", "0"}], ",", RowBox[{"\[Sigma]", "\[Element]", "Reals"}], ",", RowBox[{"m", "\[Element]", "Reals"}]}], "}"}]}]}], "]"}]}], ")"}], "2"], RowBox[{"f", "[", RowBox[{"z", ",", "m", ",", "\[Sigma]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"\[Sigma]", ">", "0"}], ",", RowBox[{"m", ">", "0"}], ",", RowBox[{"\[Sigma]", "\[Element]", "Reals"}], ",", RowBox[{"m", "\[Element]", "Reals"}]}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ SuperscriptBox["\[ExponentialE]", SuperscriptBox["\[Sigma]", "2"]], " ", RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", SuperscriptBox["\[ExponentialE]", SuperscriptBox["\[Sigma]", "2"]]}], ")"}], " ", SuperscriptBox["m", "2"]}]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"<<", "Statistics`ContinuousDistributions`"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "lognormal", " ", "random", " ", "number", " ", "with", " ", "the", " ", "first", " ", "number", " ", "being", " ", "the", " ", RowBox[{"Log", "[", "m", "]"}], " ", "and", " ", "the", " ", "second", " ", "number", " ", "being", " ", RowBox[{"\[Sigma]", ".", " ", "In"}], " ", "the", " ", "case", " ", "below"}], ",", " ", RowBox[{"m", " ", "=", " ", RowBox[{ RowBox[{"3", " ", "and", " ", "\[Sigma]"}], " ", "=", " ", "2"}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Random", "[", RowBox[{"LogNormalDistribution", "[", RowBox[{ RowBox[{"Log", "[", "3", "]"}], ",", "2"}], "]"}], "]"}]}], "Input"], Cell[BoxData["6.94064888997441`"], "Output"] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Exponential", "Subsection"], Cell[TextData[{ "Exponential Distribution:\nhas three parameters: ", StyleBox["m", FontSlant->"Italic"], " is the location parameter; ", StyleBox["\[Sigma]", FontSlant->"Italic"], " is the shape parameter\nprobability density function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", RowBox[{"a", " ", RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", "a"}], " ", "z"}], "]"}]}]}], TraditionalForm]]], ", where z > 0\nmean: ", Cell[BoxData[ FormBox[ FractionBox["1", "a"], TraditionalForm]]], "\nvariance: ", Cell[BoxData[ FormBox[ FractionBox["1", SuperscriptBox["a", "2"]], TraditionalForm]]], StyleBox["\n", FontSlant->"Italic"], "note: Continuous distribution analog of Poisson. Can be used for \ dispersal distance. Widely used in Baysian Analysis" }], "Text"], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[ RowBox[{"dexp", RowBox[{"(", RowBox[{"z", ",", RowBox[{"rate", " ", "=", " ", "a"}]}], ")"}]}]], "Input"], Cell[BoxData[{ RowBox[{"#", "generate", " ", "random", " ", "number"}], "\[IndentingNewLine]", RowBox[{"rexp", RowBox[{"(", RowBox[{"1", ",", RowBox[{"rate", " ", "=", " ", "a"}]}], ")"}]}]}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "a_"}], "]"}], ":=", RowBox[{"a", " ", RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", "a"}], " ", "z"}], "]"}]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "0.5`"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "15"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0634921 0.0143894 1.17786 [ [.15079 .00189 -3 -9 ] [.15079 .00189 3 0 ] [.27778 .00189 -3 -9 ] [.27778 .00189 3 0 ] [.40476 .00189 -3 -9 ] [.40476 .00189 3 0 ] [.53175 .00189 -3 -9 ] [.53175 .00189 3 0 ] [.65873 .00189 -6 -9 ] [.65873 .00189 6 0 ] [.78571 .00189 -6 -9 ] [.78571 .00189 6 0 ] [.9127 .00189 -6 -9 ] [.9127 .00189 6 0 ] [.01131 .13218 -18 -4.5 ] [.01131 .13218 0 4.5 ] [.01131 .24996 -18 -4.5 ] [.01131 .24996 0 4.5 ] [.01131 .36775 -18 -4.5 ] [.01131 .36775 0 4.5 ] [.01131 .48553 -18 -4.5 ] [.01131 .48553 0 4.5 ] [.01131 .60332 -18 -4.5 ] [.01131 .60332 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .15079 .01439 m .15079 .02064 L s [(2)] .15079 .00189 0 1 Mshowa .27778 .01439 m .27778 .02064 L s [(4)] .27778 .00189 0 1 Mshowa .40476 .01439 m .40476 .02064 L s [(6)] .40476 .00189 0 1 Mshowa .53175 .01439 m .53175 .02064 L s [(8)] .53175 .00189 0 1 Mshowa .65873 .01439 m .65873 .02064 L s [(10)] .65873 .00189 0 1 Mshowa .78571 .01439 m .78571 .02064 L s [(12)] .78571 .00189 0 1 Mshowa .9127 .01439 m .9127 .02064 L s [(14)] .9127 .00189 0 1 Mshowa .125 Mabswid .05556 .01439 m .05556 .01814 L s .0873 .01439 m .0873 .01814 L s .11905 .01439 m .11905 .01814 L s .18254 .01439 m .18254 .01814 L s .21429 .01439 m .21429 .01814 L s .24603 .01439 m .24603 .01814 L s .30952 .01439 m .30952 .01814 L s .34127 .01439 m .34127 .01814 L s .37302 .01439 m .37302 .01814 L s .43651 .01439 m .43651 .01814 L s .46825 .01439 m .46825 .01814 L s .5 .01439 m .5 .01814 L s .56349 .01439 m .56349 .01814 L s .59524 .01439 m .59524 .01814 L s .62698 .01439 m .62698 .01814 L s .69048 .01439 m .69048 .01814 L s .72222 .01439 m .72222 .01814 L s .75397 .01439 m .75397 .01814 L s .81746 .01439 m .81746 .01814 L s .84921 .01439 m .84921 .01814 L s .88095 .01439 m .88095 .01814 L s .94444 .01439 m .94444 .01814 L s .97619 .01439 m .97619 .01814 L s .25 Mabswid 0 .01439 m 1 .01439 L s .02381 .13218 m .03006 .13218 L s [(0.1)] .01131 .13218 1 0 Mshowa .02381 .24996 m .03006 .24996 L s [(0.2)] .01131 .24996 1 0 Mshowa .02381 .36775 m .03006 .36775 L s [(0.3)] .01131 .36775 1 0 Mshowa .02381 .48553 m .03006 .48553 L s [(0.4)] .01131 .48553 1 0 Mshowa .02381 .60332 m .03006 .60332 L s [(0.5)] .01131 .60332 1 0 Mshowa .125 Mabswid .02381 .03795 m .02756 .03795 L s .02381 .0615 m .02756 .0615 L s .02381 .08506 m .02756 .08506 L s .02381 .10862 m .02756 .10862 L s .02381 .15573 m .02756 .15573 L s .02381 .17929 m .02756 .17929 L s .02381 .20285 m .02756 .20285 L s .02381 .2264 m .02756 .2264 L s .02381 .27352 m .02756 .27352 L s .02381 .29708 m .02756 .29708 L s .02381 .32063 m .02756 .32063 L s .02381 .34419 m .02756 .34419 L s .02381 .3913 m .02756 .3913 L s .02381 .41486 m .02756 .41486 L s .02381 .43842 m .02756 .43842 L s .02381 .46198 m .02756 .46198 L s .02381 .50909 m .02756 .50909 L s .02381 .53265 m .02756 .53265 L s .02381 .5562 m .02756 .5562 L s .02381 .57976 m .02756 .57976 L s .25 Mabswid .02381 0 m .02381 .61803 L s .5 Mabswid .02381 .60332 m .06244 .44883 L .10458 .32615 L .14415 .24268 L .18221 .18356 L .22272 .13736 L .26171 .10484 L .30316 .07965 L .34309 .06205 L .3815 .04961 L .42237 .03991 L .46172 .03311 L .49955 .02829 L .53984 .02451 L .57861 .02185 L .61984 .01978 L .65954 .01833 L .69774 .01731 L .73838 .01651 L .77751 .01595 L .81909 .01551 L .85916 .01521 L .89771 .01499 L .93871 .01483 L .97619 .01472 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztm01wFEUUxyfZZRMDQUSMIoYsGCKChI+giIJ8h89AICAEEVwDmCAxkATF CKiIiqVilQcPHLx48WRpld68WOXFKi8ePXny5MGDBw8e1vSb2Ls9+/9venea nZkqU8nL1Ov/772e6e6Znu7dntz44Jnh3PjQQC67czR3YXBoYCzbPTI66UrV eV7d15N/TVlPHec97z+Tn/zNf6OM5/WqfxnlXqWO0ubRSn20TB01qKOU9nVo X72OskT70lq3sCjVJO7XQSrhgwHfKuDrtGSXW+qWAV/Kku1wzDYAX6t/yQ6C orUJvDxpyxxlLsUhULRSdzs5qtfdMyanPQP4HmU5MkVDpY+drJc2fJ5XMlrU T72+JCJf4fi0MsC3lLZ6SY3b/IPDtB9Pe47qD/lq0aaoiz5S8cnb3guDA1v9 rKadI1n3veDocHR51ljoWDzpxeJCQxcR7SGIYFcqugBy40/r05EB3a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VHmBR19QI+ZBxlysLYOm4RntQ7OC+SziqB+x ZtNwBxW5O36p0Oa52DHrVM368hbm+Q7C1vAMbFPdz1KNW6cKM9GeLr3tRLuF xbnkx0EDu1bMfYx5NSQjHZTWqEz0eYx5LXrmXsZcdsvMZczr0TP3MGYi2Po0 +kTI6IFytO8k9o3oGXSrE3slegYtt4i9GmxJGv0qj47WjcRei55Bi2Zi30wm g9Ybxb4VkpHWpzUKG93iWS327fgzaKLdoH1ovRStB4u97kesaKKNgqGVUwdJ bRdpHaSSi043DBwk8HtpyddlCvNqNJ0T+46THAGpg2zBsZqAVIEPkFT0ASix N/w4aNgmnincSJDyXR4dDcm4MOhlS+x7yWTQ1wnEvh+SoYsoTqKjpwlibiaT Qa/5Yj9ICEO/WVwafYZZnp+6c6ujj+KgK3n8ycHHUUhS2ku+tHdHygsfbP2k nNdivbaEqWiiWNGKbDWpbNf2iq9QDMOW9BLbmR5dBawmmO2M986GDaxzypin UxJH35T16v4FjY3inA==\ \>"], ImageRangeCache->{{{79.5625, 308.938}, {248.875, 107.563}} -> {-7.0322, \ 0.382044, 0.0580641, 0.00312992}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"<<", "Statistics`ContinuousDistributions`"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "exponential", " ", "random", " ", "number", " ", "with", " ", "a"}], " ", "=", " ", "0.5"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Random", "[", RowBox[{"ExponentialDistribution", "[", "0.5", "]"}], "]"}]}], "Input"], Cell[BoxData["2.151404705077015`"], "Output"] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Gamma", "Subsection"], Cell[TextData[{ "Gamma Distribution:\nhas two parameters: ", StyleBox["a", FontSlant->"Italic"], " is the rate parameter; ", StyleBox["n", FontSlant->"Italic"], " is the shape parameter\nprobability density function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", RowBox[{ FractionBox[ SuperscriptBox["a", "n"], RowBox[{"\[CapitalGamma]", "(", "n", ")"}]], " ", RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", "a"}], " ", "z"}], "]"}], SuperscriptBox["z", RowBox[{"n", "-", "1"}]]}]}], TraditionalForm]]], ", where z > 0\nmean: ", Cell[BoxData[ FormBox[ FractionBox["n", "a"], TraditionalForm]]], "\nvariance: ", Cell[BoxData[ FormBox[ FractionBox["n", SuperscriptBox["a", "2"]], TraditionalForm]]], "\nnote: can have a long tail. When ", StyleBox["n", FontSlant->"Italic"], " = 1, the gamma distribution becomes the exponential distribution. When ", StyleBox["n", FontSlant->"Italic"], " = degrees of freedom / 2 and ", StyleBox["a", FontSlant->"Italic"], " = 2, the gamma distribution becomes the chi-square distribution." }], "Text"], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[ RowBox[{"dgamma", RowBox[{"(", RowBox[{"z", ",", RowBox[{"shape", " ", "=", " ", "n"}], " ", ",", RowBox[{"rate", " ", "=", " ", "a"}]}], ")"}]}]], "Input"], Cell[BoxData[{ RowBox[{"#", "generate", " ", "random", " ", "number"}], "\[IndentingNewLine]", RowBox[{"rgamma", RowBox[{"(", RowBox[{"1", ",", RowBox[{"shape", " ", "=", " ", "n"}], ",", RowBox[{"rate", " ", "=", " ", "a"}]}], ")"}]}]}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "a_", ",", "n_"}], "]"}], ":=", RowBox[{ FractionBox[ SuperscriptBox["a", "n"], RowBox[{"Gamma", "[", "n", "]"}]], " ", RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", "a"}], " ", "z"}], "]"}], SuperscriptBox["z", RowBox[{"n", "-", "1"}]]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "1", ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "12"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0793651 0.0147115 0.588608 [ [.18254 .00221 -3 -9 ] [.18254 .00221 3 0 ] [.34127 .00221 -3 -9 ] [.34127 .00221 3 0 ] [.5 .00221 -3 -9 ] [.5 .00221 3 0 ] [.65873 .00221 -3 -9 ] [.65873 .00221 3 0 ] [.81746 .00221 -6 -9 ] [.81746 .00221 6 0 ] [.97619 .00221 -6 -9 ] [.97619 .00221 6 0 ] [.01131 .13243 -18 -4.5 ] [.01131 .13243 0 4.5 ] [.01131 .25015 -18 -4.5 ] [.01131 .25015 0 4.5 ] [.01131 .36788 -18 -4.5 ] [.01131 .36788 0 4.5 ] [.01131 .4856 -18 -4.5 ] [.01131 .4856 0 4.5 ] [.01131 .60332 -6 -4.5 ] [.01131 .60332 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .18254 .01471 m .18254 .02096 L s [(2)] .18254 .00221 0 1 Mshowa .34127 .01471 m .34127 .02096 L s [(4)] .34127 .00221 0 1 Mshowa .5 .01471 m .5 .02096 L s [(6)] .5 .00221 0 1 Mshowa .65873 .01471 m .65873 .02096 L s [(8)] .65873 .00221 0 1 Mshowa .81746 .01471 m .81746 .02096 L s [(10)] .81746 .00221 0 1 Mshowa .97619 .01471 m .97619 .02096 L s [(12)] .97619 .00221 0 1 Mshowa .125 Mabswid .06349 .01471 m .06349 .01846 L s .10317 .01471 m .10317 .01846 L s .14286 .01471 m .14286 .01846 L s .22222 .01471 m .22222 .01846 L s .2619 .01471 m .2619 .01846 L s .30159 .01471 m .30159 .01846 L s .38095 .01471 m .38095 .01846 L s .42063 .01471 m .42063 .01846 L s .46032 .01471 m .46032 .01846 L s .53968 .01471 m .53968 .01846 L s .57937 .01471 m .57937 .01846 L s .61905 .01471 m .61905 .01846 L s .69841 .01471 m .69841 .01846 L s .7381 .01471 m .7381 .01846 L s .77778 .01471 m .77778 .01846 L s .85714 .01471 m .85714 .01846 L s .89683 .01471 m .89683 .01846 L s .93651 .01471 m .93651 .01846 L s .25 Mabswid 0 .01471 m 1 .01471 L s .02381 .13243 m .03006 .13243 L s [(0.2)] .01131 .13243 1 0 Mshowa .02381 .25015 m .03006 .25015 L s [(0.4)] .01131 .25015 1 0 Mshowa .02381 .36788 m .03006 .36788 L s [(0.6)] .01131 .36788 1 0 Mshowa .02381 .4856 m .03006 .4856 L s [(0.8)] .01131 .4856 1 0 Mshowa .02381 .60332 m .03006 .60332 L s [(1)] .01131 .60332 1 0 Mshowa .125 Mabswid .02381 .04414 m .02756 .04414 L s .02381 .07357 m .02756 .07357 L s .02381 .103 m .02756 .103 L s .02381 .16186 m .02756 .16186 L s .02381 .19129 m .02756 .19129 L s .02381 .22072 m .02756 .22072 L s .02381 .27958 m .02756 .27958 L s .02381 .30902 m .02756 .30902 L s .02381 .33845 m .02756 .33845 L s .02381 .39731 m .02756 .39731 L s .02381 .42674 m .02756 .42674 L s .02381 .45617 m .02756 .45617 L s .02381 .51503 m .02756 .51503 L s .02381 .54446 m .02756 .54446 L s .02381 .57389 m .02756 .57389 L s .25 Mabswid .02381 0 m .02381 .61803 L s .5 Mabswid .02381 .60332 m .04262 .47913 L .06244 .37646 L .08255 .29549 L .10458 .22745 L .12415 .18095 L .14509 .14241 L .16639 .11234 L .18653 .09046 L .20651 .07361 L .22495 .0614 L .24367 .05158 L .2643 .04315 L .28371 .03698 L .30459 .03183 L .32572 .02783 L .34581 .02489 L .36562 .02264 L .384 .021 L .40453 .01957 L .42313 .01855 L .44238 .01773 L .4632 .01703 L .48314 .01652 L .5042 .0161 L .52384 .01579 L .54217 .01557 L .56253 .01538 L .58108 .01524 L .60017 .01512 L .62093 .01503 L .6407 .01496 L .66171 .0149 L .68118 .01486 L .69946 .01483 L .71794 .01481 L .73815 .01478 L .75819 .01477 L .77929 .01475 L .7989 .01475 L .81985 .01474 L .8412 .01473 L .86135 .01473 L .88136 .01472 L .89981 .01472 L .91858 .01472 L .93922 .01472 L .95704 .01472 L .97619 .01472 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztm/l3FEUQxyfZdcOhJEAAQYFFkCMIguEIEAjkhcADIgEREISwhiNBOQxR 1IgIyvUex+/8FfAXxu0a0js9+X53enc6OzusvGylqa5PVff2MdUzk4HC+MiV G4Xx0eFC/tBY4fbI6PCdfP+tsaIq0+R5TW+Knzl5T5UnPW9KTBZ/Jt8q4XkX 1K+cUu9VpaxZ6talnarUokoZrevUumbtJRtwWzT140lA3yik2wt0eyzZLku7 nUCXsWQ7Y7C+zrsIqg6ksNtZoMv5XRwCVd16SkipWU+dOunOB1TnXWLd8bKG bmqpBEz9xeAFV85uxw3P0bHxCnRaRTZcfZCuFkPRQv1Z7yPhxaP+7aPDWPd7 Rpxu91jYMX/blRQVWh6I2FoxEdwWs7rBsmj2a2d7yi6frK7dUbb23XoOXu+C 5TyARb5MR/1i9UsG/bUSTZz6yLFuXkL+ZBl1KQ1aUO9LL2e9XwMpQ9WmNHPq qKUpGXB0TUYXtqz+kjssCVtdmcbdV1JyPPn/bG45oWRWW7Zyy3ElW7TlQm55 04y+jFteN6PnueVV03INt7ysZLO2XM8tJSvLaMuOgKXwQ2b9Ju7pvG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ryh2x1WZ+piiq95f4q Ca08kZC/lsnBevSMi+bbL+uEmTYStWpRu45OT74xvKONtpJ6r+k/E8bzfQ== \ \>"], ImageRangeCache->{{{79.5625, 308.938}, {684.375, 543.063}} -> {-5.61954, \ 4.17184, 0.0464266, 0.00625994}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "1", ",", "2"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "12"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0793651 0.0147143 1.59999 [ [.18254 .00221 -3 -9 ] [.18254 .00221 3 0 ] [.34127 .00221 -3 -9 ] [.34127 .00221 3 0 ] [.5 .00221 -3 -9 ] [.5 .00221 3 0 ] [.65873 .00221 -3 -9 ] [.65873 .00221 3 0 ] [.81746 .00221 -6 -9 ] [.81746 .00221 6 0 ] [.97619 .00221 -6 -9 ] [.97619 .00221 6 0 ] [.01131 .09471 -24 -4.5 ] [.01131 .09471 0 4.5 ] [.01131 .17471 -18 -4.5 ] [.01131 .17471 0 4.5 ] [.01131 .25471 -24 -4.5 ] [.01131 .25471 0 4.5 ] [.01131 .33471 -18 -4.5 ] [.01131 .33471 0 4.5 ] [.01131 .41471 -24 -4.5 ] [.01131 .41471 0 4.5 ] [.01131 .49471 -18 -4.5 ] [.01131 .49471 0 4.5 ] [.01131 .57471 -24 -4.5 ] [.01131 .57471 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .18254 .01471 m .18254 .02096 L s [(2)] .18254 .00221 0 1 Mshowa .34127 .01471 m .34127 .02096 L s [(4)] .34127 .00221 0 1 Mshowa .5 .01471 m .5 .02096 L s [(6)] .5 .00221 0 1 Mshowa .65873 .01471 m .65873 .02096 L s [(8)] .65873 .00221 0 1 Mshowa .81746 .01471 m .81746 .02096 L s [(10)] .81746 .00221 0 1 Mshowa .97619 .01471 m .97619 .02096 L s [(12)] .97619 .00221 0 1 Mshowa .125 Mabswid .06349 .01471 m .06349 .01846 L s .10317 .01471 m .10317 .01846 L s .14286 .01471 m .14286 .01846 L s .22222 .01471 m .22222 .01846 L s .2619 .01471 m .2619 .01846 L s .30159 .01471 m .30159 .01846 L s .38095 .01471 m .38095 .01846 L s .42063 .01471 m .42063 .01846 L s .46032 .01471 m .46032 .01846 L s .53968 .01471 m .53968 .01846 L s .57937 .01471 m .57937 .01846 L s .61905 .01471 m .61905 .01846 L s .69841 .01471 m .69841 .01846 L s .7381 .01471 m .7381 .01846 L s .77778 .01471 m .77778 .01846 L s .85714 .01471 m .85714 .01846 L s .89683 .01471 m .89683 .01846 L s .93651 .01471 m .93651 .01846 L s .25 Mabswid 0 .01471 m 1 .01471 L s .02381 .09471 m .03006 .09471 L s [(0.05)] .01131 .09471 1 0 Mshowa .02381 .17471 m .03006 .17471 L s [(0.1)] .01131 .17471 1 0 Mshowa .02381 .25471 m .03006 .25471 L s [(0.15)] .01131 .25471 1 0 Mshowa .02381 .33471 m .03006 .33471 L s [(0.2)] .01131 .33471 1 0 Mshowa .02381 .41471 m .03006 .41471 L s [(0.25)] .01131 .41471 1 0 Mshowa .02381 .49471 m .03006 .49471 L s [(0.3)] .01131 .49471 1 0 Mshowa .02381 .57471 m .03006 .57471 L s [(0.35)] .01131 .57471 1 0 Mshowa .125 Mabswid .02381 .03071 m .02756 .03071 L s .02381 .04671 m .02756 .04671 L s .02381 .06271 m .02756 .06271 L s .02381 .07871 m .02756 .07871 L s .02381 .11071 m .02756 .11071 L s .02381 .12671 m .02756 .12671 L s .02381 .14271 m .02756 .14271 L s .02381 .15871 m .02756 .15871 L s .02381 .19071 m .02756 .19071 L s .02381 .20671 m .02756 .20671 L s .02381 .22271 m .02756 .22271 L s .02381 .23871 m .02756 .23871 L s .02381 .27071 m .02756 .27071 L s .02381 .28671 m .02756 .28671 L s .02381 .30271 m .02756 .30271 L s .02381 .31871 m .02756 .31871 L s .02381 .35071 m .02756 .35071 L s .02381 .36671 m .02756 .36671 L s .02381 .38271 m .02756 .38271 L s .02381 .39871 m .02756 .39871 L s .02381 .43071 m .02756 .43071 L s .02381 .44671 m .02756 .44671 L s .02381 .46271 m .02756 .46271 L s .02381 .47871 m .02756 .47871 L s .02381 .51071 m .02756 .51071 L s .02381 .52671 m .02756 .52671 L s .02381 .54271 m .02756 .54271 L s .02381 .55871 m .02756 .55871 L s .02381 .59071 m .02756 .59071 L s .02381 .60671 m .02756 .60671 L s .25 Mabswid .02381 0 m .02381 .61803 L s .5 Mabswid .02381 .01472 m .03279 .17632 L .04262 .31388 L .05288 .42105 L .06244 .49341 L .06792 .52483 L .0731 .54872 L .07781 .56602 L .0828 .58027 L .08539 .58613 L .08823 .59148 L .09085 .59544 L .09324 .59831 L .09606 .60081 L .09762 .60181 L .09833 .60218 L .0991 .60252 L .09981 .60277 L .10046 .60297 L .10172 .60322 L .10243 .60329 L .10319 .60332 L .10391 .60329 L .10458 .60323 L .10584 .60299 L .10704 .60264 L .10811 .60223 L .10928 .60166 L .11189 .60002 L .11432 .59803 L .11872 .5934 L .1234 .58716 L .13323 .5704 L .14407 .54748 L .18427 .44306 L .22296 .34123 L .2641 .24932 L .30372 .1806 L .34183 .13131 L .36308 .10988 L .38239 .09358 L .42144 .06818 L .44062 .05873 L .46142 .05027 L .4809 .04377 L .50234 .03793 L .54174 .03001 L .56119 .02714 L .58208 .02463 L .60183 .02272 L Mistroke .62336 .02105 L .66312 .01881 L .68283 .018 L .70382 .01732 L .72383 .0168 L .74545 .01635 L .78557 .01576 L .80555 .01555 L .82662 .01537 L .86465 .01514 L .8842 .01505 L .90512 .01498 L .92497 .01493 L .94654 .01488 L .97619 .01483 L Mfstroke 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztXGtoHUUY3eTe3KSP9Jn0ZWtiat+PNLWNbZo+7bu29mEf9mGbxmqq1ta2 vh9V1KIiYlEUFBFFEVFRoT9ERERBQUHQH0IRERERoSAICgoaM98ms3sn52xm 9+5m7y2G3sn0+75zvrMzs7NzZ3ezse1kx6EjbScPt7fVrznedqzjcPuJ+tVH j3eZMmWOU/Zu12dgvaPqnY7TU3R2/et8TxXK0nf9OvUrp6CtqpZVtUWg1qxq laqW0bYmbSvXLFkfbVeoq0kSukGGrRXYFlpiL7eMawa2jCW2qQCsa3MOAdey EjzsLLDl3EO8HrgW6SHRomrleugUyeFUUJtzAzscJ5tn6zlBfKHuyeD4zxzU r4UIz9G+cTqAq8VOuPqgk7E/uqKS8lnPIy2gH9DhoMMuwjmjkMNebBHH+Oap Ukzo9ECIxtAI/7Qow3KJqpXrmkS3BJ4+We2dF+jtPp/ZtW8qAEt5ujT8deqX dPoZVZRxVHVKtsEXiBbBtioLugoWoqrq/06LQ4s0Y42Yuq8c3c4hRdQQAX2N Jm10/UJxDaqsVRY0BdsyB4g7p8oqZXmVB32tg97iQV+qUhaFZ31BEvO5qsms /QHHf6qDPvIFybXjY+36xHR9qF2fma73tesL03VWu74ytb6jXd+YqLd10Lem 601dO2e63tC170zX67r2vel6Tdd+MBW+ol0/mqiXde0n0/WSrv1sul7UtV9M 1wu69qvpeh70oT/IWLo8p4HnzQN6FjCd50zPaKbfeNDTgLM7vFz3cE4z5bSt QtfMpav6OaMRv3fb8qcktBbMaAxfRlXk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hTfQYAG3oRLqRwtApGaw9bSegtKCmXW0tCi2KU yuto1KkxCClkmzihtkFL5uD7IUjIfCZkhbWQOJ+fvMBlhnv+k2VBr61J6a6a fVN8ZLRF281lPCtLmwe9gCnlqiLmETdCz2Ho1VwFuhA0xsQzm/GsKW2eWYxn rdlLkdFxqbDgmcl41nEedK2eERPPdMazvoh5xI3Q0xh6QzgV/cWDtpO915nQ SgMtl6awLO69lH7eTk5S4dACNExmGjbGpCHLRmVcmat1/9iOjMSP2ULDJKZh U+lpKGTDGH2rmMh0ufeGrTeMo3B7M2lktIWKBsazuXR40MirZzxb0uGpYzxb zd6OjI5LheFHDwJNYDzbSptnPOO52uylyGjDPxzYxjGe7enwjGU8O5LnGQFs oxnPzgR4xI3Qoxh6VzgVUXhGAlsN43EfWI78an7UfE4xbBgj4cgm5W5r4Whu tX0kErUbOluk3JOMJOlo1A4xCPFWwXS/2rDVWh6OlHsLahH+Rn8aQgwb2mtF ktC6Scp91pLi3hJGkxha6Ptlht8SRlnQFzop3bdyfJM4QqMtICn3+9AWlw00 1KU8wHnGABsalVK2cR50WUWt1xcPWi6g01XKg5xH3pCTu5Dy/0M8Ukr/H23L aFSR/Kk4qffxp2Cdsv8AN9udUg==\ \>"], ImageRangeCache->{{{79.5625, 308.938}, {226.688, 85.375}} -> {-6.01146, \ 0.21732, 0.0474181, 0.0023521}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "0.5`", ",", "2"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "12"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0793651 0.0147147 3.19999 [ [.18254 .00221 -3 -9 ] [.18254 .00221 3 0 ] [.34127 .00221 -3 -9 ] [.34127 .00221 3 0 ] [.5 .00221 -3 -9 ] [.5 .00221 3 0 ] [.65873 .00221 -3 -9 ] [.65873 .00221 3 0 ] [.81746 .00221 -6 -9 ] [.81746 .00221 6 0 ] [.97619 .00221 -6 -9 ] [.97619 .00221 6 0 ] [.01131 .09471 -30 -4.5 ] [.01131 .09471 0 4.5 ] [.01131 .17471 -24 -4.5 ] [.01131 .17471 0 4.5 ] [.01131 .25471 -30 -4.5 ] [.01131 .25471 0 4.5 ] [.01131 .33471 -18 -4.5 ] [.01131 .33471 0 4.5 ] [.01131 .41471 -30 -4.5 ] [.01131 .41471 0 4.5 ] [.01131 .49471 -24 -4.5 ] [.01131 .49471 0 4.5 ] [.01131 .57471 -30 -4.5 ] [.01131 .57471 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .18254 .01471 m .18254 .02096 L s [(2)] .18254 .00221 0 1 Mshowa .34127 .01471 m .34127 .02096 L s [(4)] .34127 .00221 0 1 Mshowa .5 .01471 m .5 .02096 L s [(6)] .5 .00221 0 1 Mshowa .65873 .01471 m .65873 .02096 L s [(8)] .65873 .00221 0 1 Mshowa .81746 .01471 m .81746 .02096 L s [(10)] .81746 .00221 0 1 Mshowa .97619 .01471 m .97619 .02096 L s [(12)] .97619 .00221 0 1 Mshowa .125 Mabswid .06349 .01471 m .06349 .01846 L s .10317 .01471 m .10317 .01846 L s .14286 .01471 m .14286 .01846 L s .22222 .01471 m .22222 .01846 L s .2619 .01471 m .2619 .01846 L s .30159 .01471 m .30159 .01846 L s .38095 .01471 m .38095 .01846 L s .42063 .01471 m .42063 .01846 L s .46032 .01471 m .46032 .01846 L s .53968 .01471 m .53968 .01846 L s .57937 .01471 m .57937 .01846 L s .61905 .01471 m .61905 .01846 L s .69841 .01471 m .69841 .01846 L s .7381 .01471 m .7381 .01846 L s .77778 .01471 m .77778 .01846 L s .85714 .01471 m .85714 .01846 L s .89683 .01471 m .89683 .01846 L s .93651 .01471 m .93651 .01846 L s .25 Mabswid 0 .01471 m 1 .01471 L s .02381 .09471 m .03006 .09471 L s [(0.025)] .01131 .09471 1 0 Mshowa .02381 .17471 m .03006 .17471 L s [(0.05)] .01131 .17471 1 0 Mshowa .02381 .25471 m .03006 .25471 L s [(0.075)] .01131 .25471 1 0 Mshowa .02381 .33471 m .03006 .33471 L s [(0.1)] .01131 .33471 1 0 Mshowa .02381 .41471 m .03006 .41471 L s [(0.125)] .01131 .41471 1 0 Mshowa .02381 .49471 m .03006 .49471 L s [(0.15)] .01131 .49471 1 0 Mshowa .02381 .57471 m .03006 .57471 L s [(0.175)] .01131 .57471 1 0 Mshowa .125 Mabswid .02381 .03071 m .02756 .03071 L s .02381 .04671 m .02756 .04671 L s .02381 .06271 m .02756 .06271 L s .02381 .07871 m .02756 .07871 L s .02381 .11071 m .02756 .11071 L s .02381 .12671 m .02756 .12671 L s .02381 .14271 m .02756 .14271 L s .02381 .15871 m .02756 .15871 L s .02381 .19071 m .02756 .19071 L s .02381 .20671 m .02756 .20671 L s .02381 .22271 m .02756 .22271 L s .02381 .23871 m .02756 .23871 L s .02381 .27071 m .02756 .27071 L s .02381 .28671 m .02756 .28671 L s .02381 .30271 m .02756 .30271 L s .02381 .31871 m .02756 .31871 L s .02381 .35071 m .02756 .35071 L s .02381 .36671 m .02756 .36671 L s .02381 .38271 m .02756 .38271 L s .02381 .39871 m .02756 .39871 L s .02381 .43071 m .02756 .43071 L s .02381 .44671 m .02756 .44671 L s .02381 .46271 m .02756 .46271 L s .02381 .47871 m .02756 .47871 L s .02381 .51071 m .02756 .51071 L s .02381 .52671 m .02756 .52671 L s .02381 .54271 m .02756 .54271 L s .02381 .55871 m .02756 .55871 L s .02381 .59071 m .02756 .59071 L s .02381 .60671 m .02756 .60671 L s .25 Mabswid .02381 0 m .02381 .61803 L s .5 Mabswid .02381 .01472 m .04262 .18311 L .06244 .32002 L .08255 .42369 L .09409 .46969 L .10458 .50418 L .12415 .55224 L .13491 .57088 L .14509 .58412 L .15478 .5932 L .15968 .59659 L .16506 .59948 L .16965 .60127 L .17223 .60202 L .17458 .60255 L .17677 .60292 L .17801 .60307 L .17916 .60318 L .18026 .60326 L .18126 .6033 L .18241 .60332 L .1835 .60331 L .18466 .60327 L .18591 .60319 L .18709 .60308 L .18816 .60296 L .19078 .60255 L .19327 .60203 L .19821 .60063 L .20358 .59858 L .21318 .59367 L .22205 .58784 L .24072 .57224 L .26132 .55088 L .30152 .50136 L .34021 .44923 L .38135 .39362 L .42097 .34263 L .45908 .29739 L .49964 .25405 L .53869 .21721 L .58019 .1832 L .62017 .15509 L .65863 .13199 L .69955 .11118 L .73896 .09436 L .77684 .08077 L .81718 .06869 L .85601 .05905 L .89728 .05059 L Mistroke .93705 .04391 L .97529 .03862 L .97619 .03851 L Mfstroke 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztXAuUTVUYvjP3zsNoBg3jnfEe8pwmz1BpURYrVhYlsoalhsizJFGyJKWH rChWlIpi5Zn0UEKSCKFQRIlEUpIkmebsY/5z7vb995z/3nOv0arV7Dnz7f// /u/svc/e/9nOOZ1yR+T1G5Q7on/f3Mz2w3KH5PXvOzyz3eBhBZA/zueLW1zw k5LpM47zfb7CIr/g//wlRmEg3hwPNH4lGvQtjKNA8FFzOsoxjpKMIz9hjQiL J5aAjbbA1NStAppGGtYCYM1c+l7t0i4HYH6Xvo0i8DUx3yBQ1foSPO0AwBLN U7wHVDWnIaGO4mnoFJHTSWAx32DudHyB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b6SmE6cmLXatVAlgHTldJSLXFfr+8qKocdFylQHWgdNV UqbLyofd3vUgNTdxaszNFtu8xCa7bIqL4t3IxTNvEOF8egXA2nE86TYeVR22 t1ZfBWA3cDylZTxtOZ4yPE8mwK7jeDJkPNdyPGVlPG04nnJ6L1UFluhzSxd4 a/WIpxXHU57nqQYw9NEEVVaQ8aAP9qiyoowHfRVHlcwXC4yf6gBD32pRZWW9 l8L21uprAAx9UUqVV8h40DeAVFmF56kJsGyOJ1PGg+xUyXwtwvipBbCGHE81 vZeQdwPOuzqvojbA6nE8NbzlCb3vjHaAQmcIWQCry2kwuzHybWi0KEaSMqOT qMOdRC3XJ+H1TiqShMaAKmtHJBN1tdsHfVH3owtYlVmxk6nGMBKHZl9V1vFc XOgbzisBhhYoVdaNSBwac273ddEcoxYB6ytA9V2Li972c32AodTZLjj0HrTS 7+KZXbQooBtOVZrGcIJHSxPaGlJlQxuPqkYf3ssI7qZsPjbC0oO9c3jvbLIs FezThPfJIcvUYJ9mvE8TOlvr0SlV04L3sT7Fqf5urbebQovIN+2c6tXxkvCO fXH/AuRVtTo=\ \>"], ImageRangeCache->{{{79.5625, 308.938}, {397.563, 256.25}} -> {-6.43944, \ 0.366109, 0.0485263, 0.00120353}}] }, Open ]], Cell["Derive expected value", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"z", " ", RowBox[{"f", "[", RowBox[{"z", ",", "a", ",", "n"}], "]"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"a", ">", "0"}], ",", RowBox[{"n", ">", "0"}], ",", RowBox[{"a", "\[Element]", "Reals"}], ",", RowBox[{"n", "\[Element]", "Reals"}]}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData[ FractionBox["n", "a"]], "Output"] }, Open ]], Cell["Derive variance", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", RowBox[{"Integrate", "[", RowBox[{ RowBox[{"z", " ", RowBox[{"f", "[", RowBox[{"z", ",", "a", ",", "n"}], "]"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"a", ">", "0"}], ",", RowBox[{"n", ">", "0"}], ",", RowBox[{"a", "\[Element]", "Reals"}], ",", RowBox[{"n", "\[Element]", "Reals"}]}], "}"}]}]}], "]"}]}], ")"}], "2"], RowBox[{"f", "[", RowBox[{"z", ",", "a", ",", "n"}], "]"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"a", ">", "0"}], ",", RowBox[{"n", ">", "0"}], ",", RowBox[{"a", "\[Element]", "Reals"}], ",", RowBox[{"n", "\[Element]", "Reals"}]}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData[ FractionBox["n", SuperscriptBox["a", "2"]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"<<", "Statistics`ContinuousDistributions`"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"gamma", " ", "random", " ", "number", " ", "with", " ", "n"}], " ", "=", " ", RowBox[{ RowBox[{"2", " ", "and", " ", "a"}], " ", "=", " ", "0.5"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Random", "[", RowBox[{"GammaDistribution", "[", RowBox[{"2.0", " ", ",", RowBox[{"1", "/", "0.5"}]}], "]"}], "]"}]}], "Input"], Cell[BoxData["2.824944436711862`"], "Output"] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Chi-Square", "Subsection"], Cell[TextData[{ "Note: this section is a bit incomplete\n\nChi-Square Distribution: A \ squared normal distribution is a chi-square distribution.\n\nprobability \ density function for 1 degree of freedom:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", RowBox[{ FractionBox["1", SqrtBox[ RowBox[{"2", " ", "\[Pi]", " ", SuperscriptBox["\[Sigma]", "2"], "z"}]]], RowBox[{"exp", "(", RowBox[{"-", FractionBox["z", RowBox[{"2", " ", SuperscriptBox["\[Sigma]", "2"]}]]}], ")"}]}]}], TraditionalForm]]], "\n\t\nprobability density function for ", StyleBox["n", FontSlant->"Italic"], " degrees of freedom:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", RowBox[{ FractionBox["1", RowBox[{ SuperscriptBox["\[Sigma]", "n"], SuperscriptBox["2", RowBox[{"(", RowBox[{"n", "/", "2"}], ")"}]], RowBox[{"\[CapitalGamma]", "(", FractionBox["n", "2"], ")"}]}]], SuperscriptBox["z", RowBox[{ RowBox[{"(", RowBox[{"n", "/", "2"}], ")"}], "-", "1"}]], " ", RowBox[{"exp", "(", RowBox[{"-", FractionBox["z", RowBox[{"2", " ", SuperscriptBox["\[Sigma]", "2"]}]]}], ")"}]}]}], ",", " ", RowBox[{ RowBox[{"for", " ", "z"}], "\[GreaterEqual]", "0"}]}], TraditionalForm]]], "\t\nmean: ", Cell[BoxData[ FormBox[ RowBox[{"n", " ", SuperscriptBox["\[Sigma]", "2"]}], TraditionalForm]]], StyleBox["\n", FontSlant->"Italic"], "variance: ", Cell[BoxData[ FormBox[ RowBox[{"2", " ", "n", " ", SuperscriptBox["\[Sigma]", "4"]}], TraditionalForm]]], "\n\nnotes:\n- ", StyleBox["n", FontSlant->"Italic"], " can also be thought of as a shape parameter in the context of a general \ distribution", "\n- often assume unit variance, \[Sigma] = 1 \n- ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"\[CapitalGamma]", "(", FractionBox["1", "2"], ")"}], "=", SqrtBox["\[Pi]"]}], TraditionalForm]]] }], "Text"], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[ RowBox[{"dchisq", RowBox[{"(", ")"}]}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "\[Sigma]_"}], "]"}], ":=", RowBox[{ FractionBox["1", SqrtBox[ RowBox[{"2", "\[Pi]", " ", SuperscriptBox["\[Sigma]", "2"], "z"}]]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox["z", RowBox[{"2", SuperscriptBox["\[Sigma]", "2"]}]]}], "]"}]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "2.1`"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "7"}], "}"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.136054 0.0147151 0.33393 [ [.15986 .00222 -3 -9 ] [.15986 .00222 3 0 ] [.29592 .00222 -3 -9 ] [.29592 .00222 3 0 ] [.43197 .00222 -3 -9 ] [.43197 .00222 3 0 ] [.56803 .00222 -3 -9 ] [.56803 .00222 3 0 ] [.70408 .00222 -3 -9 ] [.70408 .00222 3 0 ] [.84014 .00222 -3 -9 ] [.84014 .00222 3 0 ] [.97619 .00222 -3 -9 ] [.97619 .00222 3 0 ] [.01131 .0982 -24 -4.5 ] [.01131 .0982 0 4.5 ] [.01131 .18168 -18 -4.5 ] [.01131 .18168 0 4.5 ] [.01131 .26516 -24 -4.5 ] [.01131 .26516 0 4.5 ] [.01131 .34865 -6 -4.5 ] [.01131 .34865 0 4.5 ] [.01131 .43213 -24 -4.5 ] [.01131 .43213 0 4.5 ] [.01131 .51561 -18 -4.5 ] [.01131 .51561 0 4.5 ] [.01131 .59909 -24 -4.5 ] [.01131 .59909 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .15986 .01472 m .15986 .02097 L s [(1)] .15986 .00222 0 1 Mshowa .29592 .01472 m .29592 .02097 L s [(2)] .29592 .00222 0 1 Mshowa .43197 .01472 m .43197 .02097 L s [(3)] .43197 .00222 0 1 Mshowa .56803 .01472 m .56803 .02097 L s [(4)] .56803 .00222 0 1 Mshowa .70408 .01472 m .70408 .02097 L s [(5)] .70408 .00222 0 1 Mshowa .84014 .01472 m .84014 .02097 L s [(6)] .84014 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(7)] .97619 .00222 0 1 Mshowa .125 Mabswid .05102 .01472 m .05102 .01847 L s .07823 .01472 m .07823 .01847 L s .10544 .01472 m .10544 .01847 L s .13265 .01472 m .13265 .01847 L s .18707 .01472 m .18707 .01847 L s .21429 .01472 m .21429 .01847 L s .2415 .01472 m .2415 .01847 L s .26871 .01472 m .26871 .01847 L s .32313 .01472 m .32313 .01847 L s .35034 .01472 m .35034 .01847 L s .37755 .01472 m .37755 .01847 L s .40476 .01472 m .40476 .01847 L s .45918 .01472 m .45918 .01847 L s .48639 .01472 m .48639 .01847 L s .51361 .01472 m .51361 .01847 L s .54082 .01472 m .54082 .01847 L s .59524 .01472 m .59524 .01847 L s .62245 .01472 m .62245 .01847 L s .64966 .01472 m .64966 .01847 L s .67687 .01472 m .67687 .01847 L s .73129 .01472 m .73129 .01847 L s .7585 .01472 m .7585 .01847 L s .78571 .01472 m .78571 .01847 L s .81293 .01472 m .81293 .01847 L s .86735 .01472 m .86735 .01847 L s .89456 .01472 m .89456 .01847 L s .92177 .01472 m .92177 .01847 L s .94898 .01472 m .94898 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .0982 m .03006 .0982 L s [(0.25)] .01131 .0982 1 0 Mshowa .02381 .18168 m .03006 .18168 L s [(0.5)] .01131 .18168 1 0 Mshowa .02381 .26516 m .03006 .26516 L s [(0.75)] .01131 .26516 1 0 Mshowa .02381 .34865 m .03006 .34865 L s [(1)] .01131 .34865 1 0 Mshowa .02381 .43213 m .03006 .43213 L s [(1.25)] .01131 .43213 1 0 Mshowa .02381 .51561 m .03006 .51561 L s [(1.5)] .01131 .51561 1 0 Mshowa .02381 .59909 m .03006 .59909 L s [(1.75)] .01131 .59909 1 0 Mshowa .125 Mabswid .02381 .03141 m .02756 .03141 L s .02381 .04811 m .02756 .04811 L s .02381 .0648 m .02756 .0648 L s .02381 .0815 m .02756 .0815 L s .02381 .11489 m .02756 .11489 L s .02381 .13159 m .02756 .13159 L s .02381 .14829 m .02756 .14829 L s .02381 .16498 m .02756 .16498 L s .02381 .19838 m .02756 .19838 L s .02381 .21507 m .02756 .21507 L s .02381 .23177 m .02756 .23177 L s .02381 .24847 m .02756 .24847 L s .02381 .28186 m .02756 .28186 L s .02381 .29856 m .02756 .29856 L s .02381 .31525 m .02756 .31525 L s .02381 .33195 m .02756 .33195 L s .02381 .36534 m .02756 .36534 L s .02381 .38204 m .02756 .38204 L s .02381 .39873 m .02756 .39873 L s .02381 .41543 m .02756 .41543 L s .02381 .44882 m .02756 .44882 L s .02381 .46552 m .02756 .46552 L s .02381 .48222 m .02756 .48222 L s .02381 .49891 m .02756 .49891 L s .02381 .53231 m .02756 .53231 L s .02381 .549 m .02756 .549 L s .02381 .5657 m .02756 .5657 L s .02381 .5824 m .02756 .5824 L s .02381 .61579 m .02756 .61579 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02543 .61803 m .02605 .50761 L .02729 .41023 L .02846 .35664 L .02954 .32246 L .03053 .2985 L .03279 .25985 L .03396 .24503 L .03506 .2333 L .03756 .212 L .04 .19617 L .04262 .18268 L .04793 .1624 L .05297 .14845 L .06244 .12999 L .0675 .12266 L .07289 .1161 L .08259 .10661 L .09412 .09794 L .10458 .09169 L .12383 .08279 L .14465 .07558 L .16419 .07027 L .18565 .06554 L .22514 .05881 L .26556 .05362 L .30447 .04967 L .34583 .04624 L .38568 .04349 L .42401 .04121 L .46479 .03912 L .50405 .03734 L .5418 .03583 L .58201 .03438 L .6207 .03313 L .66184 .03193 L .70146 .03088 L .73957 .02995 L .78013 .02904 L .81917 .02824 L .86067 .02745 L .90065 .02675 L .93912 .02612 L .97619 .02556 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztW0lPVEEQfszKpuCC0aCCISYkGtkl0YPxgBzUgyHxIIZkMsFAXEBAcV8S late/Ame8eLf8OTZn+DJq0jVQL95/b56r2amB2YmM8GapvqrpZeqV68bb+bW FuYf5tYW87n+6ZXc8sJifrX/2tLKNivZ4nktm9v/2vs9am953i7Z2v7Z+k6E OPHtWfrKkugwtTLUGqFWilpjpjUKeNzykl7BMGv12gpq50DXCOAlAO+CEjcK eMNK2SElDumLGCJyaVKJm9g7N9HCXZRWgrcE6mXnEsRJKle7VXZpXHIzYXaf lwr0bn/Q1NpTRh/WgSxEOISWA6kYwq5ZkaOY7AhftJGD1tXeGsY5xdiQm9mC lrv0lZSUVRLWWofRAmnDPyvPtZ/o/Na42YjsSNrwWHTIRMlOyEm5dhCYY/qp Pvr76IsX5AuRFlmqtYZ42RrypelfvfjX3NZN/xrQP7itxdqrTFwlshFuqh5V U0Qmid0eg+whMkzsq0VIBv6lVh+1HstKfhHtJ85nGfTDaNqUQd+IdhPnpwz6 akC/ZdAG0S7i/JFB60bTP3vg96nVyeCCJlFJnmirQfbKyNkgckBGzgSR52Tk Da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{-0.754214, -0.162409, \ 0.0275961, 0.0112435}}] }, Open ]], Cell["Show that pdf integrates to 1", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "2.1"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["0.9999999999999998`"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"<<", "Statistics`ContinuousDistributions`"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Chi", "-", RowBox[{ "Square", " ", "distributed", " ", "random", " ", "number", " ", "with", " ", "1", " ", "degree", " ", "of", " ", "freedom"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Random", "[", RowBox[{"ChiSquareDistribution", "[", "1", "]"}], "]"}]}], "Input"], Cell[BoxData["0.11175614516173449`"], "Output"] }, Open ]], Cell["\<\ Add non-centrality, or location, parameter with a single degree of freedom, \ although no scale parameter mean: 1 + \[Mu] Two forms are given below\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "\[Mu]_"}], "]"}], ":=", RowBox[{ RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ RowBox[{"z", "+", "\[Mu]"}], "2"]}], "]"}], FractionBox["1", "2"], SuperscriptBox[ RowBox[{"(", FractionBox["z", "\[Mu]"], ")"}], FractionBox[ RowBox[{"-", "1"}], "4"]], RowBox[{"BesselI", "[", RowBox[{ RowBox[{ RowBox[{"-", "1"}], "/", "2"}], ",", SqrtBox[ RowBox[{"\[Mu]", " ", "z"}]]}], "]"}]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "\[Mu]_"}], "]"}], ":=", RowBox[{ RowBox[{"Hypergeometric0F1", "[", RowBox[{ FractionBox["1", "2"], ",", RowBox[{ FractionBox["1", "4"], "z", " ", "\[Mu]"}]}], "]"}], FractionBox["1", SqrtBox[ RowBox[{"2", "\[Pi]", " ", "z", " "}]]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ RowBox[{"z", "+", "\[Mu]", " "}], "2"]}], "]"}]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NIntegrate", "[", " ", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "2.0"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "100000"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["0.9999999999998167`"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{"z", " ", RowBox[{"f", "[", RowBox[{"z", ",", "2.0"}], "]"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "100000"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["2.99999999999853`"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"z", " ", RowBox[{"f", "[", RowBox[{"z", ",", "\[Mu]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"\[Mu]", ">", "0"}], ",", RowBox[{"\[Mu]", "\[Element]", "Reals"}]}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"1", "+", "\[Mu]"}]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Hypergeometric0F1", "[", RowBox[{ FractionBox["1", "2"], ",", RowBox[{ FractionBox["1", "4"], "z", " ", "\[Mu]"}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"Cosh", "[", SqrtBox[ RowBox[{"z", " ", "\[Mu]"}]], "]"}]], "Output"] }, Open ]], Cell[BoxData[ RowBox[{ FractionBox["1", "2"], RowBox[{"(", RowBox[{ RowBox[{"Exp", "[", SqrtBox[ RowBox[{"z", " ", "\[Mu]"}]], "]"}], "+", RowBox[{"Exp", "[", RowBox[{"-", SqrtBox[ RowBox[{"z", " ", "\[Mu]"}]]}], "]"}]}], ")"}], FractionBox["1", SqrtBox[ RowBox[{"2", "\[Pi]", " ", "z", " "}]]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ RowBox[{"z", "+", "\[Mu]", " "}], "2"]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Exp", "[", SqrtBox[ RowBox[{"z", " ", "\[Mu]"}]], "]"}], "+", RowBox[{"Exp", "[", RowBox[{"-", SqrtBox[ RowBox[{"z", " ", "\[Mu]"}]]}], "]"}]}], ")"}], FractionBox["1", RowBox[{"2", SqrtBox[ RowBox[{"2", "\[Pi]", " ", "z", " "}]]}]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ RowBox[{"z", "+", "\[Mu]", " "}], "2"]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ FractionBox["1", RowBox[{"2", SqrtBox[ RowBox[{"2", "\[Pi]", " ", "z", " "}]]}]], RowBox[{"Exp", "[", RowBox[{ SqrtBox[ RowBox[{"z", " ", "\[Mu]"}]], "-", FractionBox[ RowBox[{"z", "+", "\[Mu]", " "}], "2"]}], "]"}]}], "+", RowBox[{ FractionBox["1", RowBox[{"2", SqrtBox[ RowBox[{"2", "\[Pi]", " ", "z", " "}]]}]], RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", SqrtBox[ RowBox[{"z", " ", "\[Mu]"}]]}], "-", FractionBox[ RowBox[{"z", "+", "\[Mu]", " "}], "2"]}], "]"}]}]}]], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Bimodal Normal", "Subsection"], Cell[TextData[{ "Normal Distribution:\nhas two parameters: ", StyleBox["m", FontSlant->"Italic"], " is the location parameter, in this case the mean; ", StyleBox["\[Sigma]", FontSlant->"Italic"], " is the scale parameter, in this case the standard deviation\nprobability \ density function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", RowBox[{ RowBox[{"q", FractionBox["1", SqrtBox[ RowBox[{"2", " ", "\[Pi]", " ", SuperscriptBox["\[Sigma]1", "2"]}]]], RowBox[{"exp", "(", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m1"}], ")"}], "2"], RowBox[{"2", " ", SuperscriptBox["\[Sigma]1", "2"]}]]}], ")"}]}], "+", RowBox[{ RowBox[{"(", RowBox[{"1", "-", "q"}], ")"}], FractionBox["1", SqrtBox[ RowBox[{"2", " ", "\[Pi]", " ", SuperscriptBox["\[Sigma]2", "2"]}]]], RowBox[{"exp", "(", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m2"}], ")"}], "2"], RowBox[{"2", " ", SuperscriptBox["\[Sigma]2", "2"]}]]}], ")"}]}]}]}], TraditionalForm]]], "\nmean of each mode: ", StyleBox["m1,m2\n", FontSlant->"Italic"], "variance of each mode: ", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["\[Sigma]1", "2"], ",", SuperscriptBox["\[Sigma]2", "2"]}], TraditionalForm]]], StyleBox["\n", FontSlant->"Italic"], "note: plotting ", Cell[BoxData[ FormBox[ RowBox[{"f", "(", "z", ")"}], TraditionalForm]]], " will give you the familiar bell curve \n\nHere I extend that to a bimodal \ normal distribution." }], "Text"], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[{ RowBox[{"#", "assuming", " ", "equal", " ", "weighting", " ", "to", " ", "each", " ", "mode"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"dnorm", RowBox[{"(", RowBox[{"z", ",", "m1", ",", "s1"}], ")"}]}], "+", RowBox[{"dnorm", RowBox[{"(", RowBox[{"z", ",", "m2", ",", "s2"}], ")"}]}]}], ")"}], "/", "2"}]}], "Input"], Cell[BoxData[{ RowBox[{"#", " ", "weighting", " ", "c", " ", "for", " ", "modes"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "/", RowBox[{"(", RowBox[{"1", "+", RowBox[{"exp", RowBox[{"(", RowBox[{"-", "c"}], ")"}]}]}], ")"}]}], ")"}], "*", "dnorm", RowBox[{"(", RowBox[{"z", ",", "m1", ",", "s1"}], ")"}]}], "+", RowBox[{ RowBox[{"(", RowBox[{"1", "/", RowBox[{"(", RowBox[{"1", "+", RowBox[{"exp", RowBox[{"(", "c", ")"}]}]}], ")"}]}], ")"}], "dnorm", RowBox[{"(", RowBox[{"z", ",", "m2", ",", "s2"}], ")"}]}]}]}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{ "z_", ",", "m1_", ",", "\[Sigma]1_", ",", "m2_", ",", "\[Sigma]2_"}], "]"}], ":=", RowBox[{ RowBox[{ FractionBox["1", RowBox[{"2", SqrtBox[ RowBox[{"2", "\[Pi]", " ", SuperscriptBox["\[Sigma]1", "2"]}]]}]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m1"}], ")"}], "2"], RowBox[{"2", SuperscriptBox["\[Sigma]1", "2"]}]]}], "]"}]}], "+", RowBox[{ FractionBox["1", RowBox[{"2", SqrtBox[ RowBox[{"2", "\[Pi]", " ", SuperscriptBox["\[Sigma]2", "2"]}]]}]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m2"}], ")"}], "2"], RowBox[{"2", SuperscriptBox["\[Sigma]2", "2"]}]]}], "]"}]}]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "5", ",", "1", ",", "2", ",", "0.7`"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "8"}], "}"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.119048 0.0147151 2.04939 [ [.2619 .00222 -3 -9 ] [.2619 .00222 3 0 ] [.5 .00222 -3 -9 ] [.5 .00222 3 0 ] [.7381 .00222 -3 -9 ] [.7381 .00222 3 0 ] [.97619 .00222 -3 -9 ] [.97619 .00222 3 0 ] [.01131 .11718 -24 -4.5 ] [.01131 .11718 0 4.5 ] [.01131 .21965 -18 -4.5 ] [.01131 .21965 0 4.5 ] [.01131 .32212 -24 -4.5 ] [.01131 .32212 0 4.5 ] [.01131 .42459 -18 -4.5 ] [.01131 .42459 0 4.5 ] [.01131 .52706 -24 -4.5 ] [.01131 .52706 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .2619 .01472 m .2619 .02097 L s [(2)] .2619 .00222 0 1 Mshowa .5 .01472 m .5 .02097 L s [(4)] .5 .00222 0 1 Mshowa .7381 .01472 m .7381 .02097 L s [(6)] .7381 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(8)] .97619 .00222 0 1 Mshowa .125 Mabswid .08333 .01472 m .08333 .01847 L s .14286 .01472 m .14286 .01847 L s .20238 .01472 m .20238 .01847 L s .32143 .01472 m .32143 .01847 L s .38095 .01472 m .38095 .01847 L s .44048 .01472 m .44048 .01847 L s .55952 .01472 m .55952 .01847 L s .61905 .01472 m .61905 .01847 L s .67857 .01472 m .67857 .01847 L s .79762 .01472 m .79762 .01847 L s .85714 .01472 m .85714 .01847 L s .91667 .01472 m .91667 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .11718 m .03006 .11718 L s [(0.05)] .01131 .11718 1 0 Mshowa .02381 .21965 m .03006 .21965 L s [(0.1)] .01131 .21965 1 0 Mshowa .02381 .32212 m .03006 .32212 L s [(0.15)] .01131 .32212 1 0 Mshowa .02381 .42459 m .03006 .42459 L s [(0.2)] .01131 .42459 1 0 Mshowa .02381 .52706 m .03006 .52706 L s [(0.25)] .01131 .52706 1 0 Mshowa .125 Mabswid .02381 .03521 m .02756 .03521 L s .02381 .0557 m .02756 .0557 L s .02381 .0762 m .02756 .0762 L s .02381 .09669 m .02756 .09669 L s .02381 .13768 m .02756 .13768 L s .02381 .15817 m .02756 .15817 L s .02381 .17867 m .02756 .17867 L s .02381 .19916 m .02756 .19916 L s .02381 .24015 m .02756 .24015 L s .02381 .26064 m .02756 .26064 L s .02381 .28114 m .02756 .28114 L s .02381 .30163 m .02756 .30163 L s .02381 .34262 m .02756 .34262 L s .02381 .36311 m .02756 .36311 L s .02381 .38361 m .02756 .38361 L s .02381 .4041 m .02756 .4041 L s .02381 .44509 m .02756 .44509 L s .02381 .46558 m .02756 .46558 L s .02381 .48607 m .02756 .48607 L s .02381 .50657 m .02756 .50657 L s .02381 .54756 m .02756 .54756 L s .02381 .56805 m .02756 .56805 L s .02381 .58854 m .02756 .58854 L s .02381 .60904 m .02756 .60904 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .02457 m .03279 .02805 L .04262 .03303 L .05288 .03985 L .06244 .04802 L .0828 .07272 L .09421 .09183 L .10458 .11303 L .12373 .16248 L .14451 .23136 L .18538 .39832 L .20569 .48086 L .21563 .51659 L .22473 .54508 L .23344 .56777 L .24295 .58658 L .24817 .59402 L .25071 .59687 L .25301 .59901 L .25539 .60077 L .25763 .60201 L .25887 .60252 L .26 .60288 L .26125 .60315 L .26256 .60331 L .26378 .60332 L .26447 .60327 L .26511 .6032 L .26628 .60297 L .26752 .60261 L .26863 .60218 L .26967 .60169 L .27204 .60024 L .27459 .5982 L .27693 .59587 L .2822 .58911 L .29113 .57308 L .30053 .55062 L .33864 .42241 L .35989 .34548 L .3792 .28529 L .38884 .26079 L .39929 .23916 L .40408 .23103 L .40915 .22369 L .41382 .21808 L .41825 .21376 L .42061 .21185 L .42318 .21009 L .42554 .20874 L Mistroke .42768 .20776 L .43023 .20686 L .43163 .2065 L .43295 .20624 L .43417 .20606 L .43529 .20596 L .43652 .20592 L .43782 .20594 L .43897 .20603 L .44001 .20615 L .44121 .20635 L .44234 .20659 L .44436 .20716 L .44656 .20796 L .45154 .21047 L .45614 .2136 L .46579 .22249 L .47484 .23331 L .49545 .2647 L .53419 .33461 L .55388 .36789 L .56428 .38327 L .57539 .39741 L .58617 .40851 L .59595 .41608 L .60068 .41882 L .60316 .42002 L .60579 .4211 L .60809 .42189 L .61062 .42258 L .61173 .42282 L .61292 .42305 L .61402 .42322 L .61506 .42335 L .61628 .42347 L .61692 .42351 L .61762 .42354 L .61831 .42356 L .61904 .42357 L .62034 .42354 L .62154 .42347 L .62267 .42337 L .6239 .42322 L .62522 .423 L .6282 .42234 L .63101 .42148 L .63628 .41927 L .64129 .41645 L .64592 .41324 L .65639 .40389 L Mistroke .67513 .38057 L .69576 .34687 L .73607 .26688 L .77486 .1883 L .81611 .11859 L .83671 .09155 L .85583 .07127 L .87433 .05573 L .89405 .04308 L .90434 .03786 L .91547 .03313 L .92509 .02973 L .93565 .02662 L .95537 .02227 L .96614 .02054 L .97619 .01926 L Mfstroke % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJzNm9tvVUUUxk/PpdUqooIoinJQ7vdbubS1pQItVusFUQEvyQmawIPRIH+T RqOhRVBACkgwGmNMjDEmxhcTn3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pLAU4DtaiLQoo2rAdsJ2Hj7UmsA21GM1FrAtgEW u4x49pjEEkkuOWdkEo3VOptJyilZ7LHW5uFzeWVgI4xmFw35esC2APZ8gMXz a9D5WtLLoVOyOPuyRzy0/zYAtgmwidbsC+hTspRW3EabpfbDUxrS7YGi1I1x MIxbRKjU5sAZlZaSltI2RguZpiJtAi/a2kJSWwGjLTBDilpFtIRR3ZdsUtRZ NGrUIwVJ0eJ5uX0pWn/keBz15x3NHZrErQgEzB1amvSeI+/ylfal6C1PTvmx jpCisaJNlhxU4nvVnwy0U9FGSU45xZ2v2dpCUhRCULj+ejFSdAhxXJeiDiSM gkG6xTJKUUspmqZrzRPtS1FATvf1J/15R6MRKkBnhm/obSEpWsL0ORZ9RvKm TYr282HXD3TS+1YsoF5MVB3WovyI4yOn8O1YXjnqpu+hyLkNtUUO2BJ/T1KN TAvoIiHpIdqI6WUvx0YS/7yTqRZ6tE+7Mr35zwf0btA3IkbB0DsCIy2tAqKg 6HYyRSH2kBdCHsekrk3DnwNFHbCpQimoL8glyplCxoHcTTpYv2DTNlKQFeQ+ GSnoDu6LfCmkEynAMWoTBV2VX+x0Coo16YLkUr4UMg4Ukhm1iYLcxC9zo1AP EpNPw9Ud3CiV+RkdvfeC3k75GEGv+uzPF+n8TP/WLb+zPAqW7bptfrtoNMJ+ /EYCFFlc1hcCDRBdnOdMIY2jYwaKVq7o2kRB8UixFHSyQKHK1XwppBPpnol+ LPC1rk2nFUYKsoK+5TFS0MK/plPQqQjtWUYK2nun/XGgAwX63mta1yYK2tyu N6FQd8UbekW59JZv827phZIf1932my8FqnpVeQb+TE7S8NvLUte/9E3RtA== \ \>"], ImageRangeCache->{{{79.5625, 308.938}, {482.188, 340.875}} -> {-4.00763, \ 0.756143, 0.031612, 0.00183632}}] }, Open ]], Cell["Show that pdf integrates to 1", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "5", ",", "1", ",", "2", ",", "0.7"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", RowBox[{"-", "\[Infinity]"}], ",", "\[Infinity]"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["0.9999999999999993`"], "Output"] }, Open ]], Cell["Therefore the support function is", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"bimodal", " ", "normal", " ", "distribution"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sf", "[", RowBox[{ "z_", ",", "m1_", ",", "\[Sigma]1_", ",", "m2_", ",", "\[Sigma]2_"}], "]"}], ":=", RowBox[{ RowBox[{"Log", "[", RowBox[{"2", SqrtBox[ RowBox[{"2", " ", "\[Pi]", " "}]]}], "]"}], "-", RowBox[{"Log", "[", RowBox[{ RowBox[{ FractionBox["1", SqrtBox[ RowBox[{" ", SuperscriptBox["\[Sigma]1", "2"]}]]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m1"}], ")"}], "2"], RowBox[{"2", SuperscriptBox["\[Sigma]1", "2"]}]]}], "]"}]}], "+", RowBox[{ FractionBox["1", SqrtBox[ SuperscriptBox["\[Sigma]2", "2"]]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m2"}], ")"}], "2"], RowBox[{"2", SuperscriptBox["\[Sigma]2", "2"]}]]}], "]"}]}]}], "]"}]}]}], ";"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"bimodalRandom", "[", RowBox[{"m1_", ",", "\[Sigma]1_", ",", "m2_", ",", "\[Sigma]2_"}], "]"}], ":=", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{"indef", ",", "x"}], "}"}], ",", RowBox[{ RowBox[{ RowBox[{"indef", "[", "x_Real", "]"}], ":=", RowBox[{"NIntegrate", "[", RowBox[{ RowBox[{"bimodalPDF", "[", RowBox[{ "z", ",", "m1", ",", "\[Sigma]1", ",", "m2", ",", "\[Sigma]2"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", RowBox[{"-", "\[Infinity]"}], ",", "x"}], "}"}]}], "]"}]}], ";", RowBox[{"x", "/.", "\[InvisibleSpace]", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{ RowBox[{"RandomReal", "[", "]"}], "\[Equal]", RowBox[{"indef", "[", "x", "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ FractionBox["1", "2"], " ", RowBox[{"(", RowBox[{"m1", "+", "m2"}], ")"}], " ", "0.5`"}], ",", RowBox[{ FractionBox["1", "2"], " ", RowBox[{"(", RowBox[{"m1", "+", "m2"}], ")"}], " ", "1.`"}]}], "}"}]}], "]"}]}]}]}], "]"}]}]], "Input"], Cell[TextData[{ "Perhaps I should not assume an equal distribution of each mode, in which \ case I add the parameter ", StyleBox["c", FontSlant->"Italic"], " which is between [0,1] and gives the percent of each mode in generating \ the overall distribution" }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{ "z_", ",", "m1_", ",", "\[Sigma]1_", ",", "m2_", ",", "\[Sigma]2_", ",", "c_"}], "]"}], ":=", RowBox[{ RowBox[{ FractionBox["c", SqrtBox[ RowBox[{"2", "\[Pi]", " ", SuperscriptBox["\[Sigma]1", "2"]}]]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m1"}], ")"}], "2"], RowBox[{"2", SuperscriptBox["\[Sigma]1", "2"]}]]}], "]"}]}], "+", RowBox[{ FractionBox[ RowBox[{"1", "-", "c"}], SqrtBox[ RowBox[{"2", "\[Pi]", " ", SuperscriptBox["\[Sigma]2", "2"]}]]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m2"}], ")"}], "2"], RowBox[{"2", SuperscriptBox["\[Sigma]2", "2"]}]]}], "]"}]}]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "5", ",", "1", ",", "2", ",", "0.7`", ",", "0.3`"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "8"}], "}"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.119048 0.0147151 1.47047 [ [.2619 .00222 -3 -9 ] [.2619 .00222 3 0 ] [.5 .00222 -3 -9 ] [.5 .00222 3 0 ] [.7381 .00222 -3 -9 ] [.7381 .00222 3 0 ] [.97619 .00222 -3 -9 ] [.97619 .00222 3 0 ] [.01131 .16176 -18 -4.5 ] [.01131 .16176 0 4.5 ] [.01131 .30881 -18 -4.5 ] [.01131 .30881 0 4.5 ] [.01131 .45586 -18 -4.5 ] [.01131 .45586 0 4.5 ] [.01131 .6029 -18 -4.5 ] [.01131 .6029 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .2619 .01472 m .2619 .02097 L s [(2)] .2619 .00222 0 1 Mshowa .5 .01472 m .5 .02097 L s [(4)] .5 .00222 0 1 Mshowa .7381 .01472 m .7381 .02097 L s [(6)] .7381 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(8)] .97619 .00222 0 1 Mshowa .125 Mabswid .08333 .01472 m .08333 .01847 L s .14286 .01472 m .14286 .01847 L s .20238 .01472 m .20238 .01847 L s .32143 .01472 m .32143 .01847 L s .38095 .01472 m .38095 .01847 L s .44048 .01472 m .44048 .01847 L s .55952 .01472 m .55952 .01847 L s .61905 .01472 m .61905 .01847 L s .67857 .01472 m .67857 .01847 L s .79762 .01472 m .79762 .01847 L s .85714 .01472 m .85714 .01847 L s .91667 .01472 m .91667 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .16176 m .03006 .16176 L s [(0.1)] .01131 .16176 1 0 Mshowa .02381 .30881 m .03006 .30881 L s [(0.2)] .01131 .30881 1 0 Mshowa .02381 .45586 m .03006 .45586 L s [(0.3)] .01131 .45586 1 0 Mshowa .02381 .6029 m .03006 .6029 L s [(0.4)] .01131 .6029 1 0 Mshowa .125 Mabswid .02381 .04412 m .02756 .04412 L s .02381 .07353 m .02756 .07353 L s .02381 .10294 m .02756 .10294 L s .02381 .13235 m .02756 .13235 L s .02381 .19117 m .02756 .19117 L s .02381 .22058 m .02756 .22058 L s .02381 .24999 m .02756 .24999 L s .02381 .2794 m .02756 .2794 L s .02381 .33822 m .02756 .33822 L s .02381 .36763 m .02756 .36763 L s .02381 .39704 m .02756 .39704 L s .02381 .42645 m .02756 .42645 L s .02381 .48527 m .02756 .48527 L s .02381 .51468 m .02756 .51468 L s .02381 .54409 m .02756 .54409 L s .02381 .5735 m .02756 .5735 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .02462 m .03279 .02811 L .04262 .03311 L .05288 .03996 L .06244 .04816 L .0828 .07298 L .09421 .09217 L .10458 .11345 L .12373 .16311 L .14451 .23226 L .18538 .39975 L .20569 .48241 L .21563 .51811 L .22473 .54651 L .23344 .56904 L .24295 .58757 L .24817 .59481 L .25071 .59754 L .25301 .59957 L .25539 .60121 L .25763 .60233 L .25887 .60277 L .26 .60306 L .26125 .60325 L .26256 .60332 L .26378 .60325 L .26447 .60316 L .26511 .60303 L .26628 .60272 L .26752 .60227 L .26967 .60118 L .27204 .59954 L .27456 .5973 L .27728 .59431 L .2822 .58742 L .29176 .56889 L .30053 .5465 L .34016 .40351 L .37827 .25878 L .39788 .20102 L .40878 .17582 L .41883 .15712 L .42907 .14242 L .43436 .13647 L .44017 .13115 L .44523 .1275 L .44996 .12487 L .45496 .12287 L .45776 .12207 L .45908 .12177 L Mistroke .46033 .12153 L .46153 .12134 L .46283 .12118 L .46402 .12107 L .46511 .121 L .46629 .12096 L .46758 .12095 L .46824 .12096 L .46894 .12099 L .4702 .12106 L .47138 .12116 L .47266 .12131 L .47499 .12166 L .47725 .12211 L .47935 .12261 L .48413 .12407 L .48941 .12611 L .50009 .13141 L .54034 .15836 L .55886 .17061 L .56934 .17666 L .57908 .18148 L .5888 .18538 L .59377 .18699 L .59916 .18843 L .60213 .18908 L .60486 .18958 L .60742 .18998 L .61023 .19032 L .61145 .19044 L .61275 .19054 L .61388 .19062 L .61511 .19068 L .61583 .19071 L .6165 .19073 L .61781 .19076 L .619 .19077 L .62027 .19075 L .62141 .19072 L .62265 .19067 L .62394 .1906 L .62515 .19052 L .62731 .19032 L .62963 .19005 L .63491 .18918 L .63972 .18809 L .64911 .18519 L .65799 .18154 L .67798 .17041 L .69643 .1572 L Mistroke .7358 .12352 L .77365 .09044 L .81396 .06078 L .83251 .04998 L .85275 .04034 L .8739 .03251 L .89399 .02694 L .91368 .02295 L .92469 .02123 L .93466 .01995 L .95392 .01808 L .96477 .01731 L .97475 .01674 L .97619 .01667 L Mfstroke % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJzlm/tzE1UUx7dNHwnFKg9RUWmUIoJWRRCKFQvV8rAp5V0YgTFWNBURLB3H 8Sf/Pt+iiIJUEItSEVFkdBhnavcmPUk2nxP2JruZbclMt3e+557Pubt7dnNf 6U+PZo4cS48OD6WTW0bSJzLDQyeTm4+PTEmxOsepyziOM5Z03PLkVDF3yDiT k5ONbnHALcXcUn9xqcEtxd2S45jqjqlvStN/7meHKcWKbH1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96crMQxgNjBI6ij 3wva6VmG8Iy2zQjC9LaawOdJ0F4C7dtpdqmpvjiUsvwdUnBauKJRUQChaJWr SR4bCtAD2hk9gN8BZgdom+xC0VoZ1QsgVNwyKaxDTn3mym2ge0/EjaBlp9Lx EXwKtO7ZgqC5x+91BE0c0OxiIcJYKnEMILYPxAugndURNIPVNVsQz4N2TkfQ ZOL6SCA6QfvBm5OVOHpMz4K2LhIImg4/HypiNWg0A157xBrQxkJFUHXCFiKM pRJHH7Hp9v4YdQTdeXprXbgDEPQs0vf5xWARxhJSbOqa/aQj6J1IHe8ZiaBh 3iUdQd9SNGrOIWgN1lSkHrM1u9RU+aiQgtOEyM96cL/DmzBDGYm6MTTRVSbA HLmQdKcCCOD3YlEomsAc10PZjgWtQzq3GwtS75bmocf1B48QNK1/OeoIGizQ Co0lglarfilAGEsljh4TDdpoyc8SQSutv4aKoAFsMhKINtCu6AiaSKAdM7VH 0H6pCW9OdkMl2pU2oceOBmIjaFTvt5mIoB2sV3UETR3SFsLoIYyFppBps+Xv euxoIGiynXa3XwsVQRtF6bcFf4SKoMUb+lnG9cghjIU29tIesT/12AEgaDWQ urJ/hYrYChotFN0IFUFrw/QzsL+zCM9YsFnuLK020Y5x6lkLu9SUHwtSo8iD gtIA4aYe1O+wpk8a1yClf3WsOYMmuVjGmP/V8S3dMZFrQaHm8LDHHFM1QXkT zR/HyW0KrfdTnRK20O7U/Q/dSeDG\ \>"], ImageRangeCache->{{{0, 359}, {221.375, 0}} -> {-0.660353, -0.0310372, \ 0.0308509, 0.00249766}}] }, Open ]], Cell["Show that pdf integrates to 1", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "5", ",", "1", ",", "2", ",", "0.7", ",", "0.3"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", RowBox[{"-", "\[Infinity]"}], ",", "\[Infinity]"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["0.9999999999999989`"], "Output"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"bimodal", " ", "normal", " ", "distribution"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sf", "[", RowBox[{ "z_", ",", "m1_", ",", "\[Sigma]1_", ",", "m2_", ",", "\[Sigma]2_", ",", "c_"}], "]"}], ":=", RowBox[{ RowBox[{"Log", "[", SqrtBox[ RowBox[{"2", " ", "\[Pi]", " "}]], "]"}], "-", RowBox[{"Log", "[", RowBox[{ RowBox[{ FractionBox["c", SqrtBox[ RowBox[{" ", SuperscriptBox["\[Sigma]1", "2"]}]]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m1"}], ")"}], "2"], RowBox[{"2", SuperscriptBox["\[Sigma]1", "2"]}]]}], "]"}]}], "+", RowBox[{ FractionBox[ RowBox[{"1", "-", "c"}], SqrtBox[ SuperscriptBox["\[Sigma]2", "2"]]], RowBox[{"Exp", "[", RowBox[{"-", FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", "m2"}], ")"}], "2"], RowBox[{"2", SuperscriptBox["\[Sigma]2", "2"]}]]}], "]"}]}]}], "]"}]}]}], ";"}]}]], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Beta", "Subsection"], Cell[TextData[{ "Beta Distribution:\nThis distribution is good for modeling fractions \ because it is constrained to the domain between 0 and 1. It has two \ parameters: both ", StyleBox["p", FontSlant->"Italic"], " and ", StyleBox["q", FontSlant->"Italic"], " are shape parameters with ", StyleBox["p", FontSlant->"Italic"], ">0 and ", StyleBox["q", FontSlant->"Italic"], ">0, but ", StyleBox["z", FontSlant->"Italic"], " is restrict to the range (0,1)\n\nprobability density function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", FractionBox[ SuperscriptBox[ RowBox[{ SuperscriptBox["z", RowBox[{"p", "-", "1"}]], "(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"q", "-", "1"}]], RowBox[{"B", "(", RowBox[{"p", ",", "q"}], ")"}]]}], TraditionalForm]]], ", ", StyleBox["B", FontSlant->"Italic"], " is the beta function, ", StyleBox["B(p,q)", FontSlant->"Italic"], " = ", Cell[BoxData[ FormBox[ RowBox[{ SubsuperscriptBox["\[Integral]", "0", "1"], RowBox[{ SuperscriptBox[ RowBox[{ SuperscriptBox["u", RowBox[{"p", "-", "1"}]], "(", RowBox[{"1", "-", "u"}], ")"}], RowBox[{"q", "-", "1"}]], RowBox[{"\[DifferentialD]", "u"}]}]}], TraditionalForm]]], ")\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", FractionBox[ SuperscriptBox[ RowBox[{ SuperscriptBox["z", RowBox[{"p", "-", "1"}]], "(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"q", "-", "1"}]], RowBox[{ SubsuperscriptBox["\[Integral]", "0", "1"], RowBox[{ SuperscriptBox[ RowBox[{ SuperscriptBox["u", RowBox[{"p", "-", "1"}]], "(", RowBox[{"1", "-", "u"}], ")"}], RowBox[{"q", "-", "1"}]], RowBox[{"\[DifferentialD]", "u"}]}]}]]}], TraditionalForm]]], "\nmean: ", Cell[BoxData[ FormBox[ FractionBox["p", RowBox[{"p", "+", "q"}]], TraditionalForm]]], StyleBox["\n", FontSlant->"Italic"], "variance: ", Cell[BoxData[ FormBox[ FractionBox[ RowBox[{"p", " ", "q"}], RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"p", "+", "q"}], ")"}], "2"], RowBox[{"(", RowBox[{"p", "+", "q", "+", "1"}], ")"}]}]], TraditionalForm]]] }], "Text"], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[ RowBox[{"dbeta", RowBox[{"(", RowBox[{"z", ",", RowBox[{"shape1", " ", "=", " ", "p"}], ",", " ", RowBox[{"shape2", " ", "=", " ", "q"}]}], ")"}]}]], "Input"], Cell[BoxData[{ RowBox[{"#", " ", "random", " ", "number", " ", "generation"}], "\[IndentingNewLine]", RowBox[{"rbeta", RowBox[{"(", RowBox[{"1", ",", RowBox[{"shape1", " ", "=", " ", "p"}], ",", " ", RowBox[{"shape2", " ", "=", " ", "q"}]}], ")"}]}]}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "p_", ",", "q_"}], "]"}], ":=", FractionBox[ RowBox[{ SuperscriptBox["z", RowBox[{"p", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"q", "-", "1"}]]}], RowBox[{"Beta", "[", RowBox[{"p", ",", "q"}], "]"}]]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "2.2`", ",", "3.6`"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "1"}], "}"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.952381 0.0147151 0.301139 [ [.21429 .00222 -9 -9 ] [.21429 .00222 9 0 ] [.40476 .00222 -9 -9 ] [.40476 .00222 9 0 ] [.59524 .00222 -9 -9 ] [.59524 .00222 9 0 ] [.78571 .00222 -9 -9 ] [.78571 .00222 9 0 ] [.97619 .00222 -3 -9 ] [.97619 .00222 3 0 ] [.01131 .16528 -18 -4.5 ] [.01131 .16528 0 4.5 ] [.01131 .31585 -6 -4.5 ] [.01131 .31585 0 4.5 ] [.01131 .46642 -18 -4.5 ] [.01131 .46642 0 4.5 ] [.01131 .61699 -6 -4.5 ] [.01131 .61699 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .21429 .01472 m .21429 .02097 L s [(0.2)] .21429 .00222 0 1 Mshowa .40476 .01472 m .40476 .02097 L s [(0.4)] .40476 .00222 0 1 Mshowa .59524 .01472 m .59524 .02097 L s [(0.6)] .59524 .00222 0 1 Mshowa .78571 .01472 m .78571 .02097 L s [(0.8)] .78571 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(1)] .97619 .00222 0 1 Mshowa .125 Mabswid .07143 .01472 m .07143 .01847 L s .11905 .01472 m .11905 .01847 L s .16667 .01472 m .16667 .01847 L s .2619 .01472 m .2619 .01847 L s .30952 .01472 m .30952 .01847 L s .35714 .01472 m .35714 .01847 L s .45238 .01472 m .45238 .01847 L s .5 .01472 m .5 .01847 L s .54762 .01472 m .54762 .01847 L s .64286 .01472 m .64286 .01847 L s .69048 .01472 m .69048 .01847 L s .7381 .01472 m .7381 .01847 L s .83333 .01472 m .83333 .01847 L s .88095 .01472 m .88095 .01847 L s .92857 .01472 m .92857 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .16528 m .03006 .16528 L s [(0.5)] .01131 .16528 1 0 Mshowa .02381 .31585 m .03006 .31585 L s [(1)] .01131 .31585 1 0 Mshowa .02381 .46642 m .03006 .46642 L s [(1.5)] .01131 .46642 1 0 Mshowa .02381 .61699 m .03006 .61699 L s [(2)] .01131 .61699 1 0 Mshowa .125 Mabswid .02381 .04483 m .02756 .04483 L s .02381 .07494 m .02756 .07494 L s .02381 .10506 m .02756 .10506 L s .02381 .13517 m .02756 .13517 L s .02381 .1954 m .02756 .1954 L s .02381 .22551 m .02756 .22551 L s .02381 .25563 m .02756 .25563 L s .02381 .28574 m .02756 .28574 L s .02381 .34597 m .02756 .34597 L s .02381 .37608 m .02756 .37608 L s .02381 .4062 m .02756 .4062 L s .02381 .43631 m .02756 .43631 L s .02381 .49654 m .02756 .49654 L s .02381 .52665 m .02756 .52665 L s .02381 .55677 m .02756 .55677 L s .02381 .58688 m .02756 .58688 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .01472 m .06244 .13552 L .10458 .2736 L .14415 .38492 L .18221 .47052 L .20342 .50868 L .22272 .53751 L .24299 .56188 L .26171 .57916 L .28086 .59187 L .29094 .59662 L .29653 .59869 L .30164 .60024 L .30614 .60134 L .31105 .60226 L .31374 .60264 L .31624 .60292 L .31863 .60312 L .31996 .6032 L .32117 .60325 L .32232 .60329 L .32353 .60331 L .32457 .60332 L .3257 .60331 L .32692 .60329 L .32823 .60324 L .32947 .60318 L .3306 .60311 L .33278 .60294 L .33516 .60269 L .33947 .60207 L .34432 .60114 L .34887 .60004 L .35925 .59674 L .36936 .59249 L .38026 .58683 L .4003 .57365 L .4214 .55626 L .45951 .51703 L .50007 .46663 L .53911 .41237 L .58061 .3514 L .62059 .29208 L .65906 .2367 L .69998 .18178 L .73938 .13455 L .77727 .09574 L .81761 .06257 L .85643 .03913 L .8776 .02989 L Mistroke .88734 .02645 L .89771 .02334 L .90812 .02076 L .91755 .01887 L .92703 .01737 L .93595 .01631 L .94062 .01588 L .94574 .0155 L .95109 .01519 L .95365 .01508 L .95607 .01499 L .95831 .01491 L .96074 .01485 L .96277 .01481 L .965 .01477 L .96741 .01475 L .96873 .01474 L .96996 .01473 L .97112 .01472 L .97218 .01472 L .97334 .01472 L .97455 .01472 L .9754 .01472 L .97619 .01472 L Mfstroke % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJzNmvtvFFUUgKfdLtYCykMU64MtxSoPRVFU0GKhQHkVBBEEEVzLo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URaW8GtgHYi0W0Cl0rmcFuAbYe2NLo 2nXAlnnanvo0oeU2ydYCWy6XC7E10RWrgb1kp1gFbIWsuBXYq8BacxRqx1Ze xUCjixTtwF62U6wE1har4jZx0qQNrWgV909citvF+stnr5jVcIdY+1QhmJsU y6IrlgJ7LVbFncBagK2yUzQDWy0r+gFbEl2xGNgasxqqIGghsLVy7lQ8iiZg 62QFbUga2PpYFf2BLQD2up1iPrANsqIa2DxgG81qGHAVA40uUswFtslOMQfY 5lgVdwGbDWyLnWIWMG8N7T2qUyvVUn1Egh/j1gCbCcxb5+MvBN5j91DPcK9B Nnry6D/AvRt6ZwDbKicoD9xflGA6sG1FEhiMdtY9wKYB8+4gQz+6Je1UYG/L VTkQWGN0xRRg22XFIGCTgO2QFfS6zwRg7+QoxJeeGoDtlHOTYhywXbEq7gVW D2y3rLgP2Ghge+wUdcD2ygp6aWUUsH12ilpg+81qoJdtHgN2QM5NihHADtop HgV2SFYMA/aIneJBYMOBHZYVD4XUHrFT0MYdlRU0aXpb6phZDbTDqMCPy7lJ 4b8veEIeSMebLrUBCqq6Gp37lDxwJDBaRQUo6KSh1expWfE4sH56+mflgbU6 iG7IcgeqoDrdqtStc7KdLoh99MDz8sAxOqi3bl2Qw/23VNXPYWpVdlEOV69h dHfJZTlIfWZfDO2hrbS2KIg0+mlFlTuGfixQeRTKjaRnieqzW272gkVpxtte P1mppt6PZ3lv4Tol/wIY5Vvy\ \>"], ImageRangeCache->{{{0, 287}, {176.938, 0}} -> {-0.0963783, -0.153922, \ 0.00394961, 0.012491}}] }, Open ]], Cell["Therefore the support function is", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"beta", " ", "distribution"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sf", "[", RowBox[{"z_", ",", "p_", ",", "q_"}], "]"}], ":=", RowBox[{ RowBox[{"Log", "[", RowBox[{"Beta", "[", RowBox[{"p", ",", "q"}], "]"}], "]"}], "-", RowBox[{ RowBox[{"(", RowBox[{"p", "-", "1"}], ")"}], RowBox[{"Log", "[", "z", "]"}]}], "-", RowBox[{ RowBox[{"(", RowBox[{"q", "-", "1"}], ")"}], RowBox[{"Log", "[", RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], "]"}]}]}]}]}]], "Input"], Cell[TextData[{ "The Beta distribution can be transformed to be in terms of a mean parameter \ and variance parameter instead of ", StyleBox["p", FontSlant->"Italic"], " and ", StyleBox["q", FontSlant->"Italic"], ". This can be more useful because one is often interested in modeling the \ mean." }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"substiution", "=", RowBox[{"{", RowBox[{ RowBox[{"q", "\[Rule]", RowBox[{ FractionBox[ RowBox[{"\[Mu]", " "}], SuperscriptBox["\[Sigma]", "2"]], RowBox[{"(", RowBox[{ RowBox[{"\[Mu]", RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}]}], "-", SuperscriptBox["\[Sigma]", "2"]}], ")"}], FractionBox[ RowBox[{"1", "-", "\[Mu]", " "}], "\[Mu]"]}]}], ",", RowBox[{"p", "->", RowBox[{ FractionBox[ RowBox[{"\[Mu]", " "}], SuperscriptBox["\[Sigma]", "2"]], RowBox[{"(", RowBox[{ RowBox[{"\[Mu]", RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}]}], "-", SuperscriptBox["\[Sigma]", "2"]}], ")"}]}]}]}], "}"}]}], ";"}]], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "\[Mu]_", ",", "\[Sigma]_"}], "]"}], ":=", FractionBox[ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{ RowBox[{"-", "1"}], "+", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}], " ", "\[Mu]"}], "-", SuperscriptBox["\[Sigma]", "2"]}], ")"}]}], SuperscriptBox["\[Sigma]", "2"]]}]], " ", SuperscriptBox["z", RowBox[{ RowBox[{"-", "1"}], "+", FractionBox[ RowBox[{"\[Mu]", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}], " ", "\[Mu]"}], "-", SuperscriptBox["\[Sigma]", "2"]}], ")"}]}], SuperscriptBox["\[Sigma]", "2"]]}]]}], RowBox[{"Beta", "[", RowBox[{ FractionBox[ RowBox[{"\[Mu]", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}], " ", "\[Mu]"}], "-", SuperscriptBox["\[Sigma]", "2"]}], ")"}]}], SuperscriptBox["\[Sigma]", "2"]], ",", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", "\[Mu]"}], ")"}], " ", "\[Mu]"}], "-", SuperscriptBox["\[Sigma]", "2"]}], ")"}]}], SuperscriptBox["\[Sigma]", "2"]]}], "]"}]]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sf", "[", RowBox[{"z_", ",", "\[Mu]_", ",", "\[Sigma]_"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "-", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "\[Mu]"}], ")"}], " ", RowBox[{"(", RowBox[{ RowBox[{"-", "\[Mu]"}], "+", SuperscriptBox["\[Mu]", "2"], "+", SuperscriptBox["\[Sigma]", "2"]}], ")"}]}], SuperscriptBox["\[Sigma]", "2"]]}], ")"}], RowBox[{"Log", "[", RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], "]"}]}], "+", RowBox[{ RowBox[{"(", FractionBox[ RowBox[{ RowBox[{"-", SuperscriptBox["\[Mu]", "2"]}], "+", SuperscriptBox["\[Mu]", "3"], "+", SuperscriptBox["\[Sigma]", "2"], "+", RowBox[{"\[Mu]", " ", SuperscriptBox["\[Sigma]", "2"]}]}], SuperscriptBox["\[Sigma]", "2"]], ")"}], RowBox[{"Log", "[", " ", "z", "]"}]}], "+", RowBox[{"Log", "[", RowBox[{"Beta", "[", RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"\[Mu]", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "\[Mu]"}], "+", SuperscriptBox["\[Mu]", "2"], "+", SuperscriptBox["\[Sigma]", "2"]}], ")"}]}], SuperscriptBox["\[Sigma]", "2"]]}], ",", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "\[Mu]"}], ")"}], " ", RowBox[{"(", RowBox[{ RowBox[{"-", "\[Mu]"}], "+", SuperscriptBox["\[Mu]", "2"], "+", SuperscriptBox["\[Sigma]", "2"]}], ")"}]}], SuperscriptBox["\[Sigma]", "2"]]}], "]"}], "]"}]}]}], " ", ";"}]}], "Input"], Cell[TextData[{ "where \[Mu] \[Element] [0,1]\nand ", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["\[Sigma]", "2"], "<", RowBox[{"\[Mu]", "(", RowBox[{"1", "-", "\[Mu]"}], ")"}]}], TraditionalForm]]], "\n\nmean: ", Cell[BoxData[ FormBox["\[Mu]", TraditionalForm]]], StyleBox["\n", FontSlant->"Italic"], "variance: ", Cell[BoxData[ FormBox[ SuperscriptBox["\[Sigma]", "2"], TraditionalForm]]] }], "Text"], Cell[TextData[{ "The Beta distribution can be transformed to be in terms of a mean parameter \ and dispersion parameter, ", StyleBox["p = s(1-m)", FontSlant->"Italic"], " and ", StyleBox["q =s m", FontSlant->"Italic"], ". This just scales ", StyleBox["p", FontSlant->"Italic"], " and ", StyleBox["q", FontSlant->"Italic"], " without the specific constraints on the variance version. Here ", StyleBox["m", FontSlant->"Italic"], " \[Element] (0,1), ", StyleBox["s", FontSlant->"Italic"], " \[Element] (0,\[Infinity])." }], "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Bimodal Beta", "Subsection"], Cell[TextData[{ "extend the Beta Distribution by adding 2 pdf's together and dividing by 2\n\ probability density function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", RowBox[{ FractionBox[ SuperscriptBox[ RowBox[{ SuperscriptBox["z", RowBox[{"p", "-", "1"}]], "(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"q", "-", "1"}]], RowBox[{"2", RowBox[{"B", "(", RowBox[{"p", ",", "q"}], ")"}]}]], "+", FractionBox[ SuperscriptBox[ RowBox[{ SuperscriptBox["z", RowBox[{"r", "-", "1"}]], "(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"s", "-", "1"}]], RowBox[{"2", RowBox[{"B", "(", RowBox[{"r", ",", "s"}], ")"}]}]]}]}], TraditionalForm]]], ", ", StyleBox["B", FontSlant->"Italic"], " is the beta function, ", StyleBox["B(p,q)", FontSlant->"Italic"], " = ", Cell[BoxData[ FormBox[ RowBox[{ SubsuperscriptBox["\[Integral]", "0", "1"], RowBox[{ SuperscriptBox[ RowBox[{ SuperscriptBox["u", RowBox[{"p", "-", "1"}]], "(", RowBox[{"1", "-", "u"}], ")"}], RowBox[{"q", "-", "1"}]], RowBox[{"\[DifferentialD]", "u"}]}]}], TraditionalForm]]], ")\nmean: ", StyleBox["\n", FontSlant->"Italic"], "variance: " }], "Text"], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "v_", ",", "w_", ",", "x_", ",", "y_"}], "]"}], ":=", RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["z", RowBox[{"v", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"w", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]], "+", FractionBox[ RowBox[{ SuperscriptBox["z", RowBox[{"x", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"y", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"f", "[", RowBox[{"0.4", ",", "2.2", ",", "3.6", ",", "2.2", ",", "3.6"}], "]"}]], "Input"], Cell[BoxData["1.8448037779233306`"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "1.3`", ",", "3.6`", ",", "4.1`", ",", "1.6`"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "1"}], "}"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.952381 -0.269463 0.735922 [ [.21429 .45396 -9 -9 ] [.21429 .45396 9 0 ] [.40476 .45396 -9 -9 ] [.40476 .45396 9 0 ] [.59524 .45396 -9 -9 ] [.59524 .45396 9 0 ] [.78571 .45396 -9 -9 ] [.78571 .45396 9 0 ] [.97619 .45396 -3 -9 ] [.97619 .45396 3 0 ] [.01131 .02491 -18 -4.5 ] [.01131 .02491 0 4.5 ] [.01131 .17209 -18 -4.5 ] [.01131 .17209 0 4.5 ] [.01131 .31927 -18 -4.5 ] [.01131 .31927 0 4.5 ] [.01131 .61364 -18 -4.5 ] [.01131 .61364 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .21429 .46646 m .21429 .47271 L s [(0.2)] .21429 .45396 0 1 Mshowa .40476 .46646 m .40476 .47271 L s [(0.4)] .40476 .45396 0 1 Mshowa .59524 .46646 m .59524 .47271 L s [(0.6)] .59524 .45396 0 1 Mshowa .78571 .46646 m .78571 .47271 L s [(0.8)] .78571 .45396 0 1 Mshowa .97619 .46646 m .97619 .47271 L s [(1)] .97619 .45396 0 1 Mshowa .125 Mabswid .07143 .46646 m .07143 .47021 L s .11905 .46646 m .11905 .47021 L s .16667 .46646 m .16667 .47021 L s .2619 .46646 m .2619 .47021 L s .30952 .46646 m .30952 .47021 L s .35714 .46646 m .35714 .47021 L s .45238 .46646 m .45238 .47021 L s .5 .46646 m .5 .47021 L s .54762 .46646 m .54762 .47021 L s .64286 .46646 m .64286 .47021 L s .69048 .46646 m .69048 .47021 L s .7381 .46646 m .7381 .47021 L s .83333 .46646 m .83333 .47021 L s .88095 .46646 m .88095 .47021 L s .92857 .46646 m .92857 .47021 L s .25 Mabswid 0 .46646 m 1 .46646 L s .02381 .02491 m .03006 .02491 L s [(0.4)] .01131 .02491 1 0 Mshowa .02381 .17209 m .03006 .17209 L s [(0.6)] .01131 .17209 1 0 Mshowa .02381 .31927 m .03006 .31927 L s [(0.8)] .01131 .31927 1 0 Mshowa .02381 .61364 m .03006 .61364 L s [(1.2)] .01131 .61364 1 0 Mshowa .125 Mabswid .02381 .0617 m .02756 .0617 L s .02381 .0985 m .02756 .0985 L s .02381 .13529 m .02756 .13529 L s .02381 .20889 m .02756 .20889 L s .02381 .24568 m .02756 .24568 L s .02381 .28248 m .02756 .28248 L s .02381 .35607 m .02756 .35607 L s .02381 .39287 m .02756 .39287 L s .02381 .42966 m .02756 .42966 L s .02381 .50325 m .02756 .50325 L s .02381 .54005 m .02756 .54005 L s .02381 .57685 m .02756 .57685 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02484 0 m .02499 .03527 L .02605 .09947 L .02729 .14988 L .02846 .18642 L .03053 .23694 L .03279 .2794 L .0379 .35007 L .04262 .39738 L .05224 .46538 L .0571 .49054 L .06244 .51338 L .07293 .54719 L .07881 .56133 L .0842 .57187 L .0892 .5799 L .09465 .587 L .09942 .59196 L .10458 .59616 L .10735 .59796 L .10989 .59937 L .11228 .60047 L .1149 .60146 L .11725 .60215 L .11945 .60265 L .12064 .60286 L .12177 .60302 L .12307 .60316 L .12425 .60325 L .12546 .6033 L .12614 .60332 L .12678 .60332 L .12808 .60329 L .1288 .60325 L .12947 .60321 L .13059 .60312 L .13182 .60298 L .1343 .60259 L .13703 .60201 L .13996 .60121 L .14523 .59937 L .15547 .59442 L .16657 .58735 L .18672 .57107 L .22764 .52991 L .26704 .48706 L .30493 .4481 L .34527 .41282 L .36385 .39949 L .3841 .38738 L Mistroke .39508 .38194 L .40527 .37764 L .41493 .37422 L .42537 .37128 L .43089 .37004 L .43597 .3691 L .44072 .36838 L .44324 .36807 L .44594 .36779 L .44839 .36758 L .45062 .36742 L .4517 .36736 L .45287 .36731 L .45397 .36726 L .455 .36723 L .45614 .3672 L .45741 .36718 L .45864 .36717 L .45933 .36717 L .45996 .36718 L .46103 .36719 L .4622 .36721 L .46342 .36725 L .46455 .36729 L .46719 .36742 L .46962 .36759 L .4751 .36813 L .47994 .36879 L .48505 .36966 L .49392 .37162 L .50365 .37442 L .52314 .38199 L .54404 .3929 L .58537 .42211 L .62519 .45795 L .66348 .49674 L .70423 .53856 L .72446 .55782 L .74347 .57401 L .76183 .58707 L .77185 .59281 L .78119 .5971 L .78623 .59894 L .79081 .6003 L .7959 .60144 L .7987 .60189 L .79996 .60204 L .80134 .60219 L .8025 .60228 L .80358 .60235 L Mistroke .80473 .60239 L .80596 .60242 L .8071 .60241 L .80818 .60239 L .80915 .60235 L .81022 .60228 L .81148 .60217 L .81263 .60205 L .81521 .60167 L .81759 .6012 L .81984 .60064 L .8245 .59913 L .82961 .5969 L .83495 .59387 L .83993 .59037 L .84885 .58233 L .85841 .57094 L .86859 .55523 L .87967 .53338 L .88924 .50989 L .89979 .4782 L .91958 .39854 L .93042 .3404 L .94059 .27318 L .94964 .19949 L .95917 .10122 L Mfstroke .95917 .10122 m .96646 0 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztm/trk1cYx98mjTZpq71YN+vU1N681qm7uU3FDVR0bmwWkY0hoRZbtV67 McYYY4wxxhiDMfbDGP4g+IO/iH+Z6C6KF7K8522fk5x8Tt5z8ia0uASbPHzP 83y/5/K855Z4ojA/Mz1XmJ+dKuSPXCtcmZmdup4/fPlaCUq3BUFbPgiCu/kg tIslc+GtWPpXHArfQkTbA+ojHUROxegvfM/ay58B1rEM3VPhRyosaBcrE1rK O+1HFkVWlISvTohINYRZlWakpir0KbBk41lK7TfwdiDyJ88aEXUw6zHqrBwt dwrKipa7uKsupfRrNqe7E8nlWk7/M6cn4NTZcmq4Ey2LeonJuFDUsdg0gVLx PK6PMnFbzbUvquYiH9Wqy+z+nFTEKXCg5eTuZOxKHoF7d8u99HoI7qvqd083 gXM5u/8L7qufE/f00lfBcP8H3HsSuFetK38vbQQtzcbZ1YuvnkNhk/nb66PM LnUv/AX8veao5eJqWYPFki2xEZmKosXGPXiOw+5DWF9ZmBoAuoS5FxNYp15j w+ZCKxdaX9ZHcC60Vkg6Kqd5oOqPp5qW7tQLwtU4qsoiGoczQjYo1qXktJ9K bfNiXUxO+4mQjYh1Pjntx4CNicBMjIA+tRlOp6V0O5SeBWyNX71PicCEWA2g nRSyPVBaSC5wErC9ItoAgQ+F7A1bchrYgF2AhvYDwPaJaAME3gfsbcfU9ZQ6 AdgBaUsDBI4L2bu2JDawtX4CejIwrlHUEv4CRHRChP4+YtjGp0rHoFRbL4Ga Og1nRKN83qALdiVfvf3oAFdr26rD6euRIXaNKsXrED1um2tVuApeDwyrACvv K6OIes1SCbocIsquGm1QPWHht+wuk3fTIDCsblo35cC1H7BurzZYMnmFQRx1 WOk1WmMMU7bcaV6nWFrVJ9Xpccu5Gl2xMjT0tLLU2aFnPn1+6gO/XinVM+lI ZWxaBtTgsz7/KekQ9wq/A9hHgL0H2It+UocAmwTsuJ9UBrCDgNE6eSy51AHA TgN2FLB1flL7AaPtxRG7lMoT9QD0q2JnbZqPac5LgtHWhBIpiQYtZ16x6iHr Wua9UWPWosHdChhNhpsAe9mxSiOA0V6PZkvP5rwJGB2KaO4btEuZq274R8ej KcBo7vOUeh2wacBo7lvvJ/UaYOcAo7nPU+pVwGYBo7nPU+oVwC4A9pY1U52l 9gI255ip5VJlK3qlE10sXAZsn19bSIoecLo4o/zc4Ce1C7DrjvnpKTUB2GeO +ekptROwzx3zc6Ndio6zdE/2hWN+ekptA4xueSlTPaVoefrKMVM32aVoKzAO 2NeOmeopNQbYN47pky+T0qcDw2kUsG8B2xEj4LC4DwP2nWPS1Pj1LkltBux7 x6TxlBoC7Afp8i3WyqEAXR/lAfvRcSQ9pWjr9pPjSA7bpWgjvAGwnx1H0lOK NpC/yAjR+I3YBboBo2uCXwHbmFxqHWC/ObZ5tExKNZ1273TX+btjm8fsbSGp NVKRP8Si9o370dKF2p+AEd8Wu1QPYL2A3XCs0la7FNHqu5ubjhHb7AJ0fNJX TLfEojZvt9P2S6A+BN8OLeWm76sm7BQKy4bIndBSXwvvjtyD9MJn9FJx+pcI +psIOv4WI1oVT0dm2pHRoTGOhzYm+qebcdG0ASA/t9ZU3WYqo+qHN/rKUJUv /BxB2fDfZ2x20PYfHH1r8A==\ \>"], ImageRangeCache->{{{0, 358.75}, {221.125, 0}} -> {-0.0825959, 0.352468, \ 0.00385924, 0.00499437}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "1.3", ",", "3.6", ",", "4.1", ",", "1.6"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "1"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["0.9999999999999998`"], "Output"] }, Open ]], Cell["Therefore the support function is", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"bimodal", " ", "beta", " ", "distribution"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sf", "[", RowBox[{"z_", ",", "v_", ",", "w_", ",", "x_", ",", "y_"}], "]"}], ":=", RowBox[{"-", RowBox[{"Log", "[", RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["z", RowBox[{"v", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"w", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]], "+", FractionBox[ RowBox[{ SuperscriptBox["z", RowBox[{"x", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"y", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}], "]"}]}]}]}]], "Input"] }, Open ]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Discrete", "Section"], Cell[TextData[{ "Expected, or mean\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"E", "[", "Z", "]"}], "=", RowBox[{ UnderscriptBox["\[Sum]", "z"], RowBox[{"z", " ", SubscriptBox["f", "z"]}]}]}], TraditionalForm]]], "\nVariance\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"VAR", "(", "Z", ")"}], "=", RowBox[{ RowBox[{"E", "[", SuperscriptBox[ RowBox[{"(", RowBox[{"Z", "-", RowBox[{"E", "[", "Z", "]"}]}], ")"}], "2"], "]"}], "=", RowBox[{ UnderscriptBox["\[Sum]", "z"], RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", RowBox[{"E", "[", "z", "]"}]}], ")"}], "2"], SubscriptBox["f", "z"]}]}]}]}], TraditionalForm]]], "\t\nwhere ", StyleBox["Z", FontSlant->"Italic"], " is a random variable, ", StyleBox["z", FontSlant->"Italic"], " is a particular instance of that variable, ", Cell[BoxData[ FormBox[ SubscriptBox["f", "z"], TraditionalForm]]], " is the frequency of occurance of ", StyleBox["z", FontSlant->"Italic"], ". ", "\n\nFor discrete variables, the ", StyleBox["probability distribution function", FontWeight->"Bold"], " is the probability of the value z given the parameters" }], "Text"], Cell[CellGroupData[{ Cell["Binomial", "Subsection"], Cell[TextData[{ "Binomial Distribution:\nhas two parameters: ", StyleBox["N", FontSlant->"Italic"], " is the number of times the trial was conducted in which one of two \ outcomes can occur. ", StyleBox["p", FontSlant->"Italic"], " is the probability of one outcome, and ", StyleBox["z", FontSlant->"Italic"], " is the total number of times that outcome occurs. For example, flip a \ coin 10 times and count the number of heads. The result would be a binomial \ distribution, and if the coin is fair, ", StyleBox["p", FontSlant->"Italic"], " = 0. 5. Whereas the other discrete distributions are used to model \ discrete observations of continuous processes, the binomial models discrete \ processes.\nprobability distribution function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"Pr", RowBox[{"{", RowBox[{"Z", "=", "z"}], "}"}]}], "=", RowBox[{ RowBox[{"(", FractionBox[ RowBox[{"N", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"N", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], ")"}], SuperscriptBox[ RowBox[{ SuperscriptBox["p", "z"], "(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"N", "-", "z"}]]}]}], TraditionalForm]]], "\nmean: ", StyleBox["N p\n", FontSlant->"Italic"], "variance: ", Cell[BoxData[ FormBox[ RowBox[{"N", " ", "p", " ", RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}]}], TraditionalForm]]], "\n\nNote: Sampling without replacment is best captured by a hypergeometric \ distribution" }], "Text", CellChangeTimes->{{3.416913140914*^9, 3.4169131667*^9}}], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[{ RowBox[{"dbinom", RowBox[{"(", RowBox[{"z", ",", "n", ",", "p"}], ")"}]}], "\[IndentingNewLine]", RowBox[{"plot", RowBox[{"(", RowBox[{"dbinom", RowBox[{"(", RowBox[{ RowBox[{"seq", RowBox[{"(", RowBox[{"1", ":", "20"}], ")"}]}], ",", "20", ",", "0.3"}], ")"}]}], ")"}]}]}], "Input"], Cell[BoxData[{ RowBox[{"#", " ", "random", " ", "number", " ", "generation"}], "\[IndentingNewLine]", RowBox[{"rbinom", RowBox[{"(", RowBox[{"1", ",", "n", ",", "p"}], ")"}]}]}], "Input"], Cell[BoxData[{ RowBox[{"#", "see", " ", "function", " ", "description", " ", "below"}], "\[IndentingNewLine]", RowBox[{"curve", RowBox[{"(", RowBox[{ RowBox[{"1", "/", RowBox[{"(", RowBox[{"1", "+", RowBox[{"exp", RowBox[{"(", RowBox[{"-", "x"}], ")"}]}]}], ")"}]}], ",", RowBox[{"-", "10"}], ",", "10"}], ")"}]}]}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "n_", ",", "p_"}], "]"}], ":=", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], SuperscriptBox["p", "z"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"n", "-", "z"}]]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"z", ",", RowBox[{"f", "[", RowBox[{"z", ",", "20", ",", "0.25`"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "20"}], "}"}]}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.03`", "]"}]}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.047619 0.0147151 2.90911 [ [.2619 .00222 -3 -9 ] [.2619 .00222 3 0 ] [.5 .00222 -6 -9 ] [.5 .00222 6 0 ] [.7381 .00222 -6 -9 ] [.7381 .00222 6 0 ] [.97619 .00222 -6 -9 ] [.97619 .00222 6 0 ] [.01131 .16017 -24 -4.5 ] [.01131 .16017 0 4.5 ] [.01131 .30563 -18 -4.5 ] [.01131 .30563 0 4.5 ] [.01131 .45108 -24 -4.5 ] [.01131 .45108 0 4.5 ] [.01131 .59654 -18 -4.5 ] [.01131 .59654 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .2619 .01472 m .2619 .02097 L s [(5)] .2619 .00222 0 1 Mshowa .5 .01472 m .5 .02097 L s [(10)] .5 .00222 0 1 Mshowa .7381 .01472 m .7381 .02097 L s [(15)] .7381 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(20)] .97619 .00222 0 1 Mshowa .125 Mabswid .07143 .01472 m .07143 .01847 L s .11905 .01472 m .11905 .01847 L s .16667 .01472 m .16667 .01847 L s .21429 .01472 m .21429 .01847 L s .30952 .01472 m .30952 .01847 L s .35714 .01472 m .35714 .01847 L s .40476 .01472 m .40476 .01847 L s .45238 .01472 m .45238 .01847 L s .54762 .01472 m .54762 .01847 L s .59524 .01472 m .59524 .01847 L s .64286 .01472 m .64286 .01847 L s .69048 .01472 m .69048 .01847 L s .78571 .01472 m .78571 .01847 L s .83333 .01472 m .83333 .01847 L s .88095 .01472 m .88095 .01847 L s .92857 .01472 m .92857 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .16017 m .03006 .16017 L s [(0.05)] .01131 .16017 1 0 Mshowa .02381 .30563 m .03006 .30563 L s [(0.1)] .01131 .30563 1 0 Mshowa .02381 .45108 m .03006 .45108 L s [(0.15)] .01131 .45108 1 0 Mshowa .02381 .59654 m .03006 .59654 L s [(0.2)] .01131 .59654 1 0 Mshowa .125 Mabswid .02381 .04381 m .02756 .04381 L s .02381 .0729 m .02756 .0729 L s .02381 .10199 m .02756 .10199 L s .02381 .13108 m .02756 .13108 L s .02381 .18926 m .02756 .18926 L s .02381 .21835 m .02756 .21835 L s .02381 .24744 m .02756 .24744 L s .02381 .27654 m .02756 .27654 L s .02381 .33472 m .02756 .33472 L s .02381 .36381 m .02756 .36381 L s .02381 .3929 m .02756 .3929 L s .02381 .42199 m .02756 .42199 L s .02381 .48017 m .02756 .48017 L s .02381 .50926 m .02756 .50926 L s .02381 .53836 m .02756 .53836 L s .02381 .56745 m .02756 .56745 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .03 w .02381 .02394 Mdot .07143 .07622 Mdot .11905 .20947 Mdot .16667 .40423 Mdot .21429 .56653 Mdot .2619 .60332 Mdot .30952 .50522 Mdot .35714 .34172 Mdot .40476 .19184 Mdot .45238 .09344 Mdot .5 .04358 Mdot .54762 .02346 Mdot .59524 .0169 Mdot .64286 .01516 Mdot .69048 .01479 Mdot .7381 .01473 Mdot .78571 .01472 Mdot .83333 .01472 Mdot .88095 .01472 Mdot .92857 .01472 Mdot .97619 .01472 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->Gra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IxycUJHbfUpXQ5jmRh5Xdx7gU3W1jkHdXq+rpy67qtKCjSf/j+ ItAt1cLB4XccIHuG094p2dlrJaYq5CDe5fVvL99/pzdIjvLIHRhz8HzEBnI7 ZgQ8H44XGcWM5P6Ur9Fa5lDXhvpwpr97Z/XakKq80q/1WLi7oo4XlEk1rKqU G0dKgR7MQoCwCgSzMlSlT4HUOU5+WUedDPVXo6rxjFhaWaw4qwzl17wz2cAj 4UJOl6H1PBJu+nRpW2cDeVm1ugR3lIQEoHykKOYh96J8ZcodQ6szc4rJD3ln uo9H9nhjYi+PPOCNsz02kPu9+bDbv04BcvlIMcxD7kX5ypjEAHvb14C8gN7m t33Sb1UXO2EZ3R8Jzgtnvd7dZqalheBRJ6wh72pvMdMSfCt42htz3WZjtxI8 aq0GQ2mR4qjVh/npPO0qt2adOfpPwNSa072pvKR9Gw5JRxyFpDMA6CL/GuYk /gIIw9tB\ \>"], ImageRangeCache->{{{79.5625, 308.938}, {605.438, 464.125}} -> {-10.0191, \ 0.731983, 0.0790302, 0.00129364}}] }, Open ]], Cell["Sums to 1", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plus", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "20", ",", "0.3"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "20"}], "}"}]}], "]"}]}]], "Input"], Cell[BoxData["0.999999999999999`"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"binomial", " ", "random", " ", "number", " ", "with", " ", "n"}], " ", "=", " ", RowBox[{ RowBox[{"3", " ", "and", " ", "p"}], " ", "=", " ", "0.5"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"RandomInteger", "[", RowBox[{"BinomialDistribution", "[", RowBox[{"3", " ", ",", "0.5"}], "]"}], "]"}]}]], "Input", CellChangeTimes->{{3.416919472613*^9, 3.416919485613*^9}}], Cell[BoxData["3"], "Output", CellChangeTimes->{{3.4169194753970003`*^9, 3.416919486171*^9}}] }, Open ]], Cell[TextData[{ "Here is a useful function for modeling a probability. The funciton is \ constrained to a range between 0 and 1 for all real values of ", Cell[BoxData[ FormBox[ RowBox[{"f", "(", "x", ")"}], TraditionalForm]]], ", both positive and negative. This function is derived by the following \ logic:\n\n1) Probabilities \[Element] [0,1]. An odds ratio is a ratio of the \ probability of sucess over the probability of failure, \nand odds ratios \ \[Element] [0,\[Infinity]). Therefore\nln(odds ratios) \[Element] (-\ \[Infinity],\[Infinity]).\n\n2) For a binary model, only two outcomes are \ examined, therefore the Pr{failure} = 1 - Pr{success}.\n", Cell[BoxData[{ FormBox[ RowBox[{ RowBox[{"ln", "(", FractionBox[ RowBox[{"Pr", RowBox[{"{", "success", "}"}]}], RowBox[{"Pr", RowBox[{"{", "failure", "}"}]}]], ")"}], "=", RowBox[{"f", "(", "x", ")"}]}], TraditionalForm], "\[IndentingNewLine]", FormBox[ RowBox[{ FractionBox[ RowBox[{"Pr", RowBox[{"{", "success", "}"}]}], RowBox[{"Pr", RowBox[{"{", "failure", "}"}]}]], "=", RowBox[{"exp", "(", RowBox[{"f", "(", "x", ")"}], ")"}]}], TraditionalForm], "\[IndentingNewLine]", FormBox[ RowBox[{ FractionBox[ RowBox[{"Pr", RowBox[{"{", "success", "}"}]}], RowBox[{"1", "-", RowBox[{"Pr", RowBox[{"{", "success", "}"}]}]}]], "=", RowBox[{"exp", "(", RowBox[{"f", "(", "x", ")"}], ")"}]}], TraditionalForm], "\[IndentingNewLine]", FormBox[ RowBox[{ RowBox[{"Pr", RowBox[{"{", "success", "}"}]}], "=", FractionBox[ RowBox[{"exp", "(", RowBox[{"f", "(", "x", ")"}], ")"}], RowBox[{ RowBox[{"exp", "(", RowBox[{"f", "(", "x", ")"}], ")"}], "+", "1"}]]}], TraditionalForm], "\[IndentingNewLine]", FormBox[ RowBox[{ RowBox[{"Pr", RowBox[{"{", "success", "}"}]}], "=", FractionBox["1", RowBox[{"1", "+", RowBox[{"exp", "(", RowBox[{"-", RowBox[{"f", "(", "x", ")"}]}], ")"}]}]]}], TraditionalForm]}]] }], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"parameters", "=", RowBox[{"{", RowBox[{ RowBox[{"a", "\[Rule]", RowBox[{"-", "4"}]}], ",", RowBox[{"b", "\[Rule]", "0.7`"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{"a", "+", RowBox[{"b", " ", "x"}]}], "/.", "\[InvisibleSpace]", "parameters"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{ FractionBox["1", RowBox[{"1", "+", RowBox[{"Exp", "[", RowBox[{"-", RowBox[{"f", "[", "x", "]"}]}], "]"}]}]], "/.", "\[InvisibleSpace]", "parameters"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "10"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}]}], "]"}]}], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0952381 0 0.618034 [ [.21429 -0.0125 -3 -9 ] [.21429 -0.0125 3 0 ] [.40476 -0.0125 -3 -9 ] [.40476 -0.0125 3 0 ] [.59524 -0.0125 -3 -9 ] [.59524 -0.0125 3 0 ] [.78571 -0.0125 -3 -9 ] [.78571 -0.0125 3 0 ] [.97619 -0.0125 -6 -9 ] [.97619 -0.0125 6 0 ] [.01131 .12361 -18 -4.5 ] [.01131 .12361 0 4.5 ] [.01131 .24721 -18 -4.5 ] [.01131 .24721 0 4.5 ] [.01131 .37082 -18 -4.5 ] [.01131 .37082 0 4.5 ] [.01131 .49443 -18 -4.5 ] [.01131 .49443 0 4.5 ] [.01131 .61803 -6 -4.5 ] [.01131 .61803 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .21429 0 m .21429 .00625 L s [(2)] .21429 -0.0125 0 1 Mshowa .40476 0 m .40476 .00625 L s [(4)] .40476 -0.0125 0 1 Mshowa .59524 0 m .59524 .00625 L s [(6)] .59524 -0.0125 0 1 Mshowa .78571 0 m .78571 .00625 L s [(8)] .78571 -0.0125 0 1 Mshowa .97619 0 m .97619 .00625 L s [(10)] .97619 -0.0125 0 1 Mshowa .125 Mabswid .07143 0 m .07143 .00375 L s .11905 0 m .11905 .00375 L s .16667 0 m .16667 .00375 L s .2619 0 m .2619 .00375 L s .30952 0 m .30952 .00375 L s .35714 0 m .35714 .00375 L s .45238 0 m .45238 .00375 L s .5 0 m .5 .00375 L s .54762 0 m .54762 .00375 L s .64286 0 m .64286 .00375 L s .69048 0 m .69048 .00375 L s .7381 0 m .7381 .00375 L s .83333 0 m .83333 .00375 L s .88095 0 m .88095 .00375 L s .92857 0 m .92857 .00375 L s .25 Mabswid 0 0 m 1 0 L s .02381 .12361 m .03006 .12361 L s [(0.2)] .01131 .12361 1 0 Mshowa .02381 .24721 m .03006 .24721 L s [(0.4)] .01131 .24721 1 0 Mshowa .02381 .37082 m .03006 .37082 L s [(0.6)] .01131 .37082 1 0 Mshowa .02381 .49443 m .03006 .49443 L s [(0.8)] .01131 .49443 1 0 Mshowa .02381 .61803 m .03006 .61803 L s [(1)] .01131 .61803 1 0 Mshowa .125 Mabswid .02381 .0309 m .02756 .0309 L s .02381 .0618 m .02756 .0618 L s .02381 .09271 m .02756 .09271 L s .02381 .15451 m .02756 .15451 L s .02381 .18541 m .02756 .18541 L s .02381 .21631 m .02756 .21631 L s .02381 .27812 m .02756 .27812 L s .02381 .30902 m .02756 .30902 L s .02381 .33992 m .02756 .33992 L s .02381 .40172 m .02756 .40172 L s .02381 .43262 m .02756 .43262 L s .02381 .46353 m .02756 .46353 L s .02381 .52533 m .02756 .52533 L s .02381 .55623 m .02756 .55623 L s .02381 .58713 m .02756 .58713 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .01112 m .06244 .01468 L .10458 .01984 L .14415 .02625 L .18221 .03425 L .22272 .04526 L .26171 .05885 L .30316 .07719 L .34309 .09929 L .3815 .12513 L .42237 .15778 L .46172 .19408 L .49955 .23285 L .53984 .27712 L .57861 .32103 L .61984 .36715 L .65954 .4092 L .69774 .44609 L .73838 .48062 L .77751 .5089 L .81909 .53372 L .85916 .55296 L .89771 .56771 L .93871 .58 L .97619 .58872 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztmnlsFFUcx6fswbaUBiIhpCRYa9RADJE0QC2IaBobTZUIRqJYZG3AXQGB tnKJHCKg3MiNoHLIfR+iHMqlIFrwCIoSGwyKigeRYDCKWTtvtr+dGb/fmZ3N WvqHm3T6+nmf9/u9eW/ezNvd3h+uivQfHK6KlofzSirCQyPR8sq8e4ZU1CJf hqZlRDRNq8nT9HKsthg/lGmxWCygF7vqJZ9eul1KRXrJr5c6iecT1kQvaZoK oak6Var70V93qJLPUtfZwS8EfiPAOibpIRYysvUFVd0abncfB1VqooKJjlzz TvZjndT8FlZ3kfmtF1myPXXoQRhUFTr0wKYW1d9YOS2bLrZmMkxwbN1TFuhH hfwpLBJVo1ZyI+lc4kZBZ+5fNwqFo+kt5+q/1ACV6Id4t/NBd7IBa9rAvYbU l3T3Oef/qbrWXhqmSh2LTfWNVa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cO5/iFgz3D9I8CquF4NWCXXTwBWwfWTgA3j+seADeX6JzIDDtJngA22z+Ap IA3iMZE+kOufA/YU178ALMr104BFuP4lYE9y/SvABnD9jAypg/Q1YOVcrwHs CfsMngVSmMdEej+ufyN5HKRzgJVx/VvAHuP6d4D14fp5wB41dLSHCQhDz4zv xYuHSPW7I/cWPsB+BKy3t46gD4KSTX8BsIf/w/QK/SQj5zGV857mF8B61d9Q /gpYz/pLf1EGtad9KWQ7DttvgPXgi++S5HGQLgNWyvXfJaaDdAWwe7n+h8Q0 Swr8JaUS3v4qYMVc/1tiOkgxke52lerM7i6mX8xuLmZQzK4uZkjMIhczS8xC FzPxVWhH+3yo+mbyZ4FLpOZidnAxr5Oc7V3MlhLzVhezlcR0+C8qdWwty+4m F/N6iZnvYuZLzDYu5s1iOvznlTq2My6O2lcLODMdJFIzl0hul34DqVdTqN6C o3eAZjMX1NdrG5/MgoOpjqXJ1beyRn0guVaqHN+naxn/AN6Ietg=\ \>"], ImageRangeCache->{{{0, 359}, {221.375, 0}} -> {-1.1161, -0.0763556, \ 0.0404684, 0.00623612}}] }, Open ]], Cell[TextData[{ "The Hill function is also useful for modeling probabilities as it contains \ interpretable parameters: ", StyleBox["a", FontSlant->"Italic"], " is the point at which the probability equals 0.50 and ", StyleBox["b", FontSlant->"Italic"], " is the \"slope\" at the 0.50 point." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"parameters", "=", RowBox[{"{", RowBox[{ RowBox[{"a", "\[Rule]", "5"}], ",", RowBox[{"b", "\[Rule]", "4"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Plot", "[", RowBox[{ RowBox[{ FractionBox["1", RowBox[{"1", "+", SuperscriptBox[ RowBox[{"(", FractionBox["a", "x"], ")"}], "b"]}]], "/.", "\[InvisibleSpace]", "parameters"}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "10"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}]}]}], "]"}]}], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0952381 0 0.618034 [ [.21429 -0.0125 -3 -9 ] [.21429 -0.0125 3 0 ] [.40476 -0.0125 -3 -9 ] [.40476 -0.0125 3 0 ] [.59524 -0.0125 -3 -9 ] [.59524 -0.0125 3 0 ] [.78571 -0.0125 -3 -9 ] [.78571 -0.0125 3 0 ] [.97619 -0.0125 -6 -9 ] [.97619 -0.0125 6 0 ] [.01131 .12361 -18 -4.5 ] [.01131 .12361 0 4.5 ] [.01131 .24721 -18 -4.5 ] [.01131 .24721 0 4.5 ] [.01131 .37082 -18 -4.5 ] [.01131 .37082 0 4.5 ] [.01131 .49443 -18 -4.5 ] [.01131 .49443 0 4.5 ] [.01131 .61803 -6 -4.5 ] [.01131 .61803 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .21429 0 m .21429 .00625 L s [(2)] .21429 -0.0125 0 1 Mshowa .40476 0 m .40476 .00625 L s [(4)] .40476 -0.0125 0 1 Mshowa .59524 0 m .59524 .00625 L s [(6)] .59524 -0.0125 0 1 Mshowa .78571 0 m .78571 .00625 L s [(8)] .78571 -0.0125 0 1 Mshowa .97619 0 m .97619 .00625 L s [(10)] .97619 -0.0125 0 1 Mshowa .125 Mabswid .07143 0 m .07143 .00375 L s .11905 0 m .11905 .00375 L s .16667 0 m .16667 .00375 L s .2619 0 m .2619 .00375 L s .30952 0 m .30952 .00375 L s .35714 0 m .35714 .00375 L s .45238 0 m .45238 .00375 L s .5 0 m .5 .00375 L s .54762 0 m .54762 .00375 L s .64286 0 m .64286 .00375 L s .69048 0 m .69048 .00375 L s .7381 0 m .7381 .00375 L s .83333 0 m .83333 .00375 L s .88095 0 m .88095 .00375 L s .92857 0 m .92857 .00375 L s .25 Mabswid 0 0 m 1 0 L s .02381 .12361 m .03006 .12361 L s [(0.2)] .01131 .12361 1 0 Mshowa .02381 .24721 m .03006 .24721 L s [(0.4)] .01131 .24721 1 0 Mshowa .02381 .37082 m .03006 .37082 L s [(0.6)] .01131 .37082 1 0 Mshowa .02381 .49443 m .03006 .49443 L s [(0.8)] .01131 .49443 1 0 Mshowa .02381 .61803 m .03006 .61803 L s [(1)] .01131 .61803 1 0 Mshowa .125 Mabswid .02381 .0309 m .02756 .0309 L s .02381 .0618 m .02756 .0618 L s .02381 .09271 m .02756 .09271 L s .02381 .15451 m .02756 .15451 L s .02381 .18541 m .02756 .18541 L s .02381 .21631 m .02756 .21631 L s .02381 .27812 m .02756 .27812 L s .02381 .30902 m .02756 .30902 L s .02381 .33992 m .02756 .33992 L s .02381 .40172 m .02756 .40172 L s .02381 .43262 m .02756 .43262 L s .02381 .46353 m .02756 .46353 L s .02381 .52533 m .02756 .52533 L s .02381 .55623 m .02756 .55623 L s .02381 .58713 m .02756 .58713 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 0 m .02499 0 L .02605 0 L .02729 0 L .02846 0 L .02954 0 L .03053 0 L .03163 0 L .03279 0 L .03395 0 L .0352 0 L .03638 0 L .03746 0 L .03873 0 L .04011 0 L .04141 0 L .04262 0 L .04386 0 L .04521 0 L .04765 0 L .05003 1e-005 L .05221 1e-005 L .05459 1e-005 L .05719 1e-005 L .06244 3e-005 L .06527 4e-005 L .06795 5e-005 L .07296 7e-005 L .07836 .00011 L .08424 .00016 L .08936 .00022 L .0948 .00031 L .0999 .0004 L .10458 .00051 L .11395 .00079 L .12405 .00121 L .13296 .0017 L .14233 .00236 L .15188 .00322 L .16207 .00436 L .18044 .00715 L .19068 .00918 L .20178 .01183 L .22194 .01798 L .24181 .02601 L .26286 .0369 L .30074 .06344 L .34108 .10174 L .37991 .14723 L .42118 .20183 L Mistroke .46094 .25664 L .49919 .30796 L .53989 .35831 L .57907 .40108 L .6207 .43986 L .66082 .47097 L .69942 .4957 L .74048 .51722 L .78002 .53406 L .81804 .54731 L .85852 .55884 L .89748 .56791 L .93889 .57581 L .97619 .58168 L Mfstroke % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJzVmwdwFFUYxy+5NBIIAVFkADnGMqKMIiODdSAKIaA4OIw42DAgTBKBkIIN USyAjGBAUVA6SkeaImClN5EuHSlSBATECIIg8fZt+O728v/vu02WGG7gZfPb 3/d97/a9d3m527ROy0vv3C0tL6NTmq9FTlqP9IxOub6UrBw/8kZ4PBGz/P/j fR7juNDjudQU+v8VzjYaj6eH8SXGwCnGUZT1qLkcJRtHscaRV1hiUAo/NnOr 5J5IwFIAaxZmbHIpPG+YsQnm08kGp1pdGV3PAaeaywCro0gZwv+vm7msm54o C7s0FYNU4xFpnZloHBx2KI8Or7ZDbGJfpksX7loLvSjGowW97OW+66mlWH9N jFahaGcdzpYpliorp6Uka2Y7AaPkbNGLZPBr7uU49hlf1MXqbzTxJq0HulYZ sCQw2f3/E4zv0TAnhcl4rfLhlae+VOFDdofRqtdwFIjWNWJoESHPpiONjTZa EeOoJTfvkwWgvm/OzaZWM5mbzazm/dxMtZp3c/Nho40UszE3HzFar5h3cvNR a86G3GxrNRsEmYq2s56/jWd63GrW52Z7q3kLN5+0mjdz82nAVHsjj3mGxdzA YzpYe2RjprHsdXlMRxbj4zGdrD2yMTuz7LV5TBcWUyt0pqRb+1GL58xgOWvw mEwWcy2PeZ7FVOcxXVnMNTymG4u5msd0ZzHVeE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B/F9YOAjeT6IcBGcP2wPAsb6Qhgw7l+FLBhXD8m XbCRjgM2lOsnAPuA6yelCzbSKcAGh86FAiDl85wFEmgjnQZsINfPSE4b6Sxg A7h+TnLaSOcB68f1C5KzSELbzRhh6Kf2RcDMTyjL+PP8QsnisHxpPostKlr8 RJ8y7kPgGjqsHBjxwE0E6gwq1buMn1VgEpZ15Tip3KuMK8dLZfPuoLA/1Fdt RYk272GCy161iWL21JiB93FzNWZVMbM1ZjWZbN01ZnXJ2VVj1hAzU2PWFDM9 yAzc6HidfNtFk6mOmM9pzLpidtSY18u16aAxbxLzKY1ZT8z2GrO+mO005u1i ttWYDcVsozEbidlaY94lZiuNea8smxQ42k0l04OaTA9IpiYaU1VS97TfozEf ErORxmwjZgON+ZiYt2rMJ4xGfRxnc1O1ap+VnD6N2VnMmhozU0ybW3FVmyVj ZHNjrGr7wjG22QQVi7qCz6s7tNUfVKL3LILNOuA8equkXMUEdic2pmrzwztf 25p1SHhR6hj8uZQn4j+nppaw\ \>"], ImageRangeCache->{{{0, 431}, {265.875, 0}} -> {-1.11314, -0.0763042, \ 0.0404313, 0.00623041}}] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Multinomial", "Subsection"], Cell[TextData[{ "Multinomial Distribution:\nThis is an extension of the binomial to ", StyleBox["m", FontSlant->"Italic"], " possible", " outcomes each with a probability ", Cell[BoxData[ FormBox[ SubscriptBox["p", "i"], TraditionalForm]]], ".\nprobability distribution function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"Pr", RowBox[{"{", RowBox[{ SubscriptBox["Z", "m"], "=", SubscriptBox["z", "m"]}], "}"}]}], "=", RowBox[{ RowBox[{"(", FractionBox[ RowBox[{"N", "!"}], RowBox[{ RowBox[{ SubscriptBox["z", "1"], "!"}], RowBox[{ RowBox[{ SubscriptBox["z", "2"], "!"}], " ", ".", " ", ".", " ", ".", " ", RowBox[{ SubscriptBox["z", "m"], "!"}]}]}]], ")"}], SuperscriptBox[ SubscriptBox["p", "1"], SubscriptBox["z", "1"]], RowBox[{ SuperscriptBox[ SubscriptBox["p", "2"], SubscriptBox["z", "2"]], " ", ".", " ", ".", " ", ".", " ", SuperscriptBox[ SubscriptBox["p", "m"], SubscriptBox["z", "m"]]}], " "}]}], TraditionalForm]]], "\nmean: ", Cell[BoxData[ FormBox[ RowBox[{"N", " ", SubscriptBox["p", "m"]}], TraditionalForm]]], StyleBox["\n", FontSlant->"Italic"], "variance: ", Cell[BoxData[ FormBox[ RowBox[{"N", " ", SubscriptBox["p", "m"], " ", RowBox[{"(", RowBox[{"1", "-", SubscriptBox["p", "m"]}], ")"}]}], TraditionalForm]]] }], "Text"], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z1_", ",", "z2_", ",", "n_", ",", "p1_", ",", "p2_"}], "]"}], ":=", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{"z1", "!"}], RowBox[{"z2", "!"}], RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z1", "-", "z2"}], ")"}], "!"}]}]], SuperscriptBox["p1", "z1"], SuperscriptBox["p2", "z2"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p1", "-", "p2"}], ")"}], RowBox[{"n", "-", "z1", "-", "z2"}]]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"z", ",", RowBox[{"f", "[", RowBox[{"z", ",", "3", ",", "20", ",", "0.25`", ",", "0.25`"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "20"}], "}"}]}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.03`", "]"}]}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.047619 0.0147151 22.3979 [ [.2619 .00222 -3 -9 ] [.2619 .00222 3 0 ] [.5 .00222 -6 -9 ] [.5 .00222 6 0 ] [.7381 .00222 -6 -9 ] [.7381 .00222 6 0 ] [.97619 .00222 -6 -9 ] [.97619 .00222 6 0 ] [.01131 .1267 -30 -4.5 ] [.01131 .1267 0 4.5 ] [.01131 .23869 -24 -4.5 ] [.01131 .23869 0 4.5 ] [.01131 .35068 -30 -4.5 ] [.01131 .35068 0 4.5 ] [.01131 .46267 -24 -4.5 ] [.01131 .46267 0 4.5 ] [.01131 .57466 -30 -4.5 ] [.01131 .57466 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .2619 .01472 m .2619 .02097 L s [(5)] .2619 .00222 0 1 Mshowa .5 .01472 m .5 .02097 L s [(10)] .5 .00222 0 1 Mshowa .7381 .01472 m .7381 .02097 L s [(15)] .7381 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(20)] .97619 .00222 0 1 Mshowa .125 Mabswid .07143 .01472 m .07143 .01847 L s .11905 .01472 m .11905 .01847 L s .16667 .01472 m .16667 .01847 L s .21429 .01472 m .21429 .01847 L s .30952 .01472 m .30952 .01847 L s .35714 .01472 m .35714 .01847 L s .40476 .01472 m .40476 .01847 L s .45238 .01472 m .45238 .01847 L s .54762 .01472 m .54762 .01847 L s .59524 .01472 m .59524 .01847 L s .64286 .01472 m .64286 .01847 L s .69048 .01472 m .69048 .01847 L s .78571 .01472 m .78571 .01847 L s .83333 .01472 m .83333 .01847 L s .88095 .01472 m .88095 .01847 L s .92857 .01472 m .92857 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .1267 m .03006 .1267 L s [(0.005)] .01131 .1267 1 0 Mshowa .02381 .23869 m .03006 .23869 L s [(0.01)] .01131 .23869 1 0 Mshowa .02381 .35068 m .03006 .35068 L s [(0.015)] .01131 .35068 1 0 Mshowa .02381 .46267 m .03006 .46267 L s [(0.02)] .01131 .46267 1 0 Mshowa .02381 .57466 m .03006 .57466 L s [(0.025)] .01131 .57466 1 0 Mshowa .125 Mabswid .02381 .03711 m .02756 .03711 L s .02381 .05951 m .02756 .05951 L s .02381 .08191 m .02756 .08191 L s .02381 .10431 m .02756 .10431 L s .02381 .1491 m .02756 .1491 L s .02381 .1715 m .02756 .1715 L s .02381 .1939 m .02756 .1939 L s .02381 .2163 m .02756 .2163 L s .02381 .26109 m .02756 .26109 L s .02381 .28349 m .02756 .28349 L s .02381 .30589 m .02756 .30589 L s .02381 .32829 m .02756 .32829 L s .02381 .37308 m .02756 .37308 L s .02381 .39548 m .02756 .39548 L s .02381 .41788 m .02756 .41788 L s .02381 .44028 m .02756 .44028 L s .02381 .48507 m .02756 .48507 L s .02381 .50747 m .02756 .50747 L s .02381 .52987 m .02756 .52987 L s .02381 .55227 m .02756 .55227 L s .02381 .59706 m .02756 .59706 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .03 w .02381 .01776 Mdot .07143 .04059 Mdot .11905 .11821 Mdot .16667 .27344 Mdot .21429 .46749 Mdot .2619 .60332 Mdot .30952 .60332 Mdot .35714 .47719 Mdot .40476 .30376 Mdot .45238 .15924 Mdot .5 .07252 Mdot .54762 .03311 Mdot .59524 .01931 Mdot .64286 .0156 Mdot .69048 .01484 Mdot .7381 .01473 Mdot .78571 .01472 Mdot .83333 .01472 Mdot .88095 .01472 Mdot .92857 .01472 Mdot .97619 .01472 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0,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CeZ7eG02mizQyIgDKrSh/M1Fv/i629J0H3UZi33jQ LRzd14Sgm2j7L3FBgBHpm6Mrso7Izv9+ehNVH34QpdMffTeGCqHeFgVbVDM5 kPTneUo3JuEkCyS1TNlKaVcm1X220XYw4OiJiQjs1SZKOs+i8qNWDoMoe+rL HfZkYTaFZyvqu9Mq3TnqjrOK4PymVxJfTJ7fJPt5bMpv54l4/GLFd0FUh02R 3iONt4cNtVJR6wVs4fSObqw9bMJPmiZT4UB5FyUDNrD30vPzjylKyRxZUxtF J/ptG7URfJu/3FaoY6Pwn+G1U44GG6Oil4aPIIufPFxPwFEJXEePMQn8MskY MHRVQH8t+GYp0NWgZ2a9aHTmUmdF/X+rdIRVBOc6gb9vSulcp33XimKSTZIo UbopUqJ0y9lSsuaYifI8o4eXWd2vsZhalld/4GIUiPS1c6ip8Tpw4ytwUx5q +jw6oALX1gI38wFZ5VtvRWfOrXe8f+sANZXsddKygeitGHj7Xo+CcrO1spP7 C0Tve8s=\ \>"], ImageRangeCache->{{{79.5625, 308.938}, {462.25, 320.938}} -> {-10.7324, \ 0.0662099, 0.0808773, 0.000171949}}] }, Open ]], Cell["Sums to 1", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plus", "@@", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "i", ",", "5", ",", "0.25", ",", "0.25"}], "]"}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "5"}], "}"}]}], "]"}], "]"}]}]], "Input"], Cell[BoxData["1.`"], "Output"] }, Open ]], Cell[BoxData[ RowBox[{"<<", "\"\\""}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ "multinomial", " ", "random", " ", "vector", " ", "for", " ", "an", " ", "event", " ", "that", " ", "occurs", " ", "10", " ", "times"}], ";", " ", RowBox[{"the", " ", "probability", " ", "vector", " ", "follows"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Random", "[", RowBox[{"MultinomialDistribution", "[", RowBox[{"10", ",", RowBox[{"{", RowBox[{"0.2", ",", "0.2", ",", "0.3", ",", "0.3"}], "}"}]}], "]"}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{"1", ",", "3", ",", "2", ",", "4"}], "}"}]], "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[ RowBox[{"dmultinom", RowBox[{"(", ")"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"#", "random", " ", "number", " ", "generation"}], "\[IndentingNewLine]"}]], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Poisson", "Subsection"], Cell[TextData[{ "Poisson Distribution:\nhas one parameter that can really be broken into two \ parameters: ", StyleBox["r", FontSlant->"Italic"], " is the rate constant and ", StyleBox["t", FontSlant->"Italic"], " is the time.\nOne description of a poisson distribution: Imagine a \ process with a constant probability of occurance ", StyleBox["r", FontSlant->"Italic"], ". The event can occur at any time, and repeatedly. However, if we measure \ at discrete time intervals, and count the number of times the event has \ occurred for discrete entities, the result will be a Poisson Distribution. \ Imagine rain falling onto floor tiles. If you count the number of drops that \ hit each tile in one minute, the result would be distribute as a Poisson \ distribution.\nprobability distribution function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"Pr", RowBox[{"{", RowBox[{"Z", "=", "z"}], "}"}]}], "=", FractionBox[ SuperscriptBox[ RowBox[{ SuperscriptBox["e", RowBox[{ RowBox[{"-", "r"}], " ", "t"}]], "(", RowBox[{"r", " ", "t"}], ")"}], "z"], RowBox[{"z", "!"}]]}], TraditionalForm]]], "\nmean: ", StyleBox["r t\n", FontSlant->"Italic"], "variance: ", StyleBox["r t\n", FontSlant->"Italic"], "note: if evenly spaced time intervals, set ", StyleBox["t", FontSlant->"Italic"], " equal to 1" }], "Text"], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[ RowBox[{"dpois", RowBox[{"(", RowBox[{"z", ",", "lambda"}], ")"}]}]], "Input"], Cell[BoxData[{ RowBox[{"#", " ", "random", " ", "number", " ", "generation"}], "\[IndentingNewLine]", RowBox[{"rpois", RowBox[{"(", RowBox[{"1", ",", "lambda"}], ")"}]}]}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "\[Lambda]_"}], "]"}], ":=", FractionBox[ RowBox[{ RowBox[{"Exp", "[", RowBox[{"-", "\[Lambda]"}], "]"}], SuperscriptBox["\[Lambda]", "z"]}], RowBox[{"z", "!"}]]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"z", ",", RowBox[{"f", "[", RowBox[{"z", ",", "3"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "15"}], "}"}]}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.03`", "]"}]}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0634921 0.0147151 2.62721 [ [.15079 .00222 -3 -9 ] [.15079 .00222 3 0 ] [.27778 .00222 -3 -9 ] [.27778 .00222 3 0 ] [.40476 .00222 -3 -9 ] [.40476 .00222 3 0 ] [.53175 .00222 -3 -9 ] [.53175 .00222 3 0 ] [.65873 .00222 -6 -9 ] [.65873 .00222 6 0 ] [.78571 .00222 -6 -9 ] [.78571 .00222 6 0 ] [.9127 .00222 -6 -9 ] [.9127 .00222 6 0 ] [.01131 .14608 -24 -4.5 ] [.01131 .14608 0 4.5 ] [.01131 .27744 -18 -4.5 ] [.01131 .27744 0 4.5 ] [.01131 .4088 -24 -4.5 ] [.01131 .4088 0 4.5 ] [.01131 .54016 -18 -4.5 ] [.01131 .54016 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .15079 .01472 m .15079 .02097 L s [(2)] .15079 .00222 0 1 Mshowa .27778 .01472 m .27778 .02097 L s [(4)] .27778 .00222 0 1 Mshowa .40476 .01472 m .40476 .02097 L s [(6)] .40476 .00222 0 1 Mshowa .53175 .01472 m .53175 .02097 L s [(8)] .53175 .00222 0 1 Mshowa .65873 .01472 m .65873 .02097 L s [(10)] .65873 .00222 0 1 Mshowa .78571 .01472 m .78571 .02097 L s [(12)] .78571 .00222 0 1 Mshowa .9127 .01472 m .9127 .02097 L s [(14)] .9127 .00222 0 1 Mshowa .125 Mabswid .05556 .01472 m .05556 .01847 L s .0873 .01472 m .0873 .01847 L s .11905 .01472 m .11905 .01847 L s .18254 .01472 m .18254 .01847 L s .21429 .01472 m .21429 .01847 L s .24603 .01472 m .24603 .01847 L s .30952 .01472 m .30952 .01847 L s .34127 .01472 m .34127 .01847 L s .37302 .01472 m .37302 .01847 L s .43651 .01472 m .43651 .01847 L s .46825 .01472 m .46825 .01847 L s .5 .01472 m .5 .01847 L s .56349 .01472 m .56349 .01847 L s .59524 .01472 m .59524 .01847 L s .62698 .01472 m .62698 .01847 L s .69048 .01472 m .69048 .01847 L s .72222 .01472 m .72222 .01847 L s .75397 .01472 m .75397 .01847 L s .81746 .01472 m .81746 .01847 L s .84921 .01472 m .84921 .01847 L s .88095 .01472 m .88095 .01847 L s .94444 .01472 m .94444 .01847 L s .97619 .01472 m .97619 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .14608 m .03006 .14608 L s [(0.05)] .01131 .14608 1 0 Mshowa .02381 .27744 m .03006 .27744 L s [(0.1)] .01131 .27744 1 0 Mshowa .02381 .4088 m .03006 .4088 L s [(0.15)] .01131 .4088 1 0 Mshowa .02381 .54016 m .03006 .54016 L s [(0.2)] .01131 .54016 1 0 Mshowa .125 Mabswid .02381 .04099 m .02756 .04099 L s .02381 .06726 m .02756 .06726 L s .02381 .09353 m .02756 .09353 L s .02381 .1198 m .02756 .1198 L s .02381 .17235 m .02756 .17235 L s .02381 .19862 m .02756 .19862 L s .02381 .22489 m .02756 .22489 L s .02381 .25116 m .02756 .25116 L s .02381 .30371 m .02756 .30371 L s .02381 .32998 m .02756 .32998 L s .02381 .35625 m .02756 .35625 L s .02381 .38252 m .02756 .38252 L s .02381 .43507 m .02756 .43507 L s .02381 .46134 m .02756 .46134 L s .02381 .48761 m .02756 .48761 L s .02381 .51388 m .02756 .51388 L s .02381 .56643 m .02756 .56643 L s .02381 .5927 m .02756 .5927 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .03 w .02381 .14552 Mdot .0873 .40712 Mdot .15079 .60332 Mdot .21429 .60332 Mdot .27778 .45617 Mdot .34127 .27959 Mdot .40476 .14715 Mdot .46825 .07147 Mdot .53175 .036 Mdot .59524 .02181 Mdot .65873 .01684 Mdot .72222 .0153 Mdot .78571 .01486 Mdot .84921 .01475 Mdot .9127 .01472 Mdot .97619 .01472 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztW0tzTEEUnucdkyGSeG3koYgIeZANyp6VvVdhpFQl3hWpQll7bBAVP0BZ ohQrlCXKFuUHWKOslU1Mnzs5Pbfz9Z0zMz1Pd0p6zj3vPn3OuX17rsP5+Zmz F/Pzs9P5oUNz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adVG9cYIbWiQqXJFiDZLNI20zYq8ATS7VbVmgz0T9GSLnfN0cO0G7Zynggk1 4ILzpBp1EfbXmZMY6zEPeRTlK9PsHGrPzO84esdF1XqY5DEuRLryIyTpC6bo xlqN5RzAobtmNbpXA1yG40nXtyrTKD1sqcbbboBDq1GNbimfq1V1ZU9nv/5t C+0ZW6li/88+1bioTTKkXxsjzgN2TfQuu/FWG1H222XorXfjLTOi7HMrs0uN Oc5xvRfb23yZRsWgmvUplwcEl/mPibH4P4aBJBU=\ \>"], ImageRangeCache->{{{79.5625, 308.938}, {461.875, 320.563}} -> {-7.51433, \ 0.553468, 0.0592726, 0.00143245}}] }, Open ]], Cell["Sums to 1", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plus", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "20", ",", "0.3"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "100"}], "}"}]}], "]"}]}]], "Input"], Cell[BoxData["0.999999999999999`"], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"<<", "Statistics`DiscreteDistributions`"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "poisson", " ", "random", " ", "number", " ", "with", " ", "\[Lambda]"}], " ", "=", " ", "3.26"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Random", "[", RowBox[{"PoissonDistribution", "[", "3.26", "]"}], "]"}]}], "Input"], Cell[BoxData["2"], "Output"] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Negative binomial", "Subsection"], Cell[TextData[{ "Negative Binomial Distribution:\nThe negative binomial is similar to the \ poisson except that the data are overdispersed. As a consequence, the \ variance will always be larger than the mean. The negative binomial can be \ derived assuming the rate constant in the poisson is no longer constant but \ is gamma distributed. As ", Cell[BoxData[ FormBox[ RowBox[{"k", "\[Rule]", "\[Infinity]"}], TraditionalForm]]], ", the distribution approaches a Poisson. ", StyleBox["k", FontSlant->"Italic"], " is the shape parameter.\nprobability distribution function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"Pr", RowBox[{"{", RowBox[{"Z", "=", "z"}], "}"}]}], "=", RowBox[{ FractionBox[ RowBox[{"\[CapitalGamma]", "(", RowBox[{"k", "+", "z"}], ")"}], RowBox[{ RowBox[{"\[CapitalGamma]", "(", "k", ")"}], RowBox[{"z", "!"}]}]], SuperscriptBox[ RowBox[{"(", FractionBox["k", RowBox[{"k", "+", "m"}]], ")"}], "k"], SuperscriptBox[ RowBox[{"(", FractionBox["m", RowBox[{"k", "+", "m"}]], ")"}], "z"]}]}], TraditionalForm]]], "\n\twhere \[CapitalGamma] is the gamma function, ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"\[CapitalGamma]", "(", "n", ")"}], "=", RowBox[{ SubsuperscriptBox["\[Integral]", "0", "\[Infinity]"], RowBox[{ RowBox[{"Exp", "(", RowBox[{"-", "t"}], ")"}], SuperscriptBox["t", RowBox[{"n", "-", "1"}]], RowBox[{"\[DifferentialD]", "t"}]}]}]}], TraditionalForm]]], "\nmean: ", StyleBox["m\n", FontSlant->"Italic"], "variance: ", Cell[BoxData[ FormBox[ RowBox[{"m", "+", FractionBox[ SuperscriptBox["m", "2"], "k"]}], TraditionalForm]]], "\n\nAlternative form: used to describe the number the number of failures \ that occur before ", StyleBox["n", FontSlant->"Italic"], " sucesses have occured, where the probability of success is ", StyleBox["p", FontSlant->"Italic"], "." }], "Text"], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[{ RowBox[{ RowBox[{"#", " ", "note"}], ",", " ", RowBox[{ "\"\\"", " ", "is", " ", "needed", " ", "to", " ", "specify", " ", "this", " ", "particular", " ", "parameterization"}]}], "\[IndentingNewLine]", RowBox[{"dnbinom", RowBox[{"(", RowBox[{"z", ",", RowBox[{"size", " ", "=", " ", "k"}], ",", " ", RowBox[{"mu", "=", " ", "m"}]}], ")"}]}]}], "Input"], Cell[BoxData[ RowBox[{"rnbinom", RowBox[{"(", RowBox[{"1", ",", RowBox[{"size", "=", "k"}], ",", RowBox[{"mu", "=", "m"}]}], ")"}]}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "k_", ",", "m_"}], "]"}], ":=", RowBox[{ FractionBox[ RowBox[{"Gamma", "[", RowBox[{"k", "+", "z"}], "]"}], RowBox[{ RowBox[{"Gamma", "[", "k", "]"}], RowBox[{"z", "!"}]}]], SuperscriptBox[ RowBox[{"(", FractionBox["k", RowBox[{"k", "+", "m"}]], ")"}], "k"], SuperscriptBox[ RowBox[{"(", FractionBox["m", RowBox[{"k", "+", "m"}]], ")"}], "z"]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"z", ",", RowBox[{"f", "[", RowBox[{"z", ",", "10", ",", "3.2`"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "15"}], "}"}]}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.03`", "]"}]}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.0634921 0.0147151 2.92447 [ [.15079 .00222 -3 -9 ] [.15079 .00222 3 0 ] [.27778 .00222 -3 -9 ] [.27778 .00222 3 0 ] [.40476 .00222 -3 -9 ] [.40476 .00222 3 0 ] [.53175 .00222 -3 -9 ] [.53175 .00222 3 0 ] [.65873 .00222 -6 -9 ] [.65873 .00222 6 0 ] [.78571 .00222 -6 -9 ] [.78571 .00222 6 0 ] [.9127 .00222 -6 -9 ] [.9127 .00222 6 0 ] [.01131 .16094 -24 -4.5 ] [.01131 .16094 0 4.5 ] [.01131 .30716 -18 -4.5 ] [.01131 .30716 0 4.5 ] [.01131 .45339 -24 -4.5 ] [.01131 .45339 0 4.5 ] [.01131 .59961 -18 -4.5 ] [.01131 .59961 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .15079 .01472 m .15079 .02097 L s [(2)] .15079 .00222 0 1 Mshowa .27778 .01472 m .27778 .02097 L s [(4)] .27778 .00222 0 1 Mshowa .40476 .01472 m .40476 .02097 L s [(6)] .40476 .00222 0 1 Mshowa .53175 .01472 m .53175 .02097 L s [(8)] .53175 .00222 0 1 Mshowa .65873 .01472 m .65873 .02097 L s [(10)] .65873 .00222 0 1 Mshowa .78571 .01472 m .78571 .02097 L s [(12)] .78571 .00222 0 1 Mshowa .9127 .01472 m .9127 .02097 L s [(14)] .9127 .00222 0 1 Mshowa .125 Mabswid .05556 .01472 m .05556 .01847 L s .0873 .01472 m .0873 .01847 L s .11905 .01472 m .11905 .01847 L s .18254 .01472 m .18254 .01847 L s .21429 .01472 m .21429 .01847 L s .24603 .01472 m .24603 .01847 L s .30952 .01472 m .30952 .01847 L s .34127 .01472 m .34127 .01847 L s .37302 .01472 m .37302 .01847 L s .43651 .01472 m .43651 .01847 L s .46825 .01472 m .46825 .01847 L s .5 .01472 m .5 .01847 L s .56349 .01472 m .56349 .01847 L s .59524 .01472 m .59524 .01847 L s .62698 .01472 m .62698 .01847 L s .69048 .01472 m .69048 .01847 L s .72222 .01472 m .72222 .01847 L s .75397 .01472 m .75397 .01847 L s .81746 .01472 m .81746 .01847 L s .84921 .01472 m .84921 .01847 L s .88095 .01472 m .88095 .01847 L s .94444 .01472 m .94444 .01847 L s .97619 .01472 m .97619 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .16094 m .03006 .16094 L s [(0.05)] .01131 .16094 1 0 Mshowa .02381 .30716 m .03006 .30716 L s [(0.1)] .01131 .30716 1 0 Mshowa .02381 .45339 m .03006 .45339 L s [(0.15)] .01131 .45339 1 0 Mshowa .02381 .59961 m .03006 .59961 L s [(0.2)] .01131 .59961 1 0 Mshowa .125 Mabswid .02381 .04396 m .02756 .04396 L s .02381 .0732 m .02756 .0732 L s .02381 .10245 m .02756 .10245 L s .02381 .13169 m .02756 .13169 L s .02381 .19018 m .02756 .19018 L s .02381 .21943 m .02756 .21943 L s .02381 .24867 m .02756 .24867 L s .02381 .27792 m .02756 .27792 L s .02381 .33641 m .02756 .33641 L s .02381 .36565 m .02756 .36565 L s .02381 .3949 m .02756 .3949 L s .02381 .42414 m .02756 .42414 L s .02381 .48263 m .02756 .48263 L s .02381 .51188 m .02756 .51188 L s .02381 .54112 m .02756 .54112 L s .02381 .57036 m .02756 .57036 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .03 w .02381 .19681 Mdot .0873 .45617 Mdot .15079 .60332 Mdot .21429 .58548 Mdot .27778 .46441 Mdot .34127 .31996 Mdot .40476 .19971 Mdot .46825 .11723 Mdot .53175 .06752 Mdot .59524 .04032 Mdot .65873 .02651 Mdot .72222 .01991 Mdot .78571 .01692 Mdot .84921 .01562 Mdot .9127 .01508 Mdot .97619 .01485 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztW01sDVEUfu17b15/6I+2bGgrFNU/ukEsW62NBBHxl1CNpI2fSjVBrP1s NNVYI5aIsEIsEVvEErFGLG2r98zrOTPT787cMfOeodO0886c851z7j333HvP uzPdMzI1dursyNT46Ej78OTI+bHx0QvtQxOT86xsR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s/ZFg1OFfxLLdM3htA5kjxC o/szxk1C1QFqHHIqz8no/nSZncr7MCRZWxr3Up9QjTDoDnRbJKfiAKVZIzsd cAe6NbpTg97H4F6KQlTMIacyugPsniTF1z9l2qKSkbqmPUULso2WDJlXg8Y6 sjwMw8AhnePGyBMwARHyJJwf6XaQWHka9TTq/4s8lqjudlvaqUcOqausijv0 yF3qKivt9jiQnr1hW1ik9qDPYp6RnfBHfqavZqOioY9HpwlGKtTRkUFt0MNj 3BjJ3zLAQ/WXvHYnr4E5syue48ku9iLvcjmz3dRLHeCh0e1yZ87ecF5McShf kuZZZp08h/XPA7rfZ2uj2W2OlFym+/16pMwyuj9gI4kO+AfGTMVvYys5AA== \ \>"], ImageRangeCache->{{{79.5625, 308.938}, {482, 340.688}} -> {-7.51433, \ 0.529583, 0.0592726, 0.00128685}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"z", ",", RowBox[{"f", "[", RowBox[{"z", ",", "0.26`", ",", "10"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "100"}], "}"}]}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.03`", "]"}]}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.00952381 0.0147151 27.9203 [ [.21429 .00222 -6 -9 ] [.21429 .00222 6 0 ] [.40476 .00222 -6 -9 ] [.40476 .00222 6 0 ] [.59524 .00222 -6 -9 ] [.59524 .00222 6 0 ] [.78571 .00222 -6 -9 ] [.78571 .00222 6 0 ] [.97619 .00222 -9 -9 ] [.97619 .00222 9 0 ] [.01131 .15432 -30 -4.5 ] [.01131 .15432 0 4.5 ] [.01131 .29392 -24 -4.5 ] [.01131 .29392 0 4.5 ] [.01131 .43352 -30 -4.5 ] [.01131 .43352 0 4.5 ] [.01131 .57312 -24 -4.5 ] [.01131 .57312 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .21429 .01472 m .21429 .02097 L s [(20)] .21429 .00222 0 1 Mshowa .40476 .01472 m .40476 .02097 L s [(40)] .40476 .00222 0 1 Mshowa .59524 .01472 m .59524 .02097 L s [(60)] .59524 .00222 0 1 Mshowa .78571 .01472 m .78571 .02097 L s [(80)] .78571 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(100)] .97619 .00222 0 1 Mshowa .125 Mabswid .07143 .01472 m .07143 .01847 L s .11905 .01472 m .11905 .01847 L s .16667 .01472 m .16667 .01847 L s .2619 .01472 m .2619 .01847 L s .30952 .01472 m .30952 .01847 L s .35714 .01472 m .35714 .01847 L s .45238 .01472 m .45238 .01847 L s .5 .01472 m .5 .01847 L s .54762 .01472 m .54762 .01847 L s .64286 .01472 m .64286 .01847 L s .69048 .01472 m .69048 .01847 L s .7381 .01472 m .7381 .01847 L s .83333 .01472 m .83333 .01847 L s .88095 .01472 m .88095 .01847 L s .92857 .01472 m .92857 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .15432 m .03006 .15432 L s [(0.005)] .01131 .15432 1 0 Mshowa .02381 .29392 m .03006 .29392 L s [(0.01)] .01131 .29392 1 0 Mshowa .02381 .43352 m .03006 .43352 L s [(0.015)] .01131 .43352 1 0 Mshowa .02381 .57312 m .03006 .57312 L s [(0.02)] .01131 .57312 1 0 Mshowa .125 Mabswid .02381 .04264 m .02756 .04264 L s .02381 .07056 m .02756 .07056 L s .02381 .09848 m .02756 .09848 L s .02381 .1264 m .02756 .1264 L s .02381 .18224 m .02756 .18224 L s .02381 .21016 m .02756 .21016 L s .02381 .23808 m .02756 .23808 L s .02381 .266 m .02756 .266 L s .02381 .32184 m .02756 .32184 L s .02381 .34976 m .02756 .34976 L s .02381 .37768 m .02756 .37768 L s .02381 .4056 m .02756 .4056 L s .02381 .46144 m .02756 .46144 L s .02381 .48936 m .02756 .48936 L s .02381 .51728 m .02756 .51728 L s .02381 .5452 m .02756 .5452 L s .02381 .60104 m .02756 .60104 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .03 w .09048 .6174 Mdot .1 .5478 Mdot .10952 .49157 Mdot .11905 .44509 Mdot .12857 .40596 Mdot .1381 .37253 Mdot .14762 .34361 Mdot .15714 .31834 Mdot .16667 .29604 Mdot .17619 .27623 Mdot .18571 .25851 Mdot .19524 .24256 Mdot .20476 .22814 Mdot .21429 .21503 Mdot .22381 .20308 Mdot .23333 .19213 Mdot .24286 .18207 Mdot .25238 .1728 Mdot .2619 .16423 Mdot .27143 .1563 Mdot .28095 .14893 Mdot .29048 .14207 Mdot .3 .13567 Mdot .30952 .1297 Mdot .31905 .12411 Mdot .32857 .11887 Mdot .3381 .11396 Mdot .34762 .10934 Mdot .35714 .10499 Mdot .36667 .10089 Mdot .37619 .09703 Mdot .38571 .09338 Mdot .39524 .08993 Mdot .40476 .08667 Mdot .41429 .08358 Mdot .42381 .08065 Mdot .43333 .07788 Mdot .44286 .07524 Mdot .45238 .07274 Mdot .4619 .07036 Mdot .47143 .06809 Mdot .48095 .06594 Mdot .49048 .06389 Mdot .5 .06193 Mdot .50952 .06007 Mdot .51905 .05829 Mdot .52857 .05659 Mdot .5381 .05497 Mdot .54762 .05342 Mdot .55714 .05194 Mdot .56667 .05053 Mdot .57619 .04918 Mdot .58571 .04788 Mdot .59524 .04664 Mdot .60476 .04546 Mdot .61429 .04432 Mdot .62381 .04323 Mdot .63333 .04219 Mdot .64286 .04118 Mdot .65238 .04022 Mdot .6619 .0393 Mdot .67143 .03842 Mdot .68095 .03757 Mdot .69048 .03676 Mdot .7 .03597 Mdot .70952 .03522 Mdot .71905 .0345 Mdot .72857 .03381 Mdot .7381 .03314 Mdot .74762 .0325 Mdot .75714 .03188 Mdot .76667 .03129 Mdot .77619 .03071 Mdot .78571 .03017 Mdot .79524 .02964 Mdot .80476 .02913 Mdot .81429 .02864 Mdot .82381 .02816 Mdot .83333 .02771 Mdot .84286 .02727 Mdot .85238 .02685 Mdot .8619 .02644 Mdot .87143 .02605 Mdot .88095 .02567 Mdot .89048 .02531 Mdot .9 .02496 Mdot .90952 .02462 Mdot .91905 .02429 Mdot .92857 .02397 Mdot .9381 .02367 Mdot .94762 .02338 Mdot .95714 .02309 Mdot .96667 .02282 Mdot .97619 .02256 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztml1oXUUQgO/Nvflp2qa/SYgx5rZJa5q2SaNpzG+b2jap/YtpjBq11tu0 mIjakKT+UAWxFYRifRAVfBARBH0QLYiIPoko+CI+KD4oCD4oiCg+iChizMzR 3TsnM7t7zz3n3lAT2slmzrezs7Nzzs4ezpH07MTpB9Kzk+Pp1OB0empicnwm NXBmel6ViMdi8bfn/5enYtCei8X+E3Pz/+YugwBN+O0Z+FUCQyWhlYRWn2pp 3S5G16taxarVCa1SaCWYq8mMQecBb4boTqwIZTHRIay6Ub5XtGHXdYtckuiE oTtDcJ+zkQjBbty7OstcKnaMzlJkTZE9y1zicC46nepmkx1i4lmke1wpUXwo K/NU1+UeCZcUhZ+MCDuOn8xmyIiD+bCjG3kIpud/8KgssjQNY6Pi8s01vD2M LpekWwov0XE7netTIIzwdoBElXzPBNv6fXUXVm9FVNevBteVGlfRiTnI13Yu RWcbYxLl4wW+PqRi8u+KZP7A3yUBr6HNld6lJviFyIWM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6KqdOz2JsypTFvd7FrmnVAslB2VyO/Uy FHIbzYWBQCSC7pYim4cmD8hkMyUPyuQWSh4Kg2yiUTKMHgVp8BNB93lgFEsV ediyMglFHpVJlIYPH5qopWMyuZl6d7NMbqIzHgqDbKTrYZixgUTQ3VIU83CP ovvK2NbYdn0THWlUJhuo9yMyuZFGxOC9gURwA12vYdlSFGQo8wgcRX5lzK/1 dbWtv+zidtjMrIiF8zLfXqy4fl/H9c3S4VxqKq6eWXLJ2SXMuRTN3bG8uKSH 51K+nt54t+XPJYfI4atl/fy4NXTndLnOFdfuLnEv3rlo48TFV/B1IPUj2LDp REHyM8uN5LNL3H4W3BptVFvor2EjvF5HZ3pcJmtpTO+UyavoOhk+mTKQCNbQ LBqTLUVBhjKPwFF0X5nQc+R/kfk1dKZpmayma3ZCJqtoHtwdiESwkmapYfWj IEOZR+Ao8ivj8GK7ROkMuRDm6+zcPosJ4lVWFYZDXRGlD1yFZDv+5Pc1Ov79 WDQjc1nD6cKd/WLKyPB84V5Vm7+UK/TuUpg9uYqSp2QSP2/TT+OTMolf6+kn vGGfdCfXgtQ70T3Zkti+HG47Fv8HKLhIGw==\ \>"], ImageRangeCache->{{{79.5625, 308.938}, {652.875, 511.563}} -> {-54.2574, \ 0.08684, 0.408986, 0.000139508}}] }, Open ]], Cell["Sums to 1", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Plus", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "10", ",", "3"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "100"}], "}"}]}], "]"}]}], "//", "N"}]], "Input"], Cell[BoxData["1.`"], "Output"] }, Open ]], Cell["Derive expected value", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Sum", "[", RowBox[{ RowBox[{"z", " ", RowBox[{"f", "[", RowBox[{"z", ",", "k", ",", "m"}], "]"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}]}], "]"}]], "Input"], Cell[BoxData["m"], "Output"] }, Open ]], Cell["Derive variance", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"z", "-", RowBox[{"Sum", "[", RowBox[{ RowBox[{"z", " ", RowBox[{"f", "[", RowBox[{"z", ",", "k", ",", "m"}], "]"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}]}], "]"}]}], ")"}], "2"], " ", RowBox[{"f", "[", RowBox[{"z", ",", "k", ",", "m"}], "]"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "\[Infinity]"}], "}"}]}], "]"}], "//", "Simplify"}]], "Input"], Cell[BoxData[ FractionBox[ RowBox[{"m", " ", RowBox[{"(", RowBox[{"k", "+", "m"}], ")"}]}], "k"]], "Output"] }, Open ]], Cell[BoxData[ RowBox[{"(*", "\[IndentingNewLine]", RowBox[{ "Mathematica", " ", "6", " ", "now", " ", "contains", " ", "a", " ", "random", " ", "number", " ", "generator", " ", "for", " ", "the", " ", RowBox[{"NegativeBinomial", ".", " ", "You"}], " ", "have", " ", "to", " ", "use", " ", "it", " ", "in", " ", "the", " ", "following", " ", "form", " ", "so", " ", "as", " ", "to", " ", "conform", " ", "to", " ", "the", " ", RowBox[{ RowBox[{"above", "."}], "/", "\[IndentingNewLine]", " ", RowBox[{"RandomInteger", "[", RowBox[{"NegativeBinomialDistribution", "[", RowBox[{"k", " ", ",", FractionBox["k", RowBox[{"k", "+", "m"}]]}], "]"}], "]"}]}]}], " ", "*)"}]], "Input", CellChangeTimes->{{3.416922421039*^9, 3.416922434428*^9}, {3.41692249773*^9, 3.416922534671*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"RandomInteger", "[", RowBox[{"NegativeBinomialDistribution", "[", RowBox[{"3", " ", ",", FractionBox["3", RowBox[{"3", "+", "10"}]]}], "]"}], "]"}]], "Input", CellChangeTimes->{{3.416922323842*^9, 3.4169223271219997`*^9}, { 3.416922370264*^9, 3.4169223916140003`*^9}, {3.416922458619*^9, 3.41692245869*^9}}], Cell[BoxData["17"], "Output", CellChangeTimes->{{3.41692236741*^9, 3.416922396516*^9}, {3.416922459293*^9, 3.4169224885439997`*^9}}] }, Open ]], Cell[TextData[{ "Old versions of ", StyleBox["Mathematica", FontSlant->"Italic"], " did not contain a built-in random number generator for this form of the \ negative binomial. While not very elegant, the function below can be used to \ randomly generate numbers from a negative binomial distribution." }], "Text", CellChangeTimes->{{3.416917017608*^9, 3.416917028855*^9}, { 3.4169191734370003`*^9, 3.416919194533*^9}, {3.416922440955*^9, 3.4169224415699997`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"NegBiRandom", "[", RowBox[{"m_", ",", "k_"}], "]"}], ":=", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{"funtable", ",", "x", ",", "i"}], "}"}], ",", RowBox[{ RowBox[{"funtable", "=", RowBox[{"Table", "[", RowBox[{ FractionBox[ RowBox[{ RowBox[{"Gamma", "[", RowBox[{"k", "+", "x"}], "]"}], " ", SuperscriptBox[ RowBox[{"(", FractionBox["k", RowBox[{"k", "+", "m"}]], ")"}], "k"], " ", SuperscriptBox[ RowBox[{"(", FractionBox["m", RowBox[{"k", "+", "m"}]], ")"}], "x"]}], RowBox[{ RowBox[{"Gamma", "[", "k", "]"}], " ", RowBox[{"x", "!"}]}]], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "250"}], "}"}]}], "]"}]}], ";", RowBox[{"cdf", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ UnderoverscriptBox["\[Sum]", "i", "endsum"], RowBox[{ "funtable", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], ",", RowBox[{"{", RowBox[{"endsum", ",", "1", ",", RowBox[{"Length", "[", "funtable", "]"}]}], "}"}]}], "]"}]}], ";", RowBox[{"x", "=", RowBox[{"RandomReal", "[", "]"}]}], ";", RowBox[{"i", "=", "1"}], ";", RowBox[{"While", "[", RowBox[{ RowBox[{"x", ">", RowBox[{ "cdf", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], ",", RowBox[{ RowBox[{"i", "++"}], ";"}]}], "]"}], ";", RowBox[{"i", "-", "1"}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.416919220001*^9, 3.416919261231*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NegBiRandom", "[", RowBox[{"10", ",", "3"}], "]"}]], "Input"], Cell[BoxData["7"], "Output", CellChangeTimes->{{3.416919251408*^9, 3.4169192664960003`*^9}, { 3.416922473882*^9, 3.416922490833*^9}}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"negative", " ", "binomial", " ", "distribution"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Clear", "[", "sf", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"sf", "[", RowBox[{"z_", ",", RowBox[{"m_", "?", "NumberQ"}], ",", RowBox[{"k_", "?", "NumberQ"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"m", ">", "0"}], "&&", RowBox[{"k", ">", "0"}]}], ",", RowBox[{ RowBox[{"-", RowBox[{"Log", "[", RowBox[{"Gamma", "[", RowBox[{"k", "+", "z"}], "]"}], "]"}]}], "+", RowBox[{"Log", "[", RowBox[{"z", "!"}], "]"}], "+", RowBox[{"Log", "[", RowBox[{"Gamma", "[", "k", "]"}], "]"}], "-", RowBox[{"k", " ", RowBox[{"Log", "[", "k", "]"}]}], "+", RowBox[{"k", " ", RowBox[{"Log", "[", RowBox[{"k", "+", "m"}], "]"}]}], "-", RowBox[{"z", " ", RowBox[{"Log", "[", "m", "]"}]}], "+", RowBox[{"z", " ", RowBox[{"Log", "[", RowBox[{"k", "+", "m"}], "]"}]}]}], ",", "10000.0"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"sf", ",", "Listable"}], "]"}], ";"}]}]}]], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Generalized Poisson", "Subsection"], Cell[TextData[{ "The generalized Poisson distribution (Consul and Jain. 1973. Technometrics. \ 15: 791-799) can be used to represent a Poisson process in which the data are \ over-dispersed. It is also known as Lagrangian Poisson Distribution \ (Johnson, Kotz, and Kemp. 1992. Univariate Discrete Distributions). Despite \ the claims of the original authors, this distribution cannot be used for \ under-dispersed data because the sum of the probabilities do not add to 1.\n\n\ This distribution explicity models an increase in the rate of moving to \ subsequent categories and can represent data with very long right-tails as \ compared to the negative binomial. This distribution worked very well for \ the distribution of pollen deposited on flowers (", StyleBox["Castellanos et al. 2003. Evolution 57:2742-2752.", FontFamily->"MS Sans Serif", FontSize->8], ") When ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["\[Lambda]", "2"], "=", "0"}], TraditionalForm]]], " this distribution becomes the Poisson distribution.\n\n", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"Pr", RowBox[{"{", RowBox[{"Z", "=", "z"}], "}"}]}], "=", FractionBox[ RowBox[{ SuperscriptBox["e", RowBox[{"-", RowBox[{"(", RowBox[{ SubscriptBox["\[Lambda]", "1"], "+", RowBox[{"z", " ", SubscriptBox["\[Lambda]", "2"]}]}], ")"}]}]], SuperscriptBox[ RowBox[{ SubscriptBox["\[Lambda]", "1"], "(", RowBox[{ SubscriptBox["\[Lambda]", "1"], "+", RowBox[{"z", " ", SubscriptBox["\[Lambda]", "2"]}]}], ")"}], RowBox[{"z", "-", "1"}]]}], RowBox[{"z", "!"}]]}], TraditionalForm]]], ", where ", Cell[BoxData[ FormBox[ RowBox[{"0", "<", SubscriptBox["\[Lambda]", "1"]}], TraditionalForm]]], " and ", Cell[BoxData[ FormBox[ RowBox[{"0", "\[LessEqual]", SubscriptBox["\[Lambda]", "2"], "<", "1"}], TraditionalForm]]], "\nmean: ", Cell[BoxData[ FormBox[ FractionBox[ SubscriptBox["\[Lambda]", "1"], RowBox[{"1", "-", SubscriptBox["\[Lambda]", "2"]}]], TraditionalForm]]], "\nvariance: ", Cell[BoxData[ FormBox[ FractionBox[ SubscriptBox["\[Lambda]", "1"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", SubscriptBox["\[Lambda]", "2"]}], ")"}], "3"]], TraditionalForm]]] }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "\[Lambda]1_", ",", "\[Lambda]2_"}], "]"}], ":=", FractionBox[ RowBox[{"\[Lambda]1", SuperscriptBox[ RowBox[{"(", RowBox[{"\[Lambda]1", "+", RowBox[{"z", " ", "\[Lambda]2"}]}], ")"}], RowBox[{"z", "-", "1"}]], RowBox[{"Exp", "[", RowBox[{"-", RowBox[{"(", RowBox[{"\[Lambda]1", "+", RowBox[{"z", " ", "\[Lambda]2"}]}], ")"}]}], "]"}]}], RowBox[{"z", "!"}]]}]], "Input"], Cell[TextData[{ "Consul and Jain (1973) list the following method for estimating ", Cell[BoxData[ FormBox[ SubscriptBox["\[Lambda]", "1"], TraditionalForm]]], "and ", Cell[BoxData[ FormBox[ SubscriptBox["\[Lambda]", "2"], TraditionalForm]]], "from the mean and variance, but I don't trust these as the the best \ estimates, just a close estimate.\n\n", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["\[Lambda]", "2"], "=", RowBox[{"1", "-", SqrtBox[ FractionBox["mean", "variance"]]}]}], TraditionalForm]]], "\n", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["\[Lambda]", "1"], "=", RowBox[{"mean", " ", RowBox[{"(", RowBox[{"1", "-", SubscriptBox["\[Lambda]", "2"]}], ")"}]}]}], TraditionalForm]]], "\n" }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Beta-Binomial", "Subsection"], Cell[TextData[{ "Beta Binomial Distribution:\nThis distribution assumes that ", StyleBox["p", FontSlant->"Italic"], " in the binomial distribution has a beta distribution with parameters ", StyleBox["v", FontSlant->"Italic"], " and w (see beta distribution above)", StyleBox[".", FontSlant->"Italic"] }], "Text"], Cell[TextData[{ "probability distribution function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"Pr", RowBox[{"{", RowBox[{"Z", "=", "z"}], "}"}]}], "=", RowBox[{ RowBox[{"(", FractionBox[ RowBox[{"N", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"N", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], ")"}], FractionBox[ RowBox[{"B", "(", RowBox[{ RowBox[{"v", "+", "z"}], ",", RowBox[{"N", "+", "w", "-", "z"}]}], ")"}], RowBox[{"B", "(", RowBox[{"v", ",", "w"}], ")"}]]}]}], TraditionalForm]]], ", where ", StyleBox["B(v,w)", FontSlant->"Italic"], " is the beta function\nmean: ", StyleBox["\n", FontSlant->"Italic"], "variance: \n\nThe Beta distribution can be transformed to be in terms of a \ mean parameter and dispersion parameter, ", StyleBox["p = s(1-m)", FontSlant->"Italic"], " and ", StyleBox["q =s m", FontSlant->"Italic"], ". This just scales ", StyleBox["p", FontSlant->"Italic"], " and ", StyleBox["q", FontSlant->"Italic"], " without the specific constraints on the variance version. Here ", StyleBox["m", FontSlant->"Italic"], " \[Element] (0,1), ", StyleBox["s", FontSlant->"Italic"], " \[Element] (0,\[Infinity]). The ", StyleBox["m", FontSlant->"Italic"], ", ", StyleBox["s", FontSlant->"Italic"], " version is the one used for sfBetaBinomial in ", StyleBox["Mathematica", FontSlant->"Italic"], ". This form has been used to describe correlated instances of the Binomial \ Distribution, although more mechanistic distributions for these cases exist." }], "Text"], Cell[CellGroupData[{ Cell["r", "Subsubsection"], Cell[BoxData[{ RowBox[{"library", RowBox[{"(", "emdbook", ")"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ "#", "this", " ", "is", " ", "based", " ", "on", " ", "a", " ", "parameterization", " ", "so", " ", "that", " ", "m", " ", "is", " ", "the", " ", "mean", " ", "and", " ", "s", " ", "is"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{"#", "an", " ", "overdispersion", " ", RowBox[{"parameters", ".", " ", "As"}], " ", "s", " ", "approaches", " ", "infintiy"}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"#", "the", " ", "Beta"}], "-", RowBox[{ "Binomial", " ", "collapses", " ", "to", " ", "a", " ", "Biomial", " ", "Distribution"}]}]}], "\[IndentingNewLine]", RowBox[{"dbetabinom", RowBox[{"(", RowBox[{"z", ",", "N", ",", "m", ",", "s"}], ")"}]}]}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["mathematica", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "n_", ",", "m_", ",", "s_"}], "]"}], ":=", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], FractionBox[ RowBox[{"Beta", "[", RowBox[{ RowBox[{ RowBox[{"s", " ", "m"}], "+", "z"}], ",", RowBox[{"n", "+", RowBox[{"s", " ", RowBox[{"(", RowBox[{"1", "-", "m"}], ")"}]}], "-", "z"}]}], "]"}], RowBox[{"Beta", "[", RowBox[{ RowBox[{"s", " ", "m"}], ",", RowBox[{"s", " ", RowBox[{"(", RowBox[{"1", "-", " ", "m"}], ")"}]}]}], "]"}]]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "n_", ",", "v_", ",", "w_"}], "]"}], ":=", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], FractionBox[ RowBox[{"Beta", "[", RowBox[{ RowBox[{"v", "+", "z"}], ",", RowBox[{"n", "+", "w", "-", "z"}]}], "]"}], RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"z", ",", RowBox[{"f", "[", RowBox[{"z", ",", "20", ",", "2.`", ",", "3.2`"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "20"}], "}"}]}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.03`", "]"}]}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.047619 0.0147151 7.19207 [ [.2619 .00222 -3 -9 ] [.2619 .00222 3 0 ] [.5 .00222 -6 -9 ] [.5 .00222 6 0 ] [.7381 .00222 -6 -9 ] [.7381 .00222 6 0 ] [.97619 .00222 -6 -9 ] [.97619 .00222 6 0 ] [.01131 .15856 -24 -4.5 ] [.01131 .15856 0 4.5 ] [.01131 .3024 -24 -4.5 ] [.01131 .3024 0 4.5 ] [.01131 .44624 -24 -4.5 ] [.01131 .44624 0 4.5 ] [.01131 .59008 -24 -4.5 ] [.01131 .59008 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .2619 .01472 m .2619 .02097 L s [(5)] .2619 .00222 0 1 Mshowa .5 .01472 m .5 .02097 L s [(10)] .5 .00222 0 1 Mshowa .7381 .01472 m .7381 .02097 L s [(15)] .7381 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(20)] .97619 .00222 0 1 Mshowa .125 Mabswid .07143 .01472 m .07143 .01847 L s .11905 .01472 m .11905 .01847 L s .16667 .01472 m .16667 .01847 L s .21429 .01472 m .21429 .01847 L s .30952 .01472 m .30952 .01847 L s .35714 .01472 m .35714 .01847 L s .40476 .01472 m .40476 .01847 L s .45238 .01472 m .45238 .01847 L s .54762 .01472 m .54762 .01847 L s .59524 .01472 m .59524 .01847 L s .64286 .01472 m .64286 .01847 L s .69048 .01472 m .69048 .01847 L s .78571 .01472 m .78571 .01847 L s .83333 .01472 m .83333 .01847 L s .88095 .01472 m .88095 .01847 L s .92857 .01472 m .92857 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .15856 m .03006 .15856 L s [(0.02)] .01131 .15856 1 0 Mshowa .02381 .3024 m .03006 .3024 L s [(0.04)] .01131 .3024 1 0 Mshowa .02381 .44624 m .03006 .44624 L s [(0.06)] .01131 .44624 1 0 Mshowa .02381 .59008 m .03006 .59008 L s [(0.08)] .01131 .59008 1 0 Mshowa .125 Mabswid .02381 .05068 m .02756 .05068 L s .02381 .08664 m .02756 .08664 L s .02381 .1226 m .02756 .1226 L s .02381 .19452 m .02756 .19452 L s .02381 .23048 m .02756 .23048 L s .02381 .26644 m .02756 .26644 L s .02381 .33836 m .02756 .33836 L s .02381 .37432 m .02756 .37432 L s .02381 .41028 m .02756 .41028 L s .02381 .4822 m .02756 .4822 L s .02381 .51816 m .02756 .51816 L s .02381 .55412 m .02756 .55412 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .03 w .02381 .18688 Mdot .07143 .32493 Mdot .11905 .43174 Mdot .16667 .51019 Mdot .21429 .5631 Mdot .2619 .59323 Mdot .30952 .60332 Mdot .35714 .59605 Mdot .40476 .57406 Mdot .45238 .53992 Mdot .5 .49616 Mdot .54762 .44521 Mdot .59524 .38948 Mdot .64286 .33126 Mdot .69048 .27277 Mdot .7381 .21612 Mdot .78571 .16332 Mdot .83333 .11623 Mdot .88095 .07654 Mdot .92857 .0457 Mdot .97619 .02488 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztWk1ME1EQ3rLdFkg8KBg1JlI8KuBB5d+bwMlEDQeNUdIQExAaDRL/rgpe Ba6KXgU5eAI9K/HmD1eBq4Jn8Va7b/GbdjtTpttt4SAh7cu8781838y897qF C8nxoZup5PjwYDLRN5a8MzQ8eDfRe3ssY7IjlhVJWJb1NmG543RmuP2Szvym G90X18KPr7pvVS68wx057qgKtjbG1uqOou7Ihi3qObti3sycGRmjZXWagZNj 3p7y/GY8Zc+1Fok/zdhsnopntq4xK9oDscy1RRnbGcZWVZAd1aQrBE5UuWIV RrLo+KaClZRLQq7tLJ8YRb5s9DB1JKkmm40e9uGi+ZvjKMMw7TmpyHy9+2aU 7jMYdkENY6tV2v6vLW1ttftqdoEjV7RbaTvH2ExDx7PakwuwFRroj0bPL2yj WoxiMnwTPg/IoA2w218syGzeTc16FRNSVyeDdtrE63CSkEFroNMgg1Yh7FhZ QCZ76xomKk3lPh1XQKJJBn2DnJMy6CvScaIsIJPYFQ0TlaZKXjs7zdMniigz MqAobAX8/DtksqbdH3OoSp8Bcr05jG0Z6ewIEsZmXJK4ZRS0PYhzLiNcwA9o qbbgqVJFz4tExa1lisslPM8F1z8f/Yk7gjJ98hfsMLBpr5eM9RDCZPdQMVbe LxFJe/OB98g7eOqVQUsg0SODFsH/fCVAPCdT8PcaTXvpcNqN+QUk6bI/fwtI 7SV5/TyKdLESoDcaTrymwLeCA3fceRf8VuAOJO6mKPHeccDcqMk+P8p2NAen 7E+xJgJ37ju5hSxyV1Sj5FsyKI7s/pZBMXT1DHwOaODT8H5DA5/C6LqG8TQL N/mqAc8Zjc+XGp6vNNp3+ygMfT5vv3GrqC1GZRA1w4gMoha4VQmQipNKXbDE lVqug6C2IYPqIfKnDKpDun6EBkqB3QMPrnhyMXDuViEVKYzue27LdgVQelMQ dS/smEb7ZAj+xdRNlOZcfCTz2Sb9dRGfZWwp4U/9HbMnzsBQtvojSJuQQQ+R wicy6AHK+bhEUCM49WvgCbDr1/BsgM9+jXaCfy8WZArQCE6rGsVrwRuAzrVp GTQKOlMyaARynlUCxHMy2TsFTd0adc3w9EUGNYHTZw2oBYFnNXCi8ELDsxkL n8twotCigQ/4QYUvuMLf43Qh9nG/srJdcJ2IRFcd/VVhNuzoRnsnklaH6HNB ItHzIJdO+tNNHIKqYXtd5sRS9BhExv3Ri/+uj+oVyw2Q7ZbrVGouYkFPUnPy wh7A6XlyXob3wueiDOqDpyUPZMzMf0dYkb/gKlSX\ \>"], ImageRangeCache->{{{0, 358.75}, {221.125, 0}} -> {-2.15729, -0.00752063, \ 0.0789457, 0.000522703}}] }, Open ]], Cell["Sums to 1", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plus", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "20", ",", "2.0", ",", "3.2"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "20"}], "}"}]}], "]"}]}]], "Input"], Cell[BoxData["0.9999999999999994`"], "Output"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"Beta", " ", "binomial", " ", "distribution"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sf", "[", RowBox[{"z_", ",", "n_", ",", "v_", ",", "w_"}], "]"}], ":=", RowBox[{ RowBox[{"Log", "[", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], "]"}], "+", RowBox[{"Log", "[", RowBox[{"z", "!"}], "]"}], "-", RowBox[{"Log", "[", RowBox[{"n", "!"}], "]"}], "+", RowBox[{"Log", "[", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}], "]"}], "-", RowBox[{"Log", "[", RowBox[{"Beta", "[", RowBox[{ RowBox[{"v", "+", "z"}], ",", RowBox[{"n", "+", "w", "-", "z"}]}], "]"}], "]"}]}]}]}]], "Input"], Cell["\<\ The beta binomial is derived by multiply the pdf of the beta distribution by \ the pdf of the binomial, and then integrating from across the the full range \ of z for the beta binomial, in this case [0,1]\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"pdf", " ", "for", " ", "beta", " ", "distribution"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "p_", ",", "q_"}], "]"}], ":=", FractionBox[ RowBox[{ SuperscriptBox["z", RowBox[{"p", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"q", "-", "1"}]]}], RowBox[{"Beta", "[", RowBox[{"p", ",", "q"}], "]"}]]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"pdf", " ", "for", " ", "binomial", " ", "distribution"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "n_", ",", "p_"}], "]"}], ":=", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], SuperscriptBox["p", "z"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"n", "-", "z"}]]}]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], SuperscriptBox["p", "z"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"n", "-", "z"}]], FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"v", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"w", "-", "1"}]]}], RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]]}], ",", RowBox[{"{", RowBox[{"p", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"v", ">", "0"}], ",", RowBox[{"w", ">", "0"}], ",", RowBox[{"z", "\[GreaterEqual]", "0"}], ",", RowBox[{"n", "\[GreaterEqual]", "0"}]}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ FractionBox["1", RowBox[{ RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}], " ", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], " ", RowBox[{"z", "!"}]}]], RowBox[{"(", RowBox[{ RowBox[{"n", "!"}], " ", RowBox[{"If", "[", RowBox[{ RowBox[{"z", "<", RowBox[{"n", "+", "w"}]}], ",", FractionBox[ RowBox[{ RowBox[{"Gamma", "[", RowBox[{"n", "+", "w", "-", "z"}], "]"}], " ", RowBox[{"Gamma", "[", RowBox[{"v", "+", "z"}], "]"}]}], RowBox[{"Gamma", "[", RowBox[{"n", "+", "v", "+", "w"}], "]"}]], ",", RowBox[{"Integrate", "[", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{ RowBox[{"-", "1"}], "+", "n", "+", "w", "-", "z"}]], " ", SuperscriptBox["p", RowBox[{ RowBox[{"-", "1"}], "+", "v", "+", "z"}]]}], ",", RowBox[{"{", RowBox[{"p", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"Assumptions", "\[Rule]", RowBox[{ RowBox[{"v", ">", "0"}], "&&", RowBox[{"w", ">", "0"}], "&&", RowBox[{"n", "\[GreaterEqual]", "0"}], "&&", RowBox[{"z", "\[GreaterEqual]", "0"}], "&&", RowBox[{"z", "\[GreaterEqual]", RowBox[{"n", "+", "w"}]}]}]}]}], "]"}]}], "]"}]}], ")"}]}]], "Output"] }, Open ]], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " doesn't do a good job of pulling out the beta function, but this \ simplifies to" }], "Text"], Cell[BoxData[ RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], FractionBox[ RowBox[{ RowBox[{"Beta", "[", RowBox[{"z", "+", "v"}], "]"}], RowBox[{"Beta", "[", RowBox[{"w", "+", "n", "-", "z"}], "]"}]}], RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]]}]], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Bimodal Beta-Binomial", "Subsection"], Cell["\<\ Using the same assumptions from the derivation of the unimodal beta binomial \ distribution, multiply the bimodal beta distribition by the binomial \ distribution and integrate p from 0 to 1\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"pdf", " ", "for", " ", "binomial", " ", "distribution"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "n_", ",", "p_"}], "]"}], ":=", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], SuperscriptBox["p", "z"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"n", "-", "z"}]]}]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"pdf", " ", "for", " ", "bimodal", " ", "beta"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "v_", ",", "w_", ",", "x_", ",", "y_"}], "]"}], ":=", RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["z", RowBox[{"v", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"w", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]], "+", FractionBox[ RowBox[{ SuperscriptBox["z", RowBox[{"x", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"y", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "multiply", " ", "both", " ", "distributions", " ", "by", " ", "each", " ", "other"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], SuperscriptBox["p", "z"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"n", "-", "z"}]], RowBox[{"(", RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"v", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"w", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]], "+", FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"x", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"y", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}], ")"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], SuperscriptBox["p", "z"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"n", "-", "z"}]], FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"v", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"w", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]]}], "+", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], SuperscriptBox["p", "z"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"n", "-", "z"}]], FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"x", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"y", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"z", "+", "v", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"w", "+", "n", "-", "z", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]]}], "+", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"z", "+", "x", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"y", "+", "n", "-", "z", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}]}], "\[IndentingNewLine]", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], RowBox[{"(", RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"z", "+", "v", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"w", "+", "n", "-", "z", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]], "+", FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"z", "+", "x", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"y", "+", "n", "-", "z", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}], ")"}]}], "\[IndentingNewLine]", RowBox[{ SubsuperscriptBox["\[Integral]", "0", "1"], RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], RowBox[{"(", RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"z", "+", "v", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"w", "+", "n", "-", "z", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]], "+", FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"z", "+", "x", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"y", "+", "n", "-", "z", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}], ")"}], RowBox[{"\[DifferentialD]", "p"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], RowBox[{ SubsuperscriptBox["\[Integral]", "0", "1"], RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"z", "+", "v", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"w", "+", "n", "-", "z", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]], RowBox[{"\[DifferentialD]", "p"}]}]}]}], "+", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], RowBox[{ SubsuperscriptBox["\[Integral]", "0", "1"], RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["p", RowBox[{"z", "+", "x", "-", "1"}]], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"y", "+", "n", "-", "z", "-", "1"}]]}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]], RowBox[{"\[DifferentialD]", "p"}]}]}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], FractionBox[ RowBox[{"Beta", "[", RowBox[{ RowBox[{"z", "+", "v"}], ",", RowBox[{"w", "+", "n", "-", "z"}]}], "]"}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]]}], "+", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], FractionBox[ RowBox[{"Beta", "[", RowBox[{ RowBox[{"z", "+", "x"}], ",", RowBox[{"y", "+", "n", "-", "z"}]}], "]"}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}]}], "\[IndentingNewLine]", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], RowBox[{"(", RowBox[{ FractionBox[ RowBox[{"Beta", "[", RowBox[{ RowBox[{"z", "+", "v"}], ",", RowBox[{"w", "+", "n", "-", "z"}]}], "]"}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]], "+", FractionBox[ RowBox[{"Beta", "[", RowBox[{ RowBox[{"z", "+", "x"}], ",", RowBox[{"y", "+", "n", "-", "z"}]}], "]"}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}], ")"}]}]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"pdf", " ", "for", " ", "bimodal", " ", "beta"}], "-", RowBox[{"binomal", " ", "distribution"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "n_", ",", "v_", ",", "w_", ",", "x_", ",", "y_"}], "]"}], ":=", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], RowBox[{"(", RowBox[{ FractionBox[ RowBox[{"Beta", "[", RowBox[{ RowBox[{"z", "+", "v"}], ",", RowBox[{"w", "+", "n", "-", "z"}]}], "]"}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]], "+", FractionBox[ RowBox[{"Beta", "[", RowBox[{ RowBox[{"z", "+", "x"}], ",", RowBox[{"y", "+", "n", "-", "z"}]}], "]"}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}], ")"}]}]}]}]], "Input"], Cell[TextData[{ "Bimodal Beta-Binomial Distribution:\nhas 5 parameters: shape parameters for \ one node are ", StyleBox["v", FontSlant->"Italic"], " and ", StyleBox["w", FontSlant->"Italic"], "; shape parameters for the other node are ", StyleBox["x", FontSlant->"Italic"], " and ", StyleBox["y", FontSlant->"Italic"], "; ", StyleBox["n", FontSlant->"Italic"], " is the total number of individuals in the set and ", StyleBox["z", FontSlant->"Italic"], " is the number of success in that set.\n\nNote: this distribution and the \ unimodal beta-binomial assume a different draw from beta for the ", StyleBox["p", FontSlant->"Italic"], " of each set, but it assumes the same ", StyleBox["p", FontSlant->"Italic"], " for all the individuals within a set. This statement is based on Skellam. \ 1948. Journal of the Royal Statistical Society. Series B, 10: 257-261.", "\n\nprobability density function:\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", FractionBox[ SuperscriptBox[ RowBox[{ SuperscriptBox["z", RowBox[{"p", "-", "1"}]], "(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"q", "-", "1"}]], RowBox[{"B", "(", RowBox[{"p", ",", "q"}], ")"}]]}], TraditionalForm]]], ", ", StyleBox["B", FontSlant->"Italic"], " is the beta function, ", StyleBox["B(p,q)", FontSlant->"Italic"], " = ", Cell[BoxData[ FormBox[ RowBox[{ SubsuperscriptBox["\[Integral]", "0", "1"], RowBox[{ SuperscriptBox[ RowBox[{ SuperscriptBox["u", RowBox[{"p", "-", "1"}]], "(", RowBox[{"1", "-", "u"}], ")"}], RowBox[{"q", "-", "1"}]], RowBox[{"\[DifferentialD]", "u"}]}]}], TraditionalForm]]], ")\n\t", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"f", "(", "z", ")"}], "=", FractionBox[ SuperscriptBox[ RowBox[{ SuperscriptBox["z", RowBox[{"p", "-", "1"}]], "(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"q", "-", "1"}]], RowBox[{ SubsuperscriptBox["\[Integral]", "0", "1"], RowBox[{ SuperscriptBox[ RowBox[{ SuperscriptBox["u", RowBox[{"p", "-", "1"}]], "(", RowBox[{"1", "-", "u"}], ")"}], RowBox[{"q", "-", "1"}]], RowBox[{"\[DifferentialD]", "u"}]}]}]]}], TraditionalForm]]], "\nmean: ", StyleBox["\n", FontSlant->"Italic"], "variance: " }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"f", "[", RowBox[{ "z", ",", "30", ",", "1.2`", ",", "3.6`", ",", "3.6`", ",", "1.2`"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "30"}], "}"}]}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"PointSize", "[", "0.02`", "]"}], "}"}]}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{"0", ",", "0.04`"}], "}"}]}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.030722 9.1073e-018 15.4508 [ [.17742 -0.0125 -3 -9 ] [.17742 -0.0125 3 0 ] [.33103 -0.0125 -6 -9 ] [.33103 -0.0125 6 0 ] [.48464 -0.0125 -6 -9 ] [.48464 -0.0125 6 0 ] [.63825 -0.0125 -6 -9 ] [.63825 -0.0125 6 0 ] [.79186 -0.0125 -6 -9 ] [.79186 -0.0125 6 0 ] [.94547 -0.0125 -6 -9 ] [.94547 -0.0125 6 0 ] [.01131 .15451 -24 -4.5 ] [.01131 .15451 0 4.5 ] [.01131 .30902 -24 -4.5 ] [.01131 .30902 0 4.5 ] [.01131 .46353 -24 -4.5 ] [.01131 .46353 0 4.5 ] [.01131 .61803 -24 -4.5 ] [.01131 .61803 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .17742 0 m .17742 .00625 L s [(5)] .17742 -0.0125 0 1 Mshowa .33103 0 m .33103 .00625 L s [(10)] .33103 -0.0125 0 1 Mshowa .48464 0 m .48464 .00625 L s [(15)] .48464 -0.0125 0 1 Mshowa .63825 0 m .63825 .00625 L s [(20)] .63825 -0.0125 0 1 Mshowa .79186 0 m .79186 .00625 L s [(25)] .79186 -0.0125 0 1 Mshowa .94547 0 m .94547 .00625 L s [(30)] .94547 -0.0125 0 1 Mshowa .125 Mabswid .05453 0 m .05453 .00375 L s .08525 0 m .08525 .00375 L s .11598 0 m .11598 .00375 L s .1467 0 m .1467 .00375 L s .20814 0 m .20814 .00375 L s .23886 0 m .23886 .00375 L s .26959 0 m .26959 .00375 L s .30031 0 m .30031 .00375 L s .36175 0 m .36175 .00375 L s .39247 0 m .39247 .00375 L s .4232 0 m .4232 .00375 L s .45392 0 m .45392 .00375 L s .51536 0 m .51536 .00375 L s .54608 0 m .54608 .00375 L s .5768 0 m .5768 .00375 L s .60753 0 m .60753 .00375 L s .66897 0 m .66897 .00375 L s .69969 0 m .69969 .00375 L s .73041 0 m .73041 .00375 L s .76114 0 m .76114 .00375 L s .82258 0 m .82258 .00375 L s .8533 0 m .8533 .00375 L s .88402 0 m .88402 .00375 L s .91475 0 m .91475 .00375 L s .97619 0 m .97619 .00375 L s .25 Mabswid 0 0 m 1 0 L s .02381 .15451 m .03006 .15451 L s [(0.01)] .01131 .15451 1 0 Mshowa .02381 .30902 m .03006 .30902 L s [(0.02)] .01131 .30902 1 0 Mshowa .02381 .46353 m .03006 .46353 L s [(0.03)] .01131 .46353 1 0 Mshowa .02381 .61803 m .03006 .61803 L s [(0.04)] .01131 .61803 1 0 Mshowa .125 Mabswid .02381 .0309 m .02756 .0309 L s .02381 .0618 m .02756 .0618 L s .02381 .09271 m .02756 .09271 L s .02381 .12361 m .02756 .12361 L s .02381 .18541 m .02756 .18541 L s .02381 .21631 m .02756 .21631 L s .02381 .24721 m .02756 .24721 L s .02381 .27812 m .02756 .27812 L s .02381 .33992 m .02756 .33992 L s .02381 .37082 m .02756 .37082 L s .02381 .40172 m .02756 .40172 L s .02381 .43262 m .02756 .43262 L s .02381 .49443 m .02756 .49443 L s .02381 .52533 m .02756 .52533 L s .02381 .55623 m .02756 .55623 L s .02381 .58713 m .02756 .58713 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .02 w .05453 .54495 Mdot .08525 .60312 Mdot .11598 .61132 Mdot .1467 .60056 Mdot .17742 .58078 Mdot .20814 .55667 Mdot .23886 .5309 Mdot .26959 .50516 Mdot .30031 .48061 Mdot .33103 .45808 Mdot .36175 .43818 Mdot .39247 .42136 Mdot .4232 .40797 Mdot .45392 .39824 Mdot .48464 .39234 Mdot .51536 .39036 Mdot .54608 .39234 Mdot .5768 .39824 Mdot .60753 .40797 Mdot .63825 .42136 Mdot .66897 .43818 Mdot .69969 .45808 Mdot .73041 .48061 Mdot .76114 .50516 Mdot .79186 .5309 Mdot .82258 .55667 Mdot .8533 .58078 Mdot .88402 .60056 Mdot .91475 .61132 Mdot .94547 .60312 Mdot .97619 .54495 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztWltPE0EUXnpZUQmXREn0QRuhFREl8YYaNcADiEqiRnjAa4OYlkRBwESN 8uDdRI0+qTH+B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BdnSBi6IPAr0BF+nAN67l2EmKO8+0Ei/GOl74vdIPkFtI933wWJP4H2 8u4dSMAPoD3G3IuJkXOtHmCxfLWCZA6onXdvhFMTJP4FakJrM0/RAPcGJOUP kGzdyFPUw13uAZsgo1o3qNDK3WkTYVJf0wu0/pW/fJhKPdxsIGhlBHNELJK5 kKzyvc5XLfMaCZn/iHCa9QSbrkY3IXM5oK3lkSRnStg3IwW5PFq4TJgann6Z QHGIz/6VPq6/DZke8O5Qz1v+iNdT4MJvwa2a/9vCMj0=\ \>"], ImageRangeCache->{{{0, 359}, {221.375, 0}} -> {-3.83627, -0.00305423, \ 0.125452, 0.000249446}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["z", RowBox[{"v", "-", "1"}]], " ", SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"w", "-", "1"}]]}], RowBox[{"2", " ", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]], "+", FractionBox[ RowBox[{ SuperscriptBox["z", RowBox[{"x", "-", "1"}]], " ", SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "z"}], ")"}], RowBox[{"y", "-", "1"}]]}], RowBox[{"2", " ", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}], "/.", "\[InvisibleSpace]", RowBox[{"{", RowBox[{ RowBox[{"v", "\[Rule]", "1.2`"}], ",", RowBox[{"w", "\[Rule]", "3.6`"}], ",", RowBox[{"x", "\[Rule]", "3.6`"}], ",", RowBox[{"y", "\[Rule]", "1.2`"}]}], "}"}]}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "1"}], "}"}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.952381 0.0147151 0.461936 [ [.21429 .00222 -9 -9 ] [.21429 .00222 9 0 ] [.40476 .00222 -9 -9 ] [.40476 .00222 9 0 ] [.59524 .00222 -9 -9 ] [.59524 .00222 9 0 ] [.78571 .00222 -9 -9 ] [.78571 .00222 9 0 ] [.97619 .00222 -3 -9 ] [.97619 .00222 3 0 ] [.01131 .1071 -18 -4.5 ] [.01131 .1071 0 4.5 ] [.01131 .19949 -18 -4.5 ] [.01131 .19949 0 4.5 ] [.01131 .29188 -18 -4.5 ] [.01131 .29188 0 4.5 ] [.01131 .38426 -18 -4.5 ] [.01131 .38426 0 4.5 ] [.01131 .47665 -6 -4.5 ] [.01131 .47665 0 4.5 ] [.01131 .56904 -18 -4.5 ] [.01131 .56904 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .21429 .01472 m .21429 .02097 L s [(0.2)] .21429 .00222 0 1 Mshowa .40476 .01472 m .40476 .02097 L s [(0.4)] .40476 .00222 0 1 Mshowa .59524 .01472 m .59524 .02097 L s [(0.6)] .59524 .00222 0 1 Mshowa .78571 .01472 m .78571 .02097 L s [(0.8)] .78571 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(1)] .97619 .00222 0 1 Mshowa .125 Mabswid .07143 .01472 m .07143 .01847 L s .11905 .01472 m .11905 .01847 L s .16667 .01472 m .16667 .01847 L s .2619 .01472 m .2619 .01847 L s .30952 .01472 m .30952 .01847 L s .35714 .01472 m .35714 .01847 L s .45238 .01472 m .45238 .01847 L s .5 .01472 m .5 .01847 L s .54762 .01472 m .54762 .01847 L s .64286 .01472 m .64286 .01847 L s .69048 .01472 m .69048 .01847 L s .7381 .01472 m .7381 .01847 L s .83333 .01472 m .83333 .01847 L s .88095 .01472 m .88095 .01847 L s .92857 .01472 m .92857 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .1071 m .03006 .1071 L s [(0.2)] .01131 .1071 1 0 Mshowa .02381 .19949 m .03006 .19949 L s [(0.4)] .01131 .19949 1 0 Mshowa .02381 .29188 m .03006 .29188 L s [(0.6)] .01131 .29188 1 0 Mshowa .02381 .38426 m .03006 .38426 L s [(0.8)] .01131 .38426 1 0 Mshowa .02381 .47665 m .03006 .47665 L s [(1)] .01131 .47665 1 0 Mshowa .02381 .56904 m .03006 .56904 L s [(1.2)] .01131 .56904 1 0 Mshowa .125 Mabswid .02381 .03781 m .02756 .03781 L s .02381 .06091 m .02756 .06091 L s .02381 .08401 m .02756 .08401 L s .02381 .1302 m .02756 .1302 L s .02381 .1533 m .02756 .1533 L s .02381 .17639 m .02756 .17639 L s .02381 .22259 m .02756 .22259 L s .02381 .24568 m .02756 .24568 L s .02381 .26878 m .02756 .26878 L s .02381 .31497 m .02756 .31497 L s .02381 .33807 m .02756 .33807 L s .02381 .36117 m .02756 .36117 L s .02381 .40736 m .02756 .40736 L s .02381 .43046 m .02756 .43046 L s .02381 .45355 m .02756 .45355 L s .02381 .49975 m .02756 .49975 L s .02381 .52284 m .02756 .52284 L s .02381 .54594 m .02756 .54594 L s .02381 .59214 m .02756 .59214 L s .02381 .61523 m .02756 .61523 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .05505 m .02499 .32998 L .02605 .37248 L .02729 .40393 L .02846 .4258 L .03053 .45479 L .03279 .4781 L .03527 .49797 L .0379 .51472 L .04262 .53759 L .04749 .55488 L .05205 .56718 L .05706 .57757 L .06244 .58602 L .06784 .5923 L .07069 .59491 L .07373 .59721 L .07664 .59901 L .07929 .60033 L .08197 .6014 L .08445 .60216 L .08687 .6027 L .08809 .60291 L .08943 .60308 L .09012 .60315 L .09077 .60321 L .09153 .60326 L .09221 .60329 L .09346 .60332 L .09416 .60332 L .09481 .6033 L .09598 .60326 L .09707 .60318 L .09826 .60307 L .09955 .60291 L .10217 .60249 L .10458 .60198 L .10932 .60067 L .11438 .59886 L .1235 .59468 L .1442 .58188 L .1857 .54809 L .22568 .51158 L .26415 .47678 L .30507 .44266 L .34447 .41427 L .38236 .39211 L .40344 .38222 L .4227 .3748 L .44262 .36881 L Mistroke .46152 .36473 L .47113 .36327 L .47641 .36265 L .48137 .36218 L .48601 .36183 L .48845 .36169 L .49102 .36157 L .4932 .36149 L .49435 .36146 L .49558 .36143 L .49672 .36141 L .49775 .3614 L .49879 .36139 L .49977 .36139 L .50091 .36139 L .50214 .3614 L .50331 .36142 L .50437 .36143 L .50555 .36146 L .50685 .3615 L .50945 .36159 L .51202 .36172 L .51477 .36188 L .51972 .36227 L .52469 .36277 L .52938 .36334 L .53815 .36468 L .5479 .36657 L .5582 .36902 L .57667 .37458 L .61461 .39057 L .655 .41392 L .69388 .44184 L .7352 .47621 L .77502 .51223 L .81332 .54722 L .83268 .56395 L .85407 .58064 L .8638 .58728 L .87429 .59352 L .8842 .59828 L .88897 .6001 L .8933 .60144 L .89557 .60201 L .89803 .60253 L .89938 .60276 L .90063 .60294 L .9019 .60309 L .90309 .60319 L .9041 .60326 L Mistroke .90519 .6033 L .9064 .60332 L .90751 .6033 L .90866 .60325 L .90992 .60315 L .9111 .60302 L .9122 .60286 L .91491 .60232 L .91745 .60159 L .91974 .60075 L .92222 .59962 L .92492 .59809 L .92778 .59613 L .93289 .59156 L .93785 .58561 L .94238 .57857 L .9476 .568 L .95254 .55478 L .95711 .5387 L .96133 .51901 L .96596 .48872 L .9683 .46764 L .96965 .45261 L .97088 .43611 L .97213 .41554 L .97344 .38685 L .97475 .3427 L .9755 .29871 L .97619 .05505 L Mfstroke % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztm11oHFUUxyfdnWy22SZtrEpTW+IXSjXVarWtVQt+pKKpVq2tVbGsITaL 1tY0bbXF+lkIWgQVaVFERBAfFBFERHxQRBAfFBHxQVREfBARH3wQRIi5d9Mz s7u/O3PvzKzdNIHs7sn/nPM/555779z5uLOhPDYyvKM8Vhkq960fLe8aqQzt 7hvYOToJ5do8r23E87wf+zwlT0yKU18Tk38TFfXleTern7yCfSXNUVJeSb6S +kFbUFJOSeeDtl205OsLtlJiFKqJbNQ/2lNL6jPHhAVpen6NVlMdS82JrQO0 y5xZ/IiczkvYwniPiwFzLGsRsH5L31KK0hUzKBh1XZPKNBcw27Gm02x3adg0 K04nYG5Nzddgnv081u75ZB6Xpm95+hmQruUJJ+7/ODY6IoaybVPrJ18aX/Vx mrgWdivUt4aqnRJaXEuiWi5Yl5L0cb6/FqtbXEs2IzW8poflXnDR34Otoe9R P7ort2gbdJgHWJelXRos6xjTMWfCCua+vTJj7Aq38K00tLVeq1suqyT6qxL0 RJxPUJ1msM/6zNAKG69n2xORNarsLkKzikaneIWMuOm8KLiGT8JIVwF+RtnS eTbZJeGOOkNN1pNe+LwvSYe18hybuUeXlveZ7ZVW9JmRvWK8d5zVihB9Azcv Wv3/1W7cxtUmMWNwC9C3HhLmM4KGe0btqZJrCinds3Fh9ML3Sewde4+/pf18 ny4tmq1n61ueUFUyPltMd0yye1znp4oR9eimyczpVpV8+voar1czW0XUJ8kq Epx6TIPRf+LN5xawnK1nE+p5REk9SjpqQ/yckgpK0k9/9KHsBRvHw2K+VCie AceOesdxJenDwDJJetzG8ZCYBw/3DpkdjdtdgoPVkyKtqsVMjI0q9w0iOfF4 XKS1tZh9eNvHoUHQg1K7dYI92sSgGjogoa4R6RG3oLQg7hfpOpEONLuAD4k0 KNLDzQ66V6SNIu2LGfvBs+qgYmMibRJpj83k2w1GmyO1DRQPinQnmO+yoSCj uyK1YQqt2SHmZZEesIl9v0jDtVic431gtB2wSgxZ3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ox[{"Table", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "30", ",", "1.2", ",", "3.6", ",", "3.6", ",", "1.2"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "30"}], "}"}]}], "]"}]}]], "Input"], Cell[BoxData["1.0000000000000127`"], "Output"] }, Open ]], Cell["Therefore the support function is", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"bimodal", " ", "beta"}], "-", RowBox[{"binomial", " ", "distribution"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sf", "[", RowBox[{"z_", ",", "n_", ",", "v_", ",", "w_", ",", "x_", ",", "y_"}], "]"}], ":=", RowBox[{ RowBox[{"Log", "[", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], "]"}], "+", RowBox[{"Log", "[", RowBox[{"z", "!"}], "]"}], "-", RowBox[{"Log", "[", RowBox[{"n", "!"}], "]"}], "-", RowBox[{"Log", "[", RowBox[{ FractionBox[ RowBox[{"Beta", "[", RowBox[{ RowBox[{"z", "+", "v"}], ",", RowBox[{"w", "+", "n", "-", "z"}]}], "]"}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"v", ",", "w"}], "]"}]}]], "+", FractionBox[ RowBox[{"Beta", "[", RowBox[{ RowBox[{"z", "+", "x"}], ",", RowBox[{"y", "+", "n", "-", "z"}]}], "]"}], RowBox[{"2", RowBox[{"Beta", "[", RowBox[{"x", ",", "y"}], "]"}]}]]}], "]"}]}]}]}]], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Bimodal Binomial", "Subsection"], Cell[BoxData[ RowBox[{ RowBox[{"f", "[", RowBox[{"z_", ",", "n_", ",", "p_", ",", "q_"}], "]"}], ":=", RowBox[{ RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{"2", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], SuperscriptBox["p", "z"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"n", "-", "z"}]]}], "+", RowBox[{ FractionBox[ RowBox[{"n", "!"}], RowBox[{"2", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}], RowBox[{"z", "!"}]}]], SuperscriptBox["q", "z"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "q"}], ")"}], RowBox[{"n", "-", "z"}]]}]}]}]], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"z", ",", RowBox[{"f", "[", RowBox[{"z", ",", "20", ",", "0.15`", ",", "0.45`"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "20"}], "}"}]}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.03`", "]"}]}]}], "]"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.047619 0.0147151 4.76921 [ [.2619 .00222 -3 -9 ] [.2619 .00222 3 0 ] [.5 .00222 -6 -9 ] [.5 .00222 6 0 ] [.7381 .00222 -6 -9 ] [.7381 .00222 6 0 ] [.97619 .00222 -6 -9 ] [.97619 .00222 6 0 ] [.01131 .1101 -24 -4.5 ] [.01131 .1101 0 4.5 ] [.01131 .20548 -24 -4.5 ] [.01131 .20548 0 4.5 ] [.01131 .30087 -24 -4.5 ] [.01131 .30087 0 4.5 ] [.01131 .39625 -24 -4.5 ] [.01131 .39625 0 4.5 ] [.01131 .49164 -18 -4.5 ] [.01131 .49164 0 4.5 ] [.01131 .58702 -24 -4.5 ] [.01131 .58702 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .2619 .01472 m .2619 .02097 L s [(5)] .2619 .00222 0 1 Mshowa .5 .01472 m .5 .02097 L s [(10)] .5 .00222 0 1 Mshowa .7381 .01472 m .7381 .02097 L s [(15)] .7381 .00222 0 1 Mshowa .97619 .01472 m .97619 .02097 L s [(20)] .97619 .00222 0 1 Mshowa .125 Mabswid .07143 .01472 m .07143 .01847 L s .11905 .01472 m .11905 .01847 L s .16667 .01472 m .16667 .01847 L s .21429 .01472 m .21429 .01847 L s .30952 .01472 m .30952 .01847 L s .35714 .01472 m .35714 .01847 L s .40476 .01472 m .40476 .01847 L s .45238 .01472 m .45238 .01847 L s .54762 .01472 m .54762 .01847 L s .59524 .01472 m .59524 .01847 L s .64286 .01472 m .64286 .01847 L s .69048 .01472 m .69048 .01847 L s .78571 .01472 m .78571 .01847 L s .83333 .01472 m .83333 .01847 L s .88095 .01472 m .88095 .01847 L s .92857 .01472 m .92857 .01847 L s .25 Mabswid 0 .01472 m 1 .01472 L s .02381 .1101 m .03006 .1101 L s [(0.02)] .01131 .1101 1 0 Mshowa .02381 .20548 m .03006 .20548 L s [(0.04)] .01131 .20548 1 0 Mshowa .02381 .30087 m .03006 .30087 L s [(0.06)] .01131 .30087 1 0 Mshowa .02381 .39625 m .03006 .39625 L s [(0.08)] .01131 .39625 1 0 Mshowa .02381 .49164 m .03006 .49164 L s [(0.1)] .01131 .49164 1 0 Mshowa .02381 .58702 m .03006 .58702 L s [(0.12)] .01131 .58702 1 0 Mshowa .125 Mabswid .02381 .03856 m .02756 .03856 L s .02381 .06241 m .02756 .06241 L s .02381 .08625 m .02756 .08625 L s .02381 .13395 m .02756 .13395 L s .02381 .15779 m .02756 .15779 L s .02381 .18164 m .02756 .18164 L s .02381 .22933 m .02756 .22933 L s .02381 .25318 m .02756 .25318 L s .02381 .27702 m .02756 .27702 L s .02381 .32471 m .02756 .32471 L s .02381 .34856 m .02756 .34856 L s .02381 .37241 m .02756 .37241 L s .02381 .4201 m .02756 .4201 L s .02381 .44394 m .02756 .44394 L s .02381 .46779 m .02756 .46779 L s .02381 .51548 m .02756 .51548 L s .02381 .53933 m .02756 .53933 L s .02381 .56317 m .02756 .56317 L s .02381 .61087 m .02756 .61087 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .03 w .02381 .10716 Mdot .07143 .34118 Mdot .11905 .56354 Mdot .16667 .60332 Mdot .21429 .48222 Mdot .2619 .34693 Mdot .30952 .3008 Mdot .35714 .344 Mdot .40476 .41269 Mdot .45238 .4395 Mdot .5 .3952 Mdot .54762 .29743 Mdot .59524 .18816 Mdot .64286 .10204 Mdot .69048 .05044 Mdot .7381 .02641 Mdot .78571 .0177 Mdot .83333 .01529 Mdot .88095 .01479 Mdot .92857 .01472 Mdot .97619 .01472 Mdot % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztWklPFFEQ7tlnWLxoFCQxEzXG5Q6KF5VlWDSeDMbbBInDQTGAAT1rIF41 arxqOHjVoJ5VDGcNJh484j/QeBrnVTP1erqruquXaRiFTHqq6321vnr1ut9w qTxfmbpZnp+eLBdLs+XblenJueLwzGyNlUoYRqJiGMaPoqHoao3culRrn+q0 uigOTc+or7SClxSVUVQKeQOuvDTyUqayW/CVMkzrYMZIErxhIY7iXQghew6u mQYeOI4hEDoSipMwKQDPxRBRjuCdJ3jpHe81hZPnWpfnaMS+6oL2lQXaQxty rBm+2ngjLrWcFnsKWlIoI11DwMoQo4ORrDDwFJSMuM7cEDcKsgONnlobFdcN DxMK4ToYcrwNfelAqpOg8ryePwhqV1QO4UAVCC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yZ5oLKp9vBXd4tM+55SzYdB7gH6p oybxeOPK2suvgmYg6VB0hzjJj4um16tnAk38E6yR+Avao2ra\ \>"], ImageRangeCache->{{{0, 359}, {221.375, 0}} -> {-2.15585, -0.0113496, \ 0.0788857, 0.000787648}}] }, Open ]], Cell["Sums to 1", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Plus", "@@", RowBox[{"Table", "[", RowBox[{ RowBox[{"f", "[", RowBox[{"z", ",", "20", ",", "0.3"}], "]"}], ",", RowBox[{"{", RowBox[{"z", ",", "0", ",", "20"}], "}"}]}], "]"}]}]], "Input"], Cell[BoxData["0.999999999999999`"], "Output"] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"bimodal", " ", "binomial"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sf", "[", RowBox[{"z_", ",", "n_", ",", "p_", ",", "q_"}], "]"}], ":=", RowBox[{ RowBox[{"Log", "[", RowBox[{"2", RowBox[{ RowBox[{"(", RowBox[{"n", "-", "z"}], ")"}], "!"}]}], "]"}], "+", RowBox[{"Log", "[", RowBox[{"z", "!"}], "]"}], "-", RowBox[{"Log", "[", RowBox[{"n", "!"}], "]"}], "-", RowBox[{"Log", "[", RowBox[{ RowBox[{ SuperscriptBox["p", "z"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], RowBox[{"n", "-", "z"}]]}], "+", RowBox[{ SuperscriptBox["q", "z"], SuperscriptBox[ RowBox[{"(", RowBox[{"1", "-", "q"}], ")"}], RowBox[{"n", "-", "z"}]]}]}], "]"}]}]}]}]], "Input"] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Load data", "Subtitle"], Cell["\<\ This section will load data from a \"csv\" (Comma delimited) file in which \ each row is a replicate. Microsoft Excel can save worksheets in \"csv\" \ format. Each column should have a text heading. \t-start each heading with a small letter \t-do not have any spaces or periods in the column heading \t-the values for categorical variables need to be strings, not numbers \t Modify the location in the following line.\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"data", "=", RowBox[{"Import", "[", RowBox[{ "\"\\"", ",", "\"\\""}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4428609182747707`*^9, 3.44286094326597*^9}, { 3.4428609914387703`*^9, 3.44286100029957*^9}}], Cell["\<\ Alternatively. you can manually enter data. You can insert a matrix template \ by right-clicking and choosing \"Create Table/Matrix/Palette...\" The top \ row should be column headings with the text in quotation marks. Categorical \ variables should also be in quotation marks.\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"example", " ", "of", " ", "manual", " ", "data", " ", "entry"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"data", "=", TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"\"\\"", "\"\\"", "\"\\""}, {"0.23", "1", "\"\\""}, {"0.51", "0", "\"\\""} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}], ";"}], "*)"}]}]], "Input"], Cell["\<\ The ProcessData[ ] command will attempt to extract column headings from the \ data file. The column headings will be placed in \"labels\" and the \ remaining numbers will be left in \"data\". Categorical variables will be \ identified and dummy variables (i.e. 1 or 0) will be generated for each \ category.\ \>", "Text"], Cell[BoxData[ RowBox[{"ProcessData", "[", "data", "]"}]], "Input"], Cell["The following lines display the data and the column labels", "Text"], Cell[BoxData[ RowBox[{"MatrixForm", "[", "data", "]"}]], "Input"], Cell[CellGroupData[{ Cell[BoxData["labels"], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{"\<\"mInfl\"\>", ",", "\<\"height\"\>", ",", "\<\"area\"\>", ",", "\<\"density\"\>", ",", "\<\"normalizedDensity\"\>", ",", "\<\"knInfl\"\>", ",", "\<\"visits\"\>", ",", "\<\"species\"\>"}], "}"}]], "Output", CellChangeTimes->{3.4428610136687703`*^9}] }, Open ]], Cell[CellGroupData[{ Cell["special functions", "Subsection"], Cell["\<\ The CPlot[ ] function can be used to graph data from two columns\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"enter", " ", "column", " ", "labels"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"pObs", "=", RowBox[{"CPlot", "[", RowBox[{"mInfl", ",", "visits"}], "]"}]}]}]], "Input", CellChangeTimes->{3.4428610351031704`*^9}], Cell[BoxData[ GraphicsBox[ {Hue[0.67, 0.6, 0.6], PointSize[0.02], PointBox[CompressedData[" 1:eJx10jEKwkAQheHFassUKVJYRAkSxMJGBS3c0toTiGBhldZeGy28geARcwSV nRfYHzMQHsMu4ctkRsdmfxo453bf55f/axJiZpbLkJ7vrM9jhrPOLRtLb3m1 rGO2N+uHMf3d+jLm4ZHefz+tX8W8vODp86vkr0Lqd/Drexv08rfb1L+G38Pv 4N/QD6e9v/PbfDq/zju/S/05/LovfxFSfwV/Af8Efgd/Db9Kfs27z8/94fzp n8Kfwc/9yeGfwS9fVyH1q3rnD/8Yfu7/An4Pfw3/FP4c/jmcml/f/qjkz+DX /5S/hN/D7+Dn/hTwV/BX4QNqjlru "]]}, AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->True, BaseStyle->{FontFamily -> "Swiss721BT-Roman", FontSize -> 12}, Frame->True, FrameLabel->{ FormBox["\"mInfl\"", TraditionalForm], FormBox["\"visits\"", TraditionalForm]}, ImageSize->350, PlotRange->Automatic, PlotRangeClipping->True, PlotRegion->{{0, 1}, {0, 0.99}}]], "Output", CellChangeTimes->{3.4428610355399704`*^9}] }, Open ]], Cell["\<\ The SelectCases[ ] function can be used to select a subset of the data based \ on a categorical variable\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"SelectCases", "[", RowBox[{"mInfl", ",", "species", ",", "a"}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ "0", ",", "11", ",", "22", ",", "48", ",", "202", ",", "248", ",", "608", ",", "670", ",", "801", ",", "844", ",", "980", ",", "1886", ",", "0", ",", "11", ",", "22", ",", "48", ",", "202", ",", "248", ",", "608", ",", "670", ",", "801", ",", "844", ",", "980", ",", "1886", ",", "0", ",", "11", ",", "22", ",", "48"}], "}"}]], "Output"] }, Open ]], Cell["Use list to select multiple categories", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"SelectCases", "[", RowBox[{"mInfl", ",", "species", ",", RowBox[{"{", RowBox[{"a", ",", "b"}], "}"}]}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ "0", ",", "11", ",", "22", ",", "48", ",", "202", ",", "248", ",", "608", ",", "670", ",", "801", ",", "844", ",", "980", ",", "1886", ",", "0", ",", "11", ",", "22", ",", "48", ",", "202", ",", "248", ",", "608", ",", "670", ",", "801", ",", "844", ",", "980", ",", "1886", ",", "0", ",", "11", ",", "22", ",", "48", ",", "202", ",", "248", ",", "608", ",", "670", ",", "801", ",", "844", ",", "980", ",", "1886", ",", "0", ",", "11", ",", "22", ",", "48", ",", "202", ",", "248", ",", "608", ",", "670", ",", "801", ",", "844", ",", "980", ",", "1886", ",", "0", ",", "11", ",", "22", ",", "48"}], "}"}]], "Output"] }, Open ]], Cell["CPlot3D plots a 3D scatter plot ", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"CPlot3D", "[", RowBox[{"mInfl", ",", "knInfl", ",", "visits"}], "]"}], ";"}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .93784 %%ImageSize: 350 328.243 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics3D %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -5.13912e-017 1.051 -0.00812131 1.051 [ [.06435 .23672 -10.6875 -15.2975 ] [.06435 .23672 0 .14002 ] [.20877 .17799 -23.0905 -15.4375 ] [.20877 .17799 .97203 0 ] [.36196 .11571 -27.9816 -15.4375 ] [.36196 .11571 2.7684 0 ] [.52472 .04959 -26.4554 -15.4375 ] [.52472 .04959 4.29463 0 ] [.30204 .07249 -27.5833 -15.4375 ] [.30204 .07249 2.54168 0 ] [.70127 .00747 0 -10.8217 ] [.70127 .00747 10.6875 4.61577 ] [.78313 .13658 0 -10.5994 ] [.78313 .13658 17.375 4.83813 ] [.85603 .25155 0 -10.4067 ] [.85603 .25155 17.375 5.03076 ] [.92134 .35457 0 -10.2383 ] [.92134 .35457 17.375 5.19923 ] [.90404 .20771 0 -10.4432 ] [.90404 .20771 32.75 4.99432 ] [.04711 .26424 -10.6875 -4.60597 ] [.04711 .26424 0 10.8315 ] [.0272 .38903 -17.375 -4.7911 ] [.0272 .38903 0 10.6464 ] [.00552 .5249 -17.375 -4.99439 ] [.00552 .5249 0 10.4431 ] [-0.04178 .45806 -30.4375 -4.86005 ] [-0.04178 .45806 0 10.5775 ] [ 0 0 0 0 ] [ 1 .93784 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .06058 .25125 m .68123 0 L s .07373 .24593 m .07842 .25053 L s gsave .06435 .23672 -71.6875 -19.2975 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (0) show 1.000 setlinewidth grestore .21766 .18766 m .22211 .19249 L s gsave .20877 .17799 -84.0905 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (500) show 1.000 setlinewidth grestore .37029 .12587 m .37445 .13095 L s gsave .36196 .11571 -88.9816 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1000) show 1.000 setlinewidth grestore .5324 .06025 m .53624 .06557 L s gsave .52472 .04959 -87.4554 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1500) show 1.000 setlinewidth grestore .125 Mabswid .10186 .23454 m .10464 .23733 L s .13031 .22302 m .13307 .22584 L s .15909 .21137 m .16182 .21421 L s .18821 .19958 m .1909 .20246 L s .24747 .17559 m .25011 .17852 L s .27763 .16338 m .28023 .16634 L s .30815 .15103 m .31071 .15402 L s .33903 .13853 m .34156 .14155 L s .40192 .11307 m .40438 .11614 L s .43394 .1001 m .43637 .10321 L s .46636 .08698 m .46875 .09012 L s .49918 .0737 m .50152 .07686 L s .56604 .04663 m .56831 .04985 L s .60011 .03284 m .60233 .03609 L s .63461 .01887 m .63678 .02216 L s .66955 .00473 m .67167 .00805 L s gsave .30204 .07249 -88.5833 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (mInfl) show 89.125 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .25 Mabswid .68123 0 m .95005 .42356 L s .68908 .01237 m .68298 .01482 L s gsave .70127 .00747 -61 -14.8217 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (0) show 1.000 setlinewidth grestore .77083 .14117 m .76467 .14347 L s gsave .78313 .13658 -61 -14.5994 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (10) show 1.000 setlinewidth grestore .84362 .25587 m .83742 .25803 L s gsave .85603 .25155 -61 -14.4067 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (20) show 1.000 setlinewidth grestore .90885 .35865 m .90261 .36069 L s gsave .92134 .35457 -61 -14.2383 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (30) show 1.000 setlinewidth grestore .125 Mabswid .70622 .03939 m .70256 .04084 L s .72296 .06575 m .71928 .06718 L s .73929 .09149 m .73561 .0929 L s .75524 .11662 m .75156 .11802 L s .78605 .16516 m .78235 .16652 L s .80093 .18861 m .79723 .18995 L s .81548 .21153 m .81177 .21286 L s .82971 .23395 m .82599 .23526 L s .85723 .27732 m .8535 .2786 L s .87055 .2983 m .86682 .29957 L s .88359 .31885 m .87985 .3201 L s .89635 .33896 m .89261 .34019 L s .9211 .37794 m .91735 .37915 L s .93309 .39684 m .92933 .39803 L s .94484 .41535 m .94108 .41654 L s gsave .90404 .20771 -61 -14.4432 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (knInfl) show 91.750 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .25 Mabswid .06058 .25125 m 0 .63351 L s .0593 .25932 m .06539 .25687 L s gsave .04711 .26424 -71.6875 -8.60597 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (0) show 1.000 setlinewidth grestore .03948 .38437 m .04562 .38204 L s gsave .0272 .38903 -78.375 -8.7911 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (10) show 1.000 setlinewidth grestore .0179 .52052 m .0241 .51834 L s gsave .00552 .5249 -78.375 -8.99439 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (20) show 1.000 setlinewidth grestore .125 Mabswid .05546 .28351 m .05913 .28205 L s .05157 .3081 m .05523 .30665 L s .04761 .3331 m .05128 .33167 L s .04358 .35852 m .04726 .35711 L s .03531 .41067 m .039 .40929 L s .03107 .43742 m .03477 .43605 L s .02676 .46464 m .03046 .46329 L s .02237 .49233 m .02608 .491 L s .01336 .54922 m .01708 .54792 L s .00873 .57843 m .01246 .57715 L s .00401 .60817 m .00775 .60692 L s gsave -0.04178 .45806 -91.4375 -8.86005 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (visits) show 89.438 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .25 Mabswid .06058 .25125 m 0 .63351 L s 0 .63351 m .39895 .93784 L s .39895 .93784 m .41103 .59221 L s .41103 .59221 m .06058 .25125 L s .68123 0 m .95005 .42356 L s .95005 .42356 m 1 .78899 L s 1 .78899 m .70447 .40038 L s .70447 .40038 m .68123 0 L s .06058 .25125 m 0 .63351 L s 0 .63351 m .70447 .40038 L s .70447 .40038 m .68123 0 L s .68123 0 m .06058 .25125 L s .41103 .59221 m .95005 .42356 L s .95005 .42356 m 1 .78899 L s 1 .78899 m .39895 .93784 L s .39895 .93784 m .41103 .59221 L s 0 0 m 1 0 L 1 .93784 L 0 .93784 L closepath clip newpath .02 w .42103 .58755 Mdot .41403 .63433 Mdot .42618 .63063 Mdot .41567 .66812 Mdot .37068 .54179 Mdot .37294 .55219 Mdot .36678 .56538 Mdot .37908 .56144 Mdot .58843 .558 Mdot .47674 .66163 Mdot .57204 .57458 Mdot .43063 .55633 Mdot .46383 .71309 Mdot .31746 .49341 Mdot .62514 .59369 Mdot .32242 .50295 Mdot .637 .59013 Mdot .41622 .63106 Mdot .54397 .52023 Mdot .38192 .48299 Mdot .32632 .5474 Mdot .36798 .52212 Mdot .67706 .62694 Mdot .2767 .43671 Mdot .26303 .45278 Mdot .26886 .45074 Mdot .31265 .61089 Mdot .63116 .51643 Mdot .32954 .42955 Mdot .49645 .47987 Mdot .58202 .61786 Mdot .26002 .52328 Mdot .31389 .48143 Mdot .20724 .3857 Mdot .2102 .38462 Mdot .59468 .62676 Mdot .54592 .47565 Mdot .21783 .40459 Mdot .53368 .51631 Mdot .94743 .54813 Mdot .52711 .75048 Mdot .47744 .59665 Mdot .42734 .45492 Mdot .25803 .41336 Mdot .27089 .40876 Mdot .53639 .36926 Mdot .14686 .3267 Mdot .1529 .32439 Mdot .48345 .43596 Mdot .37563 .33569 Mdot .20076 .50535 Mdot .44396 .49883 Mdot .58747 .57577 Mdot .14386 .37372 Mdot .20028 .32925 Mdot .1527 .38216 Mdot .44425 .32264 Mdot .43112 .3394 Mdot .21205 .33648 Mdot .49552 .49464 Mdot .91954 .57156 Mdot .87024 .43512 Mdot .33205 .34023 Mdot .37153 .33834 Mdot .77319 .20359 Mdot .30873 .412 Mdot .83024 .39911 Mdot .38244 .3859 Mdot .72379 .10591 Mdot .37902 .66134 Mdot .4804 .64567 Mdot .42084 .52511 Mdot .25 Mabswid .68123 0 m .95005 .42356 L s .95005 .42356 m 1 .78899 L s 1 .78899 m .70447 .40038 L s .70447 .40038 m .68123 0 L s .06058 .25125 m 0 .63351 L s 0 .63351 m .70447 .40038 L s .70447 .40038 m .68123 0 L s .68123 0 m .06058 .25125 L s .06058 .25125 m .68123 0 L s .07373 .24593 m .07842 .25053 L s gsave .06435 .23672 -71.6875 -19.2975 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (0) show 1.000 setlinewidth grestore .21766 .18766 m .22211 .19249 L s gsave .20877 .17799 -84.0905 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (500) show 1.000 setlinewidth grestore .37029 .12587 m .37445 .13095 L s gsave .36196 .11571 -88.9816 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1000) show 1.000 setlinewidth grestore .5324 .06025 m .53624 .06557 L s gsave .52472 .04959 -87.4554 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1500) show 1.000 setlinewidth grestore .125 Mabswid .10186 .23454 m .10464 .23733 L s .13031 .22302 m .13307 .22584 L s .15909 .21137 m .16182 .21421 L s .18821 .19958 m .1909 .20246 L s .24747 .17559 m .25011 .17852 L s .27763 .16338 m .28023 .16634 L s .30815 .15103 m .31071 .15402 L s .33903 .13853 m .34156 .14155 L s .40192 .11307 m .40438 .11614 L s .43394 .1001 m .43637 .10321 L s .46636 .08698 m .46875 .09012 L s .49918 .0737 m .50152 .07686 L s .56604 .04663 m .56831 .04985 L s .60011 .03284 m .60233 .03609 L s .63461 .01887 m .63678 .02216 L s .66955 .00473 m .67167 .00805 L s gsave .30204 .07249 -88.5833 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (mInfl) show 89.125 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{350, 328.188}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztnQm0XlV1xz/y3kte5gFIIATeIwwJISEjJExJEIQwqhQEAYEQIGGSKYwS E4SIKIhQKTJaLGBRREChtdaKVtva1ra0tbW0SsuyWtFSxaEtXZrynXPy/3/3 vt+5735fXnS5Fm+Zj+u+5+z/PvM+e+9z7rEr164556KVa89btbL/iMtWXrLm vFWX9x9+8WWvkbq2aTSGjW00tvlBf6P5vKnR2Pyz6bX/xZ/xzZ8m+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J8a9fONfIBG5 DVYoY9zrRk9gEJCSH6bksZM3XoBEZOFeroyx86EjL/tt7JAxdorGv0EiMh37 BurYWFHRCSWj5IuUPFYdOgfJHDlPvT4WCd1/ZMKbLcSYI6pwQUBKPlPJo6cJ nWJkztpdGf8zZiRPFZl7+pXxRzHjSxKQkk9T8mjJRbcQbW596240WCY5abcL HS1k/HnM+LIEpOT+stmmmC7k+SGkrL5cwhulzTXDG+BRxRzJ+/WKZGwUb1rs KSZP8VU/UfJhxffpTEqo6y5R0y0a4Tn8jH+d8GtFaGzz/5k3/VA=\ \>"], ImageRangeCache->{{{0, 524}, {491.25, 0}} -> {-0.135484, -0.0745668, \ 0.00314501, 0.00314501}}] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["General maximum likelihood code", "Subtitle"], Cell["\<\ In addition, to these steps, one should first build a model and simulate the \ data\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"First", ",", " ", RowBox[{ "load", " ", "FinalTable", " ", "where", " ", "results", " ", "will", " ", "be", " ", "stored"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FinalTable", "=", RowBox[{"{", "}"}]}], ";"}]}]], "Input"], Cell[CellGroupData[{ Cell["Choose distribution for support function", "Subsection"], Cell["\<\ Choose your support function based on the probability density function, \ pre-build support functions are listed here\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"?", "sfPoisson"}], "\[IndentingNewLine]", RowBox[{"?", "sfNegBinom"}], "\[IndentingNewLine]", RowBox[{"?", "sfGenPoisson"}], "\[IndentingNewLine]", RowBox[{"?", "sfBinomial"}], "\[IndentingNewLine]", RowBox[{"?", "sfNormal"}], "\[IndentingNewLine]", RowBox[{"?", "sfBimodalNormal"}], "\[IndentingNewLine]", RowBox[{"?", "sfLogNormal"}], "\[IndentingNewLine]", RowBox[{"?", "sfBetaMean"}], "\[IndentingNewLine]", RowBox[{"?", "sfBetaMeanShape"}], "\[IndentingNewLine]", RowBox[{"?", "sfBetaBinomial"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.4434515281059604`*^9, 3.4434515323803606`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ StyleBox["\<\"sfPoisson[ data, \[Lambda]] is the support function for the \ Possion distribution where data is an integer value \[GreaterEqual] 0 and \ \[Lambda] is the mean\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.4434515387919607`*^9}, CellTags->"Info3443429938-2383494"], Cell[BoxData[ StyleBox["\<\"sfNegBinom[ data, m, k] is the support function for the \ Negative Binomial distribution where data is an integer value \[GreaterEqual] \ 0 and m is the mean and k is the shape parameter\"\>", "MSG"]], "Print", \ "PrintUsage", CellChangeTimes->{3.4434515389947605`*^9}, CellTags->"Info3443429938-1803889"], Cell[BoxData[ StyleBox["\<\"sfGenPoisson[ data, \[Lambda]1, \[Lambda]1] is the support \ function for the Generalized Possion distribution where data is an integer \ value \[GreaterEqual] 0 and \[Lambda]1 is the rate of moving from 0 to 1, and \ \[Lambda]2 is the slope of how that rate changes with subsequent categories\"\ \>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.44345153918196*^9}, CellTags->"Info3443429939-9873434"], Cell[BoxData[ StyleBox["\<\"sfBinomial[ success, trials, p] is the support function for \ the Binomial distribution where sucess is an integer value representing the \ number of successes in integer trails. p is the probability of success for \ each trial\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.4434515393379602`*^9}, CellTags->"Info3443429939-8718218"], Cell[BoxData[ StyleBox["\<\"sfNormal[ data, \[Mu], \[Sigma]] is the support function for \ the Normal distribution where data is any real number. \[Mu] is the mean and \ \[Sigma] is the standard deviation\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.4434515395251603`*^9}, CellTags->"Info3443429939-7367210"], Cell[BoxData[ StyleBox["\<\"sfBimodalNormal[ data, \[Mu]1, \[Sigma]1, \[Mu]2, \[Sigma]2] \ is the support function for the Bimodal Normal distribution where data is any \ real number. \[Mu]1 is the mean and \[Sigma]1 is the standard deviation of \ one mode and \[Mu]2 is the mean and \[Sigma]2 is the standard deviation of \ the other mode. Note, this formulation assumes equal weighting of the 2 \ modes.\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.4434515397435603`*^9}, CellTags->"Info3443429939-9703008"], Cell[BoxData[ StyleBox["\<\"sfLogNormal[ data, m, \[Sigma]] is the support function for \ the Log Normal distribution where data is a positive real number > 0. m is \ the median and \[Sigma] is the standard deviation of the ln(data)\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.44345153991516*^9}, CellTags->"Info3443429939-3920190"], Cell[BoxData[ StyleBox["\<\"sfBetaMean[ data, \[Mu], \[Sigma]] is the support function for \ the Beta distribution which has been transformed to explicity model the mean \ (\[Mu]) and standard deviation (\[Sigma]). Data is a real number between 0 \ and 1\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.4434515401491604`*^9}, CellTags->"Info3443429940-1746632"], Cell[BoxData[ StyleBox["\<\"sfBetaMeanShape[ data, \[Mu], s] is the support function for \ the Beta distribution which has been transformed to explicity model the mean \ (\[Mu]) and a shape parameter (s). Data is a real number between 0 and \ 1\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.4434515403363605`*^9}, CellTags->"Info3443429940-4642518"], Cell[BoxData[ StyleBox["\<\"sfBetaBinomial[ success, trials, m, s] is the support function \ for the BetaBinomial distribution where sucess is an integer value \ representing the number of successes in integer trails. Probability of \ sucess is Beta distributed with a mean probability m and a dispersion \ parameter s.\"\>", "MSG"]], "Print", "PrintUsage", CellChangeTimes->{3.4434515405235605`*^9}, CellTags->"Info3443429940-6121114"] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Model A: maximum likelihood estimates", "Subsection"], Cell["\<\ Customize the negative-log-likelihood function (ll) to reflect your model and \ your support function\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "ll", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ll", "[", "]"}], ":=", RowBox[{"Plus", "@@", "\[IndentingNewLine]", RowBox[{"sfNormal", "[", RowBox[{"visits", ",", RowBox[{"\[Beta]0", "+", RowBox[{"\[Beta]1", " ", "mInfl"}]}], ",", "\[Sigma]"}], "]"}]}]}], ";"}], " "}]}], "Input"], Cell["\<\ You should be able to use the following code without modification. If the \ likelihood surface is particularily complex, try alternative minization \ functions below. Constraints can be manually entered, see alternative \ minization functions below.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"vars", "=", RowBox[{"ProcessVars", "[", RowBox[{"ll", "[", "]"}], "]"}]}], ";", RowBox[{"constraints", "=", RowBox[{"ProcessConstraints", "[", "ll", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ans", "=", RowBox[{ RowBox[{"NMinimize", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ll", "[", "]"}], ",", "constraints"}], "}"}], ",", "vars"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"\[Beta]0", "\[Rule]", "3.92472234293477`"}], ",", RowBox[{"\[Beta]1", "\[Rule]", "0.004494198112611792`"}], ",", RowBox[{"\[Sigma]", "\[Rule]", "5.553741044504062`"}]}], "}"}]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"maxll", "=", RowBox[{ RowBox[{"ll", "[", "]"}], "/.", "ans"}]}]], "Input"], Cell[BoxData["225.6055413153368`"], "Output"] }, Open ]], Cell[BoxData[{ RowBox[{ RowBox[{"modelName", "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"FinalTable", ",", RowBox[{"{", RowBox[{"maxll", ",", RowBox[{"Length", "[", "vars", "]"}], ",", "modelName"}], "}"}]}], "]"}], ";"}]}], "Input"], Cell["Plot model and data", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{"pPred", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{"\[Beta]0", "+", RowBox[{"\[Beta]1", " ", "mInfl"}]}], "/.", "\[InvisibleSpace]", "ans"}], ",", RowBox[{"{", RowBox[{"mInfl", ",", RowBox[{"Min", "[", "mInfl", "]"}], ",", RowBox[{"Max", "[", "mInfl", "]"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{"pObs", ",", "pPred"}], "]"}]}], "Input"], Cell[CellGroupData[{ Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.0238095 0.000504974 -0.25783 0.0694431 [ [.15005 .00744 -9 -9 ] [.15005 .00744 9 0 ] [.2763 .00744 -9 -9 ] [.2763 .00744 9 0 ] [.40254 .00744 -9 -9 ] [.40254 .00744 9 0 ] [.52878 .00744 -12 -9 ] [.52878 .00744 12 0 ] [.65503 .00744 -12 -9 ] [.65503 .00744 12 0 ] [.78127 .00744 -12 -9 ] [.78127 .00744 12 0 ] [.90751 .00744 -12 -9 ] [.90751 .00744 12 0 ] [.01131 .15883 -6 -4.5 ] [.01131 .15883 0 4.5 ] [.01131 .29772 -6 -4.5 ] [.01131 .29772 0 4.5 ] [.01131 .4366 -12 -4.5 ] [.01131 .4366 0 4.5 ] [.01131 .57549 -12 -4.5 ] [.01131 .57549 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .15005 .01994 m .15005 .02619 L s [(250)] .15005 .00744 0 1 Mshowa .2763 .01994 m .2763 .02619 L s [(500)] .2763 .00744 0 1 Mshowa .40254 .01994 m .40254 .02619 L s [(750)] .40254 .00744 0 1 Mshowa .52878 .01994 m .52878 .02619 L s [(1000)] .52878 .00744 0 1 Mshowa .65503 .01994 m .65503 .02619 L s [(1250)] .65503 .00744 0 1 Mshowa .78127 .01994 m .78127 .02619 L s [(1500)] .78127 .00744 0 1 Mshowa .90751 .01994 m .90751 .02619 L s [(1750)] .90751 .00744 0 1 Mshowa .125 Mabswid .04906 .01994 m .04906 .02369 L s .07431 .01994 m .07431 .02369 L s .09956 .01994 m .09956 .02369 L s .1248 .01994 m .1248 .02369 L s .1753 .01994 m .1753 .02369 L s .20055 .01994 m .20055 .02369 L s .2258 .01994 m .2258 .02369 L s .25105 .01994 m .25105 .02369 L s .30155 .01994 m .30155 .02369 L s .32679 .01994 m .32679 .02369 L s .35204 .01994 m .35204 .02369 L s .37729 .01994 m .37729 .02369 L s .42779 .01994 m .42779 .02369 L s .45304 .01994 m .45304 .02369 L s .47829 .01994 m .47829 .02369 L s .50353 .01994 m .50353 .02369 L s .55403 .01994 m .55403 .02369 L s .57928 .01994 m .57928 .02369 L s .60453 .01994 m .60453 .02369 L s .62978 .01994 m .62978 .02369 L s .68028 .01994 m .68028 .02369 L s .70552 .01994 m .70552 .02369 L s .73077 .01994 m .73077 .02369 L s .75602 .01994 m .75602 .02369 L s .80652 .01994 m .80652 .02369 L s .83177 .01994 m .83177 .02369 L s .85702 .01994 m .85702 .02369 L s .88227 .01994 m .88227 .02369 L s .93276 .01994 m .93276 .02369 L s .95801 .01994 m .95801 .02369 L s .98326 .01994 m .98326 .02369 L s .25 Mabswid 0 .01994 m 1 .01994 L s .02381 .15883 m .03006 .15883 L s [(6)] .01131 .15883 1 0 Mshowa .02381 .29772 m .03006 .29772 L s [(8)] .01131 .29772 1 0 Mshowa .02381 .4366 m .03006 .4366 L s [(10)] .01131 .4366 1 0 Mshowa .02381 .57549 m .03006 .57549 L s [(12)] .01131 .57549 1 0 Mshowa .125 Mabswid .02381 .05466 m .02756 .05466 L s .02381 .08939 m .02756 .08939 L s .02381 .12411 m .02756 .12411 L s .02381 .19355 m .02756 .19355 L s .02381 .22827 m .02756 .22827 L s .02381 .26299 m .02756 .26299 L s .02381 .33244 m .02756 .33244 L s .02381 .36716 m .02756 .36716 L s .02381 .40188 m .02756 .40188 L s .02381 .47132 m .02756 .47132 L s .02381 .50604 m .02756 .50604 L s .02381 .54077 m .02756 .54077 L s .02381 .61021 m .02756 .61021 L s .25 Mabswid .02381 0 m .02381 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .5 Mabswid .02381 .01472 m .06244 .03859 L .10458 .06463 L .14415 .08909 L .18221 .11261 L .22272 .13765 L .26171 .16175 L .30316 .18736 L .34309 .21204 L .3815 .23578 L .42237 .26104 L .46172 .28536 L .49955 .30874 L .53984 .33364 L .57861 .3576 L .61984 .38308 L .65954 .40762 L .69774 .43123 L .73838 .45635 L .77751 .48053 L .81909 .50623 L .85916 .53099 L .89771 .55482 L .93871 .58016 L .97619 .60332 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztnAlsVFUUhqedspR9KbLbCqIsoiyKRQyILBJJKSIGBQmUWikgUssuAgoi KhIXFDVE3AnBoIj7Eo3ESAiRqEQi7kENkRCJSiSooXbuDOfOGc9/zgzzRiiW wO2bc7/z33PfO+/Nfe+8UlQyp7xsZsmcaaUlBVdUllSUTyudXTB8VmW1KZwV CmVtqf7XoCAU2a4KhY43VdV/q16ONKHQ4MiPuhFzTmQrJ7JVh7bOFGx+q8BJ hENRUacqqrSNbNWLbIVVvTzistWo8lLWq5NkpO3jdkoC7kKqRuNtDj4epNrH tdplWL+jYAuf0JicbxuYbvJj5v2Px6yboePYJtp7udDVIEWp/Aynbf0amqIS l+q+lXTt/RF8yqV6DGLpNUToyj2J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oZlO0iqJk8+85uM9zBaQj VpSOkcS5dh7FqCimfdwWCB2xinOAK/GFNJd2RnboK/FFpNPGOHsWCx2tDJ8l pG6RtxPZ0iCXCR3NDJ/lpG6RvmStVKtdu1LoaGj4pPK7U/77RHkwlbKq0h/K +geF4UFo\ \>"], ImageRangeCache->{{{0, 431}, {265.875, 0}} -> {-121.412, 3.34958, 7.18671, \ 0.0522601}}], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 %%ImageSize: 350 216.312 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % PlotRegion 0 1 0 .99 MPlotRegion % Scaling calculations 0.0238095 0.000504974 0.0147151 0.0218001 [ [.02381 -0.0125 -5.34375 -15.4375 ] [.02381 -0.0125 5.34375 0 ] [.15005 -0.0125 -12.0313 -15.4375 ] [.15005 -0.0125 12.0313 0 ] [.2763 -0.0125 -12.0313 -15.4375 ] [.2763 -0.0125 12.0313 0 ] [.40254 -0.0125 -12.0313 -15.4375 ] [.40254 -0.0125 12.0313 0 ] [.52878 -0.0125 -15.375 -15.4375 ] [.52878 -0.0125 15.375 0 ] [.65503 -0.0125 -15.375 -15.4375 ] [.65503 -0.0125 15.375 0 ] [.78127 -0.0125 -15.375 -15.4375 ] [.78127 -0.0125 15.375 0 ] [.90751 -0.0125 -15.375 -15.4375 ] [.90751 -0.0125 15.375 0 ] [ 0 0 -0.125 0 ] [.5 -0.0125 -15.0625 -30.875 ] [.5 -0.0125 15.0625 -15.4375 ] [-0.0125 .01472 -10.6875 -7.71875 ] [-0.0125 .01472 0 7.71875 ] [-0.0125 .12372 -10.6875 -7.71875 ] [-0.0125 .12372 0 7.71875 ] [-0.0125 .23272 -17.375 -7.71875 ] [-0.0125 .23272 0 7.71875 ] [-0.0125 .34172 -17.375 -7.71875 ] [-0.0125 .34172 0 7.71875 ] [-0.0125 .45072 -17.375 -7.71875 ] [-0.0125 .45072 0 7.71875 ] [-0.0125 .55972 -17.375 -7.71875 ] [-0.0125 .55972 0 7.71875 ] [ 0 0 -0.125 0 ] [-0.01875 .30902 -32.8125 -15.2188 ] [-0.01875 .30902 -17.375 15.2188 ] [ 0 .61803 .125 0 ] [ 1 0 .125 0 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .02381 0 m .02381 .00625 L s gsave .02381 -0.0125 -66.3438 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (0) show 1.000 setlinewidth grestore .15005 0 m .15005 .00625 L s gsave .15005 -0.0125 -73.0313 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (250) show 1.000 setlinewidth grestore .2763 0 m .2763 .00625 L s gsave .2763 -0.0125 -73.0313 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (500) show 1.000 setlinewidth grestore .40254 0 m .40254 .00625 L s gsave .40254 -0.0125 -73.0313 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (750) show 1.000 setlinewidth grestore .52878 0 m .52878 .00625 L s gsave .52878 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1000) show 1.000 setlinewidth grestore .65503 0 m .65503 .00625 L s gsave .65503 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1250) show 1.000 setlinewidth grestore .78127 0 m .78127 .00625 L s gsave .78127 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1500) show 1.000 setlinewidth grestore .90751 0 m .90751 .00625 L s gsave .90751 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1750) show 1.000 setlinewidth grestore .125 Mabswid .04906 0 m .04906 .00375 L s .07431 0 m .07431 .00375 L s .09956 0 m .09956 .00375 L s .1248 0 m .1248 .00375 L s .1753 0 m .1753 .00375 L s .20055 0 m .20055 .00375 L s .2258 0 m .2258 .00375 L s .25105 0 m .25105 .00375 L s .30155 0 m .30155 .00375 L s .32679 0 m .32679 .00375 L s .35204 0 m .35204 .00375 L s .37729 0 m .37729 .00375 L s .42779 0 m .42779 .00375 L s .45304 0 m .45304 .00375 L s .47829 0 m .47829 .00375 L s .50353 0 m .50353 .00375 L s .55403 0 m .55403 .00375 L s .57928 0 m .57928 .00375 L s .60453 0 m .60453 .00375 L s .62978 0 m .62978 .00375 L s .68028 0 m .68028 .00375 L s .70552 0 m .70552 .00375 L s .73077 0 m .73077 .00375 L s .75602 0 m .75602 .00375 L s .80652 0 m .80652 .00375 L s .83177 0 m .83177 .00375 L s .85702 0 m .85702 .00375 L s .88227 0 m .88227 .00375 L s .93276 0 m .93276 .00375 L s .95801 0 m .95801 .00375 L s .98326 0 m .98326 .00375 L s .25 Mabswid 0 0 m 1 0 L s gsave .5 -0.0125 -76.0625 -34.875 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (mInfl) show 89.125 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore 0 .01472 m .00625 .01472 L s gsave -0.0125 .01472 -71.6875 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (0) show 1.000 setlinewidth grestore 0 .12372 m .00625 .12372 L s gsave -0.0125 .12372 -71.6875 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (5) show 1.000 setlinewidth grestore 0 .23272 m .00625 .23272 L s gsave -0.0125 .23272 -78.375 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (10) show 1.000 setlinewidth grestore 0 .34172 m .00625 .34172 L s gsave -0.0125 .34172 -78.375 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (15) show 1.000 setlinewidth grestore 0 .45072 m .00625 .45072 L s gsave -0.0125 .45072 -78.375 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (20) show 1.000 setlinewidth grestore 0 .55972 m .00625 .55972 L s gsave -0.0125 .55972 -78.375 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (25) show 1.000 setlinewidth grestore .125 Mabswid 0 .03652 m .00375 .03652 L s 0 .05832 m .00375 .05832 L s 0 .08012 m .00375 .08012 L s 0 .10192 m .00375 .10192 L s 0 .14552 m .00375 .14552 L s 0 .16732 m .00375 .16732 L s 0 .18912 m .00375 .18912 L s 0 .21092 m .00375 .21092 L s 0 .25452 m .00375 .25452 L s 0 .27632 m .00375 .27632 L s 0 .29812 m .00375 .29812 L s 0 .31992 m .00375 .31992 L s 0 .36352 m .00375 .36352 L s 0 .38532 m .00375 .38532 L s 0 .40712 m .00375 .40712 L s 0 .42892 m .00375 .42892 L s 0 .47252 m .00375 .47252 L s 0 .49432 m .00375 .49432 L s 0 .51612 m .00375 .51612 L s 0 .53792 m .00375 .53792 L s 0 .58152 m .00375 .58152 L s 0 .60332 m .00375 .60332 L s .25 Mabswid 0 0 m 0 .61803 L s gsave -0.01875 .30902 -101.313 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 76.2188 11.7188 translate 90 rotate -76.2188 -11.7188 translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (visits) show 89.438 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor 0.000 0.000 rmoveto 1.000 setlinewidth grestore .02381 .61178 m .02381 .61803 L s .15005 .61178 m .15005 .61803 L s .2763 .61178 m .2763 .61803 L s .40254 .61178 m .40254 .61803 L s .52878 .61178 m .52878 .61803 L s .65503 .61178 m .65503 .61803 L s .78127 .61178 m .78127 .61803 L s .90751 .61178 m .90751 .61803 L s .125 Mabswid .04906 .61428 m .04906 .61803 L s .07431 .61428 m .07431 .61803 L s .09956 .61428 m .09956 .61803 L s .1248 .61428 m .1248 .61803 L s .1753 .61428 m .1753 .61803 L s .20055 .61428 m .20055 .61803 L s .2258 .61428 m .2258 .61803 L s .25105 .61428 m .25105 .61803 L s .30155 .61428 m .30155 .61803 L s .32679 .61428 m .32679 .61803 L s .35204 .61428 m .35204 .61803 L s .37729 .61428 m .37729 .61803 L s .42779 .61428 m .42779 .61803 L s .45304 .61428 m .45304 .61803 L s .47829 .61428 m .47829 .61803 L s .50353 .61428 m .50353 .61803 L s .55403 .61428 m .55403 .61803 L s .57928 .61428 m .57928 .61803 L s .60453 .61428 m .60453 .61803 L s .62978 .61428 m .62978 .61803 L s .68028 .61428 m .68028 .61803 L s .70552 .61428 m .70552 .61803 L s .73077 .61428 m .73077 .61803 L s .75602 .61428 m .75602 .61803 L s .80652 .61428 m .80652 .61803 L s .83177 .61428 m .83177 .61803 L s .85702 .61428 m .85702 .61803 L s .88227 .61428 m .88227 .61803 L s .93276 .61428 m .93276 .61803 L s .95801 .61428 m .95801 .61803 L s .98326 .61428 m .98326 .61803 L s .25 Mabswid 0 .61803 m 1 .61803 L s .99375 .01472 m 1 .01472 L s .99375 .12372 m 1 .12372 L s .99375 .23272 m 1 .23272 L s .99375 .34172 m 1 .34172 L s .99375 .45072 m 1 .45072 L s .99375 .55972 m 1 .55972 L s .125 Mabswid .99625 .03652 m 1 .03652 L s .99625 .05832 m 1 .05832 L s .99625 .08012 m 1 .08012 L s .99625 .10192 m 1 .10192 L s .99625 .14552 m 1 .14552 L s .99625 .16732 m 1 .16732 L s .99625 .18912 m 1 .18912 L s .99625 .21092 m 1 .21092 L s .99625 .25452 m 1 .25452 L s .99625 .27632 m 1 .27632 L s .99625 .29812 m 1 .29812 L s .99625 .31992 m 1 .31992 L s .99625 .36352 m 1 .36352 L s .99625 .38532 m 1 .38532 L s .99625 .40712 m 1 .40712 L s .99625 .42892 m 1 .42892 L s .99625 .47252 m 1 .47252 L s .99625 .49432 m 1 .49432 L s .99625 .51612 m 1 .51612 L s .99625 .53792 m 1 .53792 L s .99625 .58152 m 1 .58152 L s .99625 .60332 m 1 .60332 L s .25 Mabswid 1 0 m 1 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .02 w .02381 .01472 Mdot .02936 .10192 Mdot .03492 .01472 Mdot .04805 .12372 Mdot .12581 .05832 Mdot .14904 .08012 Mdot .33083 .27632 Mdot .36214 .16732 Mdot .42829 .18912 Mdot .45001 .27632 Mdot .51868 .51612 Mdot .97619 .01472 Mdot .02381 .01472 Mdot .02936 .01472 Mdot .03492 .23272 Mdot .04805 .05832 Mdot .12581 .10192 Mdot .14904 .10192 Mdot .33083 .03652 Mdot .36214 .58152 Mdot .42829 .08012 Mdot .45001 .05832 Mdot .51868 .60332 Mdot .97619 .05832 Mdot .02381 .03652 Mdot .02936 .16732 Mdot .03492 .03652 Mdot .04805 .01472 Mdot .12581 .12372 Mdot .14904 .03652 Mdot .33083 .14552 Mdot .36214 .23272 Mdot .42829 .14552 Mdot .45001 .25452 Mdot .51868 .05832 Mdot .97619 .27632 Mdot .02381 .01472 Mdot .02936 .23272 Mdot .03492 .03652 Mdot .04805 .12372 Mdot .12581 .10192 Mdot .14904 .03652 Mdot .33083 .29812 Mdot .36214 .10192 Mdot .42829 .18912 Mdot .45001 .12372 Mdot .51868 .31992 Mdot .97619 .23272 Mdot .02381 .05832 Mdot .02936 .01472 Mdot .03492 .03652 Mdot .04805 .05832 Mdot .12581 .21092 Mdot .14904 .08012 Mdot .33083 .47252 Mdot .36214 .08012 Mdot .42829 .27632 Mdot .45001 .29812 Mdot .51868 .12372 Mdot .97619 .36352 Mdot .02381 .10192 Mdot .02936 .16732 Mdot .03492 .01472 Mdot .04805 .10192 Mdot .12581 .27632 Mdot .14904 .18912 Mdot .33083 .08012 Mdot .36214 .05832 Mdot .42829 .14552 Mdot .45001 .14552 Mdot .51868 .23272 Mdot .97619 .23272 Mdot .5 Mabswid .02381 .10027 m .06244 .10777 L .10458 .11595 L .14415 .12362 L .18221 .13101 L .22272 .13887 L .26171 .14643 L .30316 .15447 L .34309 .16222 L .3815 .16967 L .42237 .1776 L .46172 .18524 L .49955 .19258 L .53984 .20039 L .57861 .20792 L .61984 .21591 L .65954 .22362 L .69774 .23103 L .73838 .23891 L .77751 .24651 L .81909 .25457 L .85916 .26235 L .89771 .26983 L .93871 .27778 L .97619 .28505 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{350, 216.313}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztXFlslFUUHjrTzrSllO7YUtqCUIosRXwQVEjEiDUh2CiSSDAWXOABlSVo ggkmrggh0RgNiYmJSzQxLjEY44PiEqJRMcqDGogPPBjj9uISfTG1/53ynf63 55459///GaZhmmZ6eu8937lnudv57/zrR/Zuv2PnyN4d20Z61+0euXf7jm17 eq+9Z/dYUXpaKlXVkEpNu6Y3FdCjqdS5j9Gx3/xHY/ARFBerYGbwURVITTNU FUNlmDLiOFPBrmBHwU6jZdqFSLWcZAG7JoUGqXM/nJScq51Vxhsmr3Fqwo/c YQuUaqsLiJwDiOkFtLdaZt31DbDTxPrSzEFJFwwHfzKBLv3wagZlNaB6mDKr 1tgmx9TORi3HS1R7eDw4+9KhxLPaOfs3kDfFDXDrAohPoywDqpspI4rCJMvU dqG2WkRpY0zB9aVdidfOmILr38K8KTYws8yCMCM3b1kcXcp2HNXNdFhG6Qy3 U8jgqNawQb30bWPa+WvexmiutUH/BPdZzfsLg1llTvcpymgUVCs5OgsbT1HW 6mM8q0zhPi+UrLcNBPctBFUvQvTFcJWMnLSDskq5ZNC6RJwhSxNcMKDsyNRx QU6pUdm4YBGotFL81J7Ear31LetJ7JIwY9alWJdYywntCZc5eZN2UJ1SozZl /2Rn5JQoehcYavJhjDNOl2d7hZs80MxefvyAOZo/waRi+7HJBcpNc7p+Nhfu Z3TzOcFzTGOdGCFU5ou94kR2ibWcRr3MBMfx0lHOOuvHdr8/KNe/5sJQWpM4 objFgAOd6FLrfDCfKSOwLFM7W6zlqD42SCWUWQGVgRIRT27NIoqsZQt4q731 Jd46b83HXUWZh35QGYaSMw/G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orP L0SeKeo/kzKyXsgZZRtCOJQ+irJ+03MK7rUaUbaEy4DIvS8wCiJ9V417dVZ5 nBDo4M+9R6rQ3p3Sa9yLbKL0J3nEJQxOothW7HFUFGxK/FAeNMpIoWdo8oGa kkHmf8/vU1LCyvzfW1RuU0OZPtNA9a1Xi6enjHVM1DvlsopUVtry5ilu9jQe o6kpRgb0POmTlOnLOZ4q4zTMU+a76AR2RMXcRdfHwlke5lbtbxW743j728ip ZW6fnEyiWN4vR8kHc7tksmeULLB2b3wUUsz/wjdDaJcs54OfRa353/ObIZ7c psZcufX8FojF4/nV35LqGNljlX3SBblPSvoVeLQEct8+KtLL8LSKldNLCytl lRdklqqs0BcBzSZn4rtnR/Olox4vsU1N+x8dcCYi\ \>"], ImageRangeCache->{{{0, 524}, {323.438, 3.25}} -> {-381.847, -6.13954, \ 6.8388, 0.158413}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Categorical Examples", "Subsubsection"], Cell["\<\ Use the function Categorical to create seperate parameters for each category \ in a categorical variable. In this case, individual \[Beta]0 parameters will \ be fit for each species. \ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "ll", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ll", "[", "]"}], ":=", RowBox[{"Plus", "@@", "\[IndentingNewLine]", RowBox[{"sfNormal", "[", RowBox[{"visits", ",", RowBox[{ RowBox[{"Categorical", "[", RowBox[{"\[Beta]0", ",", "species"}], "]"}], "+", RowBox[{"\[Beta]1", " ", "mInfl"}]}], ",", "\[Sigma]"}], "]"}]}]}], ";"}], " "}]}], "Input"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"vars", "=", RowBox[{"ProcessVars", "[", RowBox[{"ll", "[", "]"}], "]"}]}], ";", RowBox[{"constraints", "=", RowBox[{"ProcessConstraints", "[", "ll", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ans", "=", RowBox[{ RowBox[{"NMinimize", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ll", "[", "]"}], ",", "constraints"}], "}"}], ",", "vars"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"\[Beta]1", "\[Rule]", "0.004396013291378708`"}], ",", RowBox[{"\[Sigma]", "\[Rule]", "5.513699625752262`"}], ",", RowBox[{ SubscriptBox["\[Beta]0", "a"], "\[Rule]", "3.9313686853242555`"}], ",", RowBox[{ SubscriptBox["\[Beta]0", "b"], "\[Rule]", "3.2264331861411533`"}], ",", RowBox[{ SubscriptBox["\[Beta]0", "c"], "\[Rule]", "4.939523329819687`"}]}], "}"}]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"pObs", "=", RowBox[{"CPlot", "[", RowBox[{ RowBox[{"SelectCases", "[", RowBox[{"mInfl", ",", "species", ",", "a"}], "]"}], ",", RowBox[{"SelectCases", "[", RowBox[{"visits", ",", "species", ",", "a"}], "]"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"pPred", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[Beta]0", "a"], "+", RowBox[{"\[Beta]1", " ", "mInfl"}]}], "/.", "\[InvisibleSpace]", "ans"}], ",", RowBox[{"{", RowBox[{"mInfl", ",", RowBox[{"Min", "[", "mInfl", "]"}], ",", RowBox[{"Max", "[", "mInfl", "]"}]}], "}"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{"pObs", ",", "pPred", ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}], "\[IndentingNewLine]", RowBox[{}], "\[IndentingNewLine]", RowBox[{ RowBox[{"pObs", "=", RowBox[{"CPlot", "[", RowBox[{ RowBox[{"SelectCases", "[", RowBox[{"mInfl", ",", "species", ",", "b"}], "]"}], ",", RowBox[{"SelectCases", "[", RowBox[{"visits", ",", "species", ",", "b"}], "]"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"pPred", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[Beta]0", "b"], "+", RowBox[{"\[Beta]1", " ", "mInfl"}]}], "/.", "\[InvisibleSpace]", "ans"}], ",", RowBox[{"{", RowBox[{"mInfl", ",", RowBox[{"Min", "[", "mInfl", "]"}], ",", RowBox[{"Max", "[", "mInfl", "]"}]}], "}"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{"pObs", ",", "pPred", ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}]}], "Input"], Cell[CellGroupData[{ Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 %%ImageSize: 350 216.312 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % PlotRegion 0 1 0 .99 MPlotRegion % Scaling calculations 0.0238095 0.000504974 0.0147151 0.0218001 [ [.02381 -0.0125 -5.34375 -15.4375 ] [.02381 -0.0125 5.34375 0 ] [.15005 -0.0125 -12.0313 -15.4375 ] [.15005 -0.0125 12.0313 0 ] [.2763 -0.0125 -12.0313 -15.4375 ] [.2763 -0.0125 12.0313 0 ] [.40254 -0.0125 -12.0313 -15.4375 ] [.40254 -0.0125 12.0313 0 ] [.52878 -0.0125 -15.375 -15.4375 ] [.52878 -0.0125 15.375 0 ] [.65503 -0.0125 -15.375 -15.4375 ] [.65503 -0.0125 15.375 0 ] [.78127 -0.0125 -15.375 -15.4375 ] [.78127 -0.0125 15.375 0 ] [.90751 -0.0125 -15.375 -15.4375 ] [.90751 -0.0125 15.375 0 ] [ 0 0 -0.125 0 ] [-0.0125 .01472 -10.6875 -7.71875 ] [-0.0125 .01472 0 7.71875 ] [-0.0125 .12372 -10.6875 -7.71875 ] [-0.0125 .12372 0 7.71875 ] [-0.0125 .23272 -17.375 -7.71875 ] [-0.0125 .23272 0 7.71875 ] [-0.0125 .34172 -17.375 -7.71875 ] [-0.0125 .34172 0 7.71875 ] [-0.0125 .45072 -17.375 -7.71875 ] [-0.0125 .45072 0 7.71875 ] [-0.0125 .55972 -17.375 -7.71875 ] [-0.0125 .55972 0 7.71875 ] [ 0 0 -0.125 0 ] [ 0 .61803 .125 0 ] [ 1 0 .125 0 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .02381 0 m .02381 .00625 L s gsave .02381 -0.0125 -66.3438 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (0) show 1.000 setlinewidth grestore .15005 0 m .15005 .00625 L s gsave .15005 -0.0125 -73.0313 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (250) show 1.000 setlinewidth grestore .2763 0 m .2763 .00625 L s gsave .2763 -0.0125 -73.0313 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (500) show 1.000 setlinewidth grestore .40254 0 m .40254 .00625 L s gsave .40254 -0.0125 -73.0313 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (750) show 1.000 setlinewidth grestore .52878 0 m .52878 .00625 L s gsave .52878 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1000) show 1.000 setlinewidth grestore .65503 0 m .65503 .00625 L s gsave .65503 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1250) show 1.000 setlinewidth grestore .78127 0 m .78127 .00625 L s gsave .78127 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1500) show 1.000 setlinewidth grestore .90751 0 m .90751 .00625 L s gsave .90751 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1750) show 1.000 setlinewidth grestore .125 Mabswid .04906 0 m .04906 .00375 L s .07431 0 m .07431 .00375 L s .09956 0 m .09956 .00375 L s .1248 0 m .1248 .00375 L s .1753 0 m .1753 .00375 L s .20055 0 m .20055 .00375 L s .2258 0 m .2258 .00375 L s .25105 0 m .25105 .00375 L s .30155 0 m .30155 .00375 L s .32679 0 m .32679 .00375 L s .35204 0 m .35204 .00375 L s .37729 0 m .37729 .00375 L s .42779 0 m .42779 .00375 L s .45304 0 m .45304 .00375 L s .47829 0 m .47829 .00375 L s .50353 0 m .50353 .00375 L s .55403 0 m .55403 .00375 L s .57928 0 m .57928 .00375 L s .60453 0 m .60453 .00375 L s .62978 0 m .62978 .00375 L s .68028 0 m .68028 .00375 L s .70552 0 m .70552 .00375 L s .73077 0 m .73077 .00375 L s .75602 0 m .75602 .00375 L s .80652 0 m .80652 .00375 L s .83177 0 m .83177 .00375 L s .85702 0 m .85702 .00375 L s .88227 0 m .88227 .00375 L s .93276 0 m .93276 .00375 L s .95801 0 m .95801 .00375 L s .98326 0 m .98326 .00375 L s .25 Mabswid 0 0 m 1 0 L s 0 .01472 m .00625 .01472 L s gsave -0.0125 .01472 -71.6875 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (0) show 1.000 setlinewidth grestore 0 .12372 m .00625 .12372 L s gsave -0.0125 .12372 -71.6875 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (5) show 1.000 setlinewidth grestore 0 .23272 m .00625 .23272 L s gsave -0.0125 .23272 -78.375 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (10) show 1.000 setlinewidth grestore 0 .34172 m .00625 .34172 L s gsave -0.0125 .34172 -78.375 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (15) show 1.000 setlinewidth grestore 0 .45072 m .00625 .45072 L s gsave -0.0125 .45072 -78.375 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (20) show 1.000 setlinewidth grestore 0 .55972 m .00625 .55972 L s gsave -0.0125 .55972 -78.375 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (25) show 1.000 setlinewidth grestore .125 Mabswid 0 .03652 m .00375 .03652 L s 0 .05832 m .00375 .05832 L s 0 .08012 m .00375 .08012 L s 0 .10192 m .00375 .10192 L s 0 .14552 m .00375 .14552 L s 0 .16732 m .00375 .16732 L s 0 .18912 m .00375 .18912 L s 0 .21092 m .00375 .21092 L s 0 .25452 m .00375 .25452 L s 0 .27632 m .00375 .27632 L s 0 .29812 m .00375 .29812 L s 0 .31992 m .00375 .31992 L s 0 .36352 m .00375 .36352 L s 0 .38532 m .00375 .38532 L s 0 .40712 m .00375 .40712 L s 0 .42892 m .00375 .42892 L s 0 .47252 m .00375 .47252 L s 0 .49432 m .00375 .49432 L s 0 .51612 m .00375 .51612 L s 0 .53792 m .00375 .53792 L s 0 .58152 m .00375 .58152 L s 0 .60332 m .00375 .60332 L s .25 Mabswid 0 0 m 0 .61803 L s .02381 .61178 m .02381 .61803 L s .15005 .61178 m .15005 .61803 L s .2763 .61178 m .2763 .61803 L s .40254 .61178 m .40254 .61803 L s .52878 .61178 m .52878 .61803 L s .65503 .61178 m .65503 .61803 L s .78127 .61178 m .78127 .61803 L s .90751 .61178 m .90751 .61803 L s .125 Mabswid .04906 .61428 m .04906 .61803 L s .07431 .61428 m .07431 .61803 L s .09956 .61428 m .09956 .61803 L s .1248 .61428 m .1248 .61803 L s .1753 .61428 m .1753 .61803 L s .20055 .61428 m .20055 .61803 L s .2258 .61428 m .2258 .61803 L s .25105 .61428 m .25105 .61803 L s .30155 .61428 m .30155 .61803 L s .32679 .61428 m .32679 .61803 L s .35204 .61428 m .35204 .61803 L s .37729 .61428 m .37729 .61803 L s .42779 .61428 m .42779 .61803 L s .45304 .61428 m .45304 .61803 L s .47829 .61428 m .47829 .61803 L s .50353 .61428 m .50353 .61803 L s .55403 .61428 m .55403 .61803 L s .57928 .61428 m .57928 .61803 L s .60453 .61428 m .60453 .61803 L s .62978 .61428 m .62978 .61803 L s .68028 .61428 m .68028 .61803 L s .70552 .61428 m .70552 .61803 L s .73077 .61428 m .73077 .61803 L s .75602 .61428 m .75602 .61803 L s .80652 .61428 m .80652 .61803 L s .83177 .61428 m .83177 .61803 L s .85702 .61428 m .85702 .61803 L s .88227 .61428 m .88227 .61803 L s .93276 .61428 m .93276 .61803 L s .95801 .61428 m .95801 .61803 L s .98326 .61428 m .98326 .61803 L s .25 Mabswid 0 .61803 m 1 .61803 L s .99375 .01472 m 1 .01472 L s .99375 .12372 m 1 .12372 L s .99375 .23272 m 1 .23272 L s .99375 .34172 m 1 .34172 L s .99375 .45072 m 1 .45072 L s .99375 .55972 m 1 .55972 L s .125 Mabswid .99625 .03652 m 1 .03652 L s .99625 .05832 m 1 .05832 L s .99625 .08012 m 1 .08012 L s .99625 .10192 m 1 .10192 L s .99625 .14552 m 1 .14552 L s .99625 .16732 m 1 .16732 L s .99625 .18912 m 1 .18912 L s .99625 .21092 m 1 .21092 L s .99625 .25452 m 1 .25452 L s .99625 .27632 m 1 .27632 L s .99625 .29812 m 1 .29812 L s .99625 .31992 m 1 .31992 L s .99625 .36352 m 1 .36352 L s .99625 .38532 m 1 .38532 L s .99625 .40712 m 1 .40712 L s .99625 .42892 m 1 .42892 L s .99625 .47252 m 1 .47252 L s .99625 .49432 m 1 .49432 L s .99625 .51612 m 1 .51612 L s .99625 .53792 m 1 .53792 L s .99625 .58152 m 1 .58152 L s .99625 .60332 m 1 .60332 L s .25 Mabswid 1 0 m 1 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .02 w .02381 .01472 Mdot .02936 .10192 Mdot .03492 .01472 Mdot .04805 .12372 Mdot .12581 .05832 Mdot .14904 .08012 Mdot .33083 .27632 Mdot .36214 .16732 Mdot .42829 .18912 Mdot .45001 .27632 Mdot .51868 .51612 Mdot .97619 .01472 Mdot .02381 .01472 Mdot .02936 .01472 Mdot .03492 .23272 Mdot .04805 .05832 Mdot .12581 .10192 Mdot .14904 .10192 Mdot .33083 .03652 Mdot .36214 .58152 Mdot .42829 .08012 Mdot .45001 .05832 Mdot .51868 .60332 Mdot .97619 .05832 Mdot .02381 .03652 Mdot .02936 .16732 Mdot .03492 .03652 Mdot .04805 .01472 Mdot .5 Mabswid .02381 .10042 m .06244 .10775 L .10458 .11575 L .14415 .12326 L .18221 .13048 L .22272 .13817 L .26171 .14557 L .30316 .15343 L .34309 .16101 L .3815 .1683 L .42237 .17606 L .46172 .18353 L .49955 .19071 L .53984 .19835 L .57861 .20571 L .61984 .21353 L .65954 .22107 L .69774 .22832 L .73838 .23603 L .77751 .24346 L .81909 .25135 L .85916 .25895 L .89771 .26627 L .93871 .27405 L .97619 .28116 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{350, 216.313}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztXF1oXUUQvklubm6SNj9tbJqkNTf9SWiT2h+1thWpFFsRKig+9EWREJRW LZUYxJ9SRCvYqrVorVoQHxTBF/VBwTfBHwRfVIpCUfyBPuiDv9AHEYw9c+M3 2dPZPbN7T25Oklv0ZDK7883szOye2T0n5+bRif13HRydODA2WrpxfPT+/QfG HijtOTR+kdVQl8vVL87l6m4o5SJ6Mpf7/zJ58b/ypT26ROwZYFwZ/chHCocj qhhRefAKoNYIPKZWR1R9RBWF1gG0SrJM9aFf3mnLCm+8gtO+obIrtkQ/ChFj PdQ3gJcHtUrgxVpJVZPQWkJroxOlV3CFZEufN17Bad9g2RWbox8NEaMe1HpT kI2rN/sxVVL2k6gBwWA3Sr/ZT6FDonpMh3qNt1fo5z/yHmHkWh+snRa+WPfh ZLAYzxo+BY9nQaNSoj/ZeQqel/NiPEX4vCxo8vaBI3wjoFqdEIMVhMqNnHaA mpR6OSwtVdDmCMEGpSFzJwRF5YgyE4IrQDUsiEWs2Xu8mV7ENpqCTbaBlZyt ktLVJs8qm3aAWpQj6lXap52vbhR9CIgqN+em/ZOcU/LsrwiTBxrV/DkqcoiK /q84jstsoNIyp7OzO9nOcPdZ7S0KnXVqHK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HCusp54M eUgf71oZmIFqrvploPSVKe1HliQev3iT40eGNlCtIs8JV/vCW7Zs5q8YNcyT Ec1Fmz3/Vqk2iea3zfNlHFmYOnSXm/7x3skyd9LjK8C5uv8AN5HxVg==\ \>"], ImageRangeCache->{{{0, 524}, {323.438, 3.25}} -> {-225.151, -3.50339, \ 6.30566, 0.146063}}], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 %%ImageSize: 350 216.312 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % PlotRegion 0 1 0 .99 MPlotRegion % Scaling calculations 0.0238095 0.000504974 0.0147151 0.0420431 [ [.02381 -0.0125 -5.34375 -15.4375 ] [.02381 -0.0125 5.34375 0 ] [.15005 -0.0125 -12.0313 -15.4375 ] [.15005 -0.0125 12.0313 0 ] [.2763 -0.0125 -12.0313 -15.4375 ] [.2763 -0.0125 12.0313 0 ] [.40254 -0.0125 -12.0313 -15.4375 ] [.40254 -0.0125 12.0313 0 ] [.52878 -0.0125 -15.375 -15.4375 ] [.52878 -0.0125 15.375 0 ] [.65503 -0.0125 -15.375 -15.4375 ] [.65503 -0.0125 15.375 0 ] [.78127 -0.0125 -15.375 -15.4375 ] [.78127 -0.0125 15.375 0 ] [.90751 -0.0125 -15.375 -15.4375 ] [.90751 -0.0125 15.375 0 ] [ 0 0 -0.125 0 ] [-0.0125 .01472 -10.6875 -7.71875 ] [-0.0125 .01472 0 7.71875 ] [-0.0125 .0988 -10.6875 -7.71875 ] [-0.0125 .0988 0 7.71875 ] [-0.0125 .18289 -10.6875 -7.71875 ] [-0.0125 .18289 0 7.71875 ] [-0.0125 .26697 -10.6875 -7.71875 ] [-0.0125 .26697 0 7.71875 ] [-0.0125 .35106 -10.6875 -7.71875 ] [-0.0125 .35106 0 7.71875 ] [-0.0125 .43515 -17.375 -7.71875 ] [-0.0125 .43515 0 7.71875 ] [-0.0125 .51923 -17.375 -7.71875 ] [-0.0125 .51923 0 7.71875 ] [-0.0125 .60332 -17.375 -7.71875 ] [-0.0125 .60332 0 7.71875 ] [ 0 0 -0.125 0 ] [ 0 .61803 .125 0 ] [ 1 0 .125 0 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .02381 0 m .02381 .00625 L s gsave .02381 -0.0125 -66.3438 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (0) show 1.000 setlinewidth grestore .15005 0 m .15005 .00625 L s gsave .15005 -0.0125 -73.0313 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (250) show 1.000 setlinewidth grestore .2763 0 m .2763 .00625 L s gsave .2763 -0.0125 -73.0313 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (500) show 1.000 setlinewidth grestore .40254 0 m .40254 .00625 L s gsave .40254 -0.0125 -73.0313 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (750) show 1.000 setlinewidth grestore .52878 0 m .52878 .00625 L s gsave .52878 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1000) show 1.000 setlinewidth grestore .65503 0 m .65503 .00625 L s gsave .65503 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1250) show 1.000 setlinewidth grestore .78127 0 m .78127 .00625 L s gsave .78127 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1500) show 1.000 setlinewidth grestore .90751 0 m .90751 .00625 L s gsave .90751 -0.0125 -76.375 -19.4375 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (1750) show 1.000 setlinewidth grestore .125 Mabswid .04906 0 m .04906 .00375 L s .07431 0 m .07431 .00375 L s .09956 0 m .09956 .00375 L s .1248 0 m .1248 .00375 L s .1753 0 m .1753 .00375 L s .20055 0 m .20055 .00375 L s .2258 0 m .2258 .00375 L s .25105 0 m .25105 .00375 L s .30155 0 m .30155 .00375 L s .32679 0 m .32679 .00375 L s .35204 0 m .35204 .00375 L s .37729 0 m .37729 .00375 L s .42779 0 m .42779 .00375 L s .45304 0 m .45304 .00375 L s .47829 0 m .47829 .00375 L s .50353 0 m .50353 .00375 L s .55403 0 m .55403 .00375 L s .57928 0 m .57928 .00375 L s .60453 0 m .60453 .00375 L s .62978 0 m .62978 .00375 L s .68028 0 m .68028 .00375 L s .70552 0 m .70552 .00375 L s .73077 0 m .73077 .00375 L s .75602 0 m .75602 .00375 L s .80652 0 m .80652 .00375 L s .83177 0 m .83177 .00375 L s .85702 0 m .85702 .00375 L s .88227 0 m .88227 .00375 L s .93276 0 m .93276 .00375 L s .95801 0 m .95801 .00375 L s .98326 0 m .98326 .00375 L s .25 Mabswid 0 0 m 1 0 L s 0 .01472 m .00625 .01472 L s gsave -0.0125 .01472 -71.6875 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (0) show 1.000 setlinewidth grestore 0 .0988 m .00625 .0988 L s gsave -0.0125 .0988 -71.6875 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (2) show 1.000 setlinewidth grestore 0 .18289 m .00625 .18289 L s gsave -0.0125 .18289 -71.6875 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (4) show 1.000 setlinewidth grestore 0 .26697 m .00625 .26697 L s gsave -0.0125 .26697 -71.6875 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (6) show 1.000 setlinewidth grestore 0 .35106 m .00625 .35106 L s gsave -0.0125 .35106 -71.6875 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (8) show 1.000 setlinewidth grestore 0 .43515 m .00625 .43515 L s gsave -0.0125 .43515 -78.375 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (10) show 1.000 setlinewidth grestore 0 .51923 m .00625 .51923 L s gsave -0.0125 .51923 -78.375 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (12) show 1.000 setlinewidth grestore 0 .60332 m .00625 .60332 L s gsave -0.0125 .60332 -78.375 -11.7188 Mabsadd m 1 1 Mabs scale currentpoint translate 0 23.4375 translate 1 -1 scale /g { setgray} bind def /k { setcmykcolor} bind def /p { gsave} bind def /r { setrgbcolor} bind def /w { setlinewidth} bind def /C { curveto} bind def /F { fill} bind def /L { lineto} bind def /rL { rlineto} bind def /P { grestore} bind def /s { stroke} bind def /S { show} bind def /N {currentpoint 3 -1 roll show moveto} bind def /Msf { findfont exch scalefont [1 0 0 -1 0 0 ] makefont setfont} bind def /m { moveto} bind def /Mr { rmoveto} bind def /Mx {currentpoint exch pop moveto} bind def /My {currentpoint pop exch moveto} bind def /X {0 rmoveto} bind def /Y {0 exch rmoveto} bind def 63.000 15.813 moveto %%IncludeResource: font Swiss721BT-Roman %%IncludeFont: Swiss721BT-Roman /Swiss721BT-Roman findfont 12.000 scalefont [1 0 0 -1 0 0 ] makefont setfont 0.000 0.000 0.000 setrgbcolor (14) show 1.000 setlinewidth grestore .125 Mabswid 0 .03574 m .00375 .03574 L s 0 .05676 m .00375 .05676 L s 0 .07778 m .00375 .07778 L s 0 .11982 m .00375 .11982 L s 0 .14084 m .00375 .14084 L s 0 .16187 m .00375 .16187 L s 0 .20391 m .00375 .20391 L s 0 .22493 m .00375 .22493 L s 0 .24595 m .00375 .24595 L s 0 .288 m .00375 .288 L s 0 .30902 m .00375 .30902 L s 0 .33004 m .00375 .33004 L s 0 .37208 m .00375 .37208 L s 0 .3931 m .00375 .3931 L s 0 .41412 m .00375 .41412 L s 0 .45617 m .00375 .45617 L s 0 .47719 m .00375 .47719 L s 0 .49821 m .00375 .49821 L s 0 .54025 m .00375 .54025 L s 0 .56128 m .00375 .56128 L s 0 .5823 m .00375 .5823 L s .25 Mabswid 0 0 m 0 .61803 L s .02381 .61178 m .02381 .61803 L s .15005 .61178 m .15005 .61803 L s .2763 .61178 m .2763 .61803 L s .40254 .61178 m .40254 .61803 L s .52878 .61178 m .52878 .61803 L s .65503 .61178 m .65503 .61803 L s .78127 .61178 m .78127 .61803 L s .90751 .61178 m .90751 .61803 L s .125 Mabswid .04906 .61428 m .04906 .61803 L s .07431 .61428 m .07431 .61803 L s .09956 .61428 m .09956 .61803 L s .1248 .61428 m .1248 .61803 L s .1753 .61428 m .1753 .61803 L s .20055 .61428 m .20055 .61803 L s .2258 .61428 m .2258 .61803 L s .25105 .61428 m .25105 .61803 L s .30155 .61428 m .30155 .61803 L s .32679 .61428 m .32679 .61803 L s .35204 .61428 m .35204 .61803 L s .37729 .61428 m .37729 .61803 L s .42779 .61428 m .42779 .61803 L s .45304 .61428 m .45304 .61803 L s .47829 .61428 m .47829 .61803 L s .50353 .61428 m .50353 .61803 L s .55403 .61428 m .55403 .61803 L s .57928 .61428 m .57928 .61803 L s .60453 .61428 m .60453 .61803 L s .62978 .61428 m .62978 .61803 L s .68028 .61428 m .68028 .61803 L s .70552 .61428 m .70552 .61803 L s .73077 .61428 m .73077 .61803 L s .75602 .61428 m .75602 .61803 L s .80652 .61428 m .80652 .61803 L s .83177 .61428 m .83177 .61803 L s .85702 .61428 m .85702 .61803 L s .88227 .61428 m .88227 .61803 L s .93276 .61428 m .93276 .61803 L s .95801 .61428 m .95801 .61803 L s .98326 .61428 m .98326 .61803 L s .25 Mabswid 0 .61803 m 1 .61803 L s .99375 .01472 m 1 .01472 L s .99375 .0988 m 1 .0988 L s .99375 .18289 m 1 .18289 L s .99375 .26697 m 1 .26697 L s .99375 .35106 m 1 .35106 L s .99375 .43515 m 1 .43515 L s .99375 .51923 m 1 .51923 L s .99375 .60332 m 1 .60332 L s .125 Mabswid .99625 .03574 m 1 .03574 L s .99625 .05676 m 1 .05676 L s .99625 .07778 m 1 .07778 L s .99625 .11982 m 1 .11982 L s .99625 .14084 m 1 .14084 L s .99625 .16187 m 1 .16187 L s .99625 .20391 m 1 .20391 L s .99625 .22493 m 1 .22493 L s .99625 .24595 m 1 .24595 L s .99625 .288 m 1 .288 L s .99625 .30902 m 1 .30902 L s .99625 .33004 m 1 .33004 L s .99625 .37208 m 1 .37208 L s .99625 .3931 m 1 .3931 L s .99625 .41412 m 1 .41412 L s .99625 .45617 m 1 .45617 L s .99625 .47719 m 1 .47719 L s .99625 .49821 m 1 .49821 L s .99625 .54025 m 1 .54025 L s .99625 .56128 m 1 .56128 L s .99625 .5823 m 1 .5823 L s .25 Mabswid 1 0 m 1 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .02 w .12581 .22493 Mdot .14904 .05676 Mdot .33083 .26697 Mdot .36214 .43515 Mdot .42829 .26697 Mdot .45001 .47719 Mdot .51868 .0988 Mdot .97619 .51923 Mdot .02381 .01472 Mdot .02936 .43515 Mdot .03492 .05676 Mdot .04805 .22493 Mdot .12581 .18289 Mdot .14904 .05676 Mdot .33083 .56128 Mdot .36214 .18289 Mdot .42829 .35106 Mdot .45001 .22493 Mdot .51868 .60332 Mdot .97619 .43515 Mdot .02381 .0988 Mdot .02936 .01472 Mdot .03492 .05676 Mdot .04805 .0988 Mdot .5 Mabswid .02381 .15036 m .06244 .16451 L .10458 .17993 L .14415 .19441 L .18221 .20834 L .22272 .22317 L .26171 .23744 L .30316 .25261 L .34309 .26722 L .3815 .28128 L .42237 .29624 L .46172 .31064 L .49955 .32449 L .53984 .33923 L .57861 .35342 L .61984 .36851 L .65954 .38305 L .69774 .39702 L .73838 .4119 L .77751 .42622 L .81909 .44144 L .85916 .45611 L .89771 .47022 L .93871 .48522 L .97619 .49894 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{350, 216.313}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztXAmoVkUU/v3f6tPXszL1Wb73u+vLzDZtod2yyCJsL4oeZpkQhRpFYdG+ SyVtEEQQRRFFFu25FBW5VLaXBUUQGFFE0UqY9/z2nTfXM3PPmf/+z2f+Uved OzPfd87MnJk5d+be//juhXPnXNS98MLZ3aUZ87svmXvh7AWloy+evymprl+h UGwtFPpNLxUSeWOh8N9l46b/ype25JIkVyFhWvKnPlHYlUjNiVSPtEZIo4U0 lkYlUjGRmoXcEnIlLEvDUa4+aMuuZr7GoH1d5aaYmvxpTBImQn0d0uohjRTS UrmkqknI7URuQ5ClXWgKyZbhZr7GoH0Ty02xX/KnLkkoQproAtm4oluOpU5l OUkqCQaHWTrccgodkjTMbVBTfduFcvaaDxNqrm2DCT26L1W8K5sslebtPkUa j4IGJaIju/EUaabGS6Upus9kQZO5DQLdtzukAUGKsRV0VZg57w5qUurlbmnp BW2BLpikNGTb6YJmZY36TBfsAaluu5jE+pvr26cnsckusMlXsc5grqR0lJvm xebdQS3KGrUr7dOO1zCLvgtIKmcXevyTGqfTWF7RTQY2ivkLFOSQlPxfcT/u 4iOVpjmdnUOy7YxvPq+9zUJhnZqAq0wIWiWp7AzmSjUaLUxwEpYf+coFzU3n bU47qWTfkGwqbZN4rZIWA4m0Z5dKzwepNCZrEnJLwVxJGiM6aYhlt0SqRyUi n9yGBFnCtRwKbIO5vqy3xVzzzV3FOw9dkOoFKbzzQKPPu1PQAaXhnYJhynLt Zr76oH2bdx54P2qS2yeNkHjHKZWW2nFKqWpwc4suQrF/5LWFJycpN7y/Jdm3 eT+qdzYA80iYXE7Y9G9dcumZmhoOzcq0/sq0SrB589Xq8f+pR2/Y0iCktZaH Dk3WNBcMrA2iWj220Xps5UE0IvlDS+sAoVAjcqcKufsLadN6odwEf3UoSk7F j1LESbFFC6Uk0vIMxtTDQ+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YjRnhZXim4zbziaq4JKYk29j0aGlIFxZAokVeNRET5WYx7i2XS7/CYl BsNRJt0bQ01+NqP7fXoTzS/30H1WmEu+scTFTNF4iVFPH2qhyvq2L3ttbQap HONd9avEw68iBD6j1ZJ9j4EReFGByfjbZml9zJVsA3IDH0+nyFISx15MtsVn 3dK2XvgzIqNlHAEXsj/wUTWhNwqrkiqJMRyZSO+ZVfKbU/zyvfQWWZV+zYoD RH4PtfZbd7V6bKv12Mq/dcdPR6nhRJNKz19llRYvoiq/jliW6dKrPyFb6Pcv ukeuiw==\ \>"], ImageRangeCache->{{{0, 524}, {323.438, 3.25}} -> {-243.972, -1.83561, \ 6.40834, 0.0769697}}] }, Open ]] }, Open ]], Cell["\<\ Categories can also be combined. In this case, species groups a and b are \ combined. \ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "ll", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"ll", "[", "]"}], ":=", RowBox[{"Plus", "@@", "\[IndentingNewLine]", RowBox[{"sfNormal", "[", RowBox[{"visits", ",", RowBox[{ RowBox[{"Categorical", "[", RowBox[{"\[Beta]0", ",", "species", ",", RowBox[{"{", RowBox[{ RowBox[{"a", "\[Rule]", "ab"}], ",", RowBox[{"b", "\[Rule]", "ab"}]}], "}"}]}], "]"}], "+", RowBox[{"\[Beta]1", " ", "mInfl"}]}], ",", "\[Sigma]"}], "]"}]}]}], ";"}], " "}]}], "Input"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"vars", "=", RowBox[{"ProcessVars", "[", RowBox[{"ll", "[", "]"}], "]"}]}], ";", RowBox[{"constraints", "=", RowBox[{"ProcessConstraints", "[", "ll", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ans", "=", RowBox[{ RowBox[{"NMinimize", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ll", "[", "]"}], ",", "constraints"}], "}"}], ",", "vars"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"\[Beta]1", "\[Rule]", "0.004363888380965827`"}], ",", RowBox[{"\[Sigma]", "\[Rule]", "5.5217554363663375`"}], ",", RowBox[{ SubscriptBox["\[Beta]0", "ab"], "\[Rule]", "3.621681312919491`"}], ",", RowBox[{ SubscriptBox["\[Beta]0", "c"], "\[Rule]", "4.959696188460926`"}]}], "}"}]], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Alternative Functions (if needed)", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "can", " ", "specify", " ", "parameter", " ", "constraints", " ", "directly"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"constraints", "=", RowBox[{ RowBox[{"a", ">", "0"}], "&&", RowBox[{"b", ">", "0"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ans", "=", RowBox[{ RowBox[{"NMinimize", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ll", "[", "]"}], ",", "constraints"}], "}"}], ",", "vars"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "can", " ", "specify", " ", "inital", " ", "rectangular", " ", "regions"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"upperguess", "=", RowBox[{"{", RowBox[{"12.0", ",", "8.0"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"lowerguess", "=", RowBox[{"{", RowBox[{"7.0", ",", "3.0"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ans", "=", RowBox[{ RowBox[{"NMinimize", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ll", "[", "]"}], ",", "constraints"}], "}"}], ",", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"vars", ",", "lowerguess", ",", "upperguess"}], "}"}], "]"}]}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"code", " ", "that", " ", "will", " ", "work", " ", "with", " ", RowBox[{"NMinimize", "[", "]"}]}], ",", " ", RowBox[{ "internally", " ", "this", " ", "uses", " ", "FindMinimum", " ", "from", " ", "random", " ", "starting", " ", "positions"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NMinimize", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ll", "[", "]"}], ",", "constraints"}], "}"}], ",", "vars", ",", RowBox[{"Method", "->", "\"\\""}]}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"guess", "=", RowBox[{"{", RowBox[{"50.0", ",", "7.0", ",", "3.0"}], "}"}]}], ";"}], " ", RowBox[{"(*", " ", RowBox[{ RowBox[{"initial", " ", "guess"}], ",", " ", RowBox[{"not", " ", "used", " ", "with", " ", "NMinimize"}], ",", " ", RowBox[{ "but", " ", "used", " ", "with", " ", "FindRoot", " ", "and", " ", "FindMinimum"}]}], " ", "*)"}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ "standard", " ", "form", " ", "of", " ", "FindRoot", " ", "uses", " ", "Newton", " ", "methods"}], ",", " ", RowBox[{ RowBox[{ "but", " ", "now", " ", "NMinimize", " ", "is", " ", "better", " ", "because", " ", "it", " ", "uses", " ", "Nelder"}], "-", RowBox[{"Mead", " ", "methods"}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"derv", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"ll", "[", "]"}], ",", "#"}], "]"}], "&"}], ",", "vars"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ans", "=", RowBox[{"FindRoot", "@@", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"Thread", "[", RowBox[{"derv", "\[Equal]", "0"}], "]"}], "}"}], ",", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"vars", ",", "guess"}], "}"}], "]"}]}], "]"}]}]}]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "slightly", " ", "different", " ", "form", " ", "of", " ", "FindRoot", " ", "that", " ", "you", " ", "can", " ", "also", " ", "try"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"ans", "=", RowBox[{"FindRoot", "@@", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"Thread", "[", RowBox[{"derv", "\[Equal]", "0"}], "]"}], "}"}], ",", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"vars", ",", "guess", ",", RowBox[{"guess", "*", "0.98"}]}], "}"}], "]"}]}], "]"}]}]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"if", " ", RowBox[{"FindRoot", "[", "]"}], " ", "does", " ", "not", " ", "work"}], ",", " ", RowBox[{"can", " ", "also", " ", "try", " ", RowBox[{"FindMinimum", "[", "]"}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"ans", "=", RowBox[{ RowBox[{"FindMinimum", "[", RowBox[{ RowBox[{"ll", "[", "]"}], ",", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"vars", ",", "guess"}], "}"}], "]"}]}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}]}]], "Input"], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", "\n", RowBox[{ RowBox[{ RowBox[{"guessRange", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0.`", ",", "3.`"}], "}"}], ",", RowBox[{"{", RowBox[{"0.`", ",", "2.`"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0.1`"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"seeds", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"RandomReal", "[", RowBox[{ "guessRange", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "]"}], ",", RowBox[{"{", "1000", "}"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "guessRange", "]"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"seedRes", "=", RowBox[{"Apply", "[", RowBox[{"ll", ",", "seeds", ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"guess", "=", RowBox[{"seeds", "\[LeftDoubleBracket]", RowBox[{ RowBox[{"Position", "[", RowBox[{"seedRes", ",", RowBox[{"Min", "[", RowBox[{"Cases", "[", RowBox[{"seedRes", ",", "_Real"}], "]"}], "]"}]}], "]"}], "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "\[RightDoubleBracket]"}]}], "\[IndentingNewLine]", RowBox[{"ll", "@@", "guess"}]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "more", " ", "explicit", " ", "ll", " ", "function", " ", "that", " ", "might", " ", "be", " ", "needed", " ", "for", " ", "specialized", " ", "data"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ll", "[", RowBox[{"m_", ",", "b_", ",", "\[Sigma]_"}], "]"}], ":=", RowBox[{"Plus", "@@", "\[IndentingNewLine]", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"sf", "[", RowBox[{ RowBox[{"data", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"m", "+", RowBox[{"b", "*", "i"}]}], ",", "\[Sigma]"}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "data", "]"}]}], "}"}]}], "]"}]}]}], ";"}], " "}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"can", " ", "specify", " ", "vars", " ", "list", " ", "directly"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"vars", "=", RowBox[{"{", RowBox[{"a", ",", "b", ",", "\[Sigma]"}], "}"}]}], ";"}]}]], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Confidence Intervals", "Subsection"], Cell["\<\ This function is for use with the NMinimize set-up. This code will automatically attempt to find confidence intervals for all \ functions. Note, you first need to execute llProfileFun[] above. It may \ take a long time, especially if it has problems with particular parameters.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"paramNo_", ",", "paramValue_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"tempVars", ",", "newans"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"tempVars", "=", RowBox[{"Drop", "[", RowBox[{"vars", ",", RowBox[{"{", "paramNo", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"newans", "=", RowBox[{ RowBox[{"NMinimize", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ll", "[", "]"}], ",", "constraints"}], "}"}], "/.", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "paramNo", "]"}], "]"}], "\[Rule]", "paramValue"}]}], ",", "tempVars"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ReplaceAll", "[", RowBox[{ RowBox[{"ll", "[", "]"}], ",", RowBox[{"Join", "[", RowBox[{"newans", ",", RowBox[{"{", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "paramNo", "]"}], "]"}], "\[Rule]", "paramValue"}], "}"}]}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ci", "=", RowBox[{"{", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ci", "=", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"AppendTo", "[", RowBox[{"ci", ",", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"paraMin", ",", "paraMax"}], "}"}], "/.", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"Hold", "[", RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"varNo", ",", "paraMin"}], "]"}], "==", RowBox[{"maxll", "+", "1.92"}]}], "]"}], ",", RowBox[{"{", RowBox[{"paraMin", ",", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ")"}], "*", "0.9"}]}], "}"}]}], "]"}]}], "/.", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"Hold", "[", RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"varNo", ",", "paraMax"}], "]"}], "==", RowBox[{"maxll", "+", "1.92"}]}], "]"}], ",", RowBox[{"{", RowBox[{"paraMax", ",", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ")"}], "*", "1.1"}]}], "}"}]}], "]"}]}]}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"varNo", ",", RowBox[{"Length", "[", "vars", "]"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"vars", ",", RowBox[{"vars", "/.", "ans"}], ",", "ci"}], "}"}], "]"}], "]"}]}], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"\[Beta]0", "0.08890109831919961`", RowBox[{"{", RowBox[{"0.07824181399236206`", ",", "0.09956038380983594`"}], "}"}]}, {"\[Sigma]", "0.05134350029945046`", RowBox[{"{", RowBox[{"0.04470069851799562`", ",", "0.05981041835349442`"}], "}"}]} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"check", " ", "to", " ", "see", " ", "if", " ", RowBox[{"c", ".", "i", ".", " ", "can"}], " ", "be", " ", "reported", " ", "as", " ", "mean"}], " ", "\[PlusMinus]", " ", RowBox[{"c", ".", "i", "."}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"vars", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"ci", "[", RowBox[{"[", RowBox[{"i", ",", "1"}], "]"}], "]"}], "-", RowBox[{"ans", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}]}], ",", RowBox[{ RowBox[{"ci", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}], "-", RowBox[{"ans", "[", RowBox[{"[", RowBox[{"i", ",", "2"}], "]"}], "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{"Length", "[", "vars", "]"}]}], "}"}]}], "]"}]}], "}"}], "]"}], "]"}]}]], "Input"], Cell[BoxData[ TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"\[Beta]0", RowBox[{"{", RowBox[{ RowBox[{"-", "0.010659284326837548`"}], ",", "0.010659285490636328`"}], "}"}]}, {"\[Sigma]", RowBox[{"{", RowBox[{ RowBox[{"-", "0.006642801781454835`"}], ",", "0.00846691805404396`"}], "}"}]} }], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell["For use with alternative functions", "Subsubsection"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "If", " ", "using", " ", "lowerguess", " ", "and", " ", "upperguess", " ", "vectors", " ", "to", " ", "constrain", " ", "NMinimize"}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "find", " ", "confidence", " ", "intervals", " ", "using", " ", "likelihood", " ", "profile"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"paramNo_", ",", "paramValue_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"tempVars", ",", "newans"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"tempVars", "=", RowBox[{"Drop", "[", RowBox[{"vars", ",", RowBox[{"{", "paramNo", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"tempUpperguess", "=", RowBox[{"Drop", "[", RowBox[{"upperguess", ",", RowBox[{"{", "paramNo", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"tempLowerguess", "=", RowBox[{"Drop", "[", RowBox[{"lowerguess", ",", RowBox[{"{", "paramNo", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"newans", "=", RowBox[{ RowBox[{"NMinimize", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"ll", "@@", "vars"}], "}"}], "/.", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "paramNo", "]"}], "]"}], "\[Rule]", "paramValue"}]}], ",", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ "tempVars", ",", "tempLowerguess", ",", "tempUpperguess"}], "}"}], "]"}]}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"ll", ",", RowBox[{"ReplaceAll", "[", RowBox[{"vars", ",", RowBox[{"Join", "[", RowBox[{"newans", ",", RowBox[{"{", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "paramNo", "]"}], "]"}], "\[Rule]", "paramValue"}], "}"}]}], "]"}]}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ci", "=", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"paraMin", ",", "paraMax"}], "}"}], "/.", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"Hold", "[", RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"varNo", ",", "paraMin"}], "]"}], "==", RowBox[{"maxll", "+", "1.92"}]}], "]"}], ",", RowBox[{"{", RowBox[{"paraMin", ",", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ")"}], "*", "0.9"}]}], "}"}]}], "]"}]}], "/.", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"Hold", "[", RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"varNo", ",", "paraMax"}], "]"}], "==", RowBox[{"maxll", "+", "1.92"}]}], "]"}], ",", RowBox[{"{", RowBox[{"paraMax", ",", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ")"}], "*", "1.1"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"varNo", ",", RowBox[{"Length", "[", "vars", "]"}]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"vars", ",", RowBox[{"vars", "/.", "ans"}], ",", "ci"}], "}"}], "]"}], "]"}]}]}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"For", " ", "use", " ", "with", " ", RowBox[{"alt", ".", " ", "min", ".", " ", "functions"}]}], " ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "find", " ", "confidence", " ", "intervals", " ", "using", " ", "likelihood", " ", "profile"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"paramNo_", ",", "paramValue_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"tempVars", ",", "tempGuess", ",", "derv", ",", "newans"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"tempVars", "=", RowBox[{"Drop", "[", RowBox[{"vars", ",", RowBox[{"{", "paramNo", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"tempGuess", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"vars", "/.", "ans"}], ",", RowBox[{"{", "paramNo", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"derv", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"Apply", "[", RowBox[{"ll", ",", RowBox[{"vars", "/.", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "paramNo", "]"}], "]"}], "\[Rule]", "paramValue"}]}]}], "]"}], ",", "#"}], "]"}], "&"}], ",", "tempVars"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"newans", "=", RowBox[{"FindRoot", "@@", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"Thread", "[", RowBox[{"derv", "\[Equal]", "0"}], "]"}], "}"}], ",", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"tempVars", ",", "tempGuess"}], "}"}], "]"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"ll", ",", RowBox[{"ReplaceAll", "[", RowBox[{"vars", ",", RowBox[{"Join", "[", RowBox[{"newans", ",", RowBox[{"{", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "paramNo", "]"}], "]"}], "\[Rule]", "paramValue"}], "}"}]}], "]"}]}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ci", "=", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"paraMin", ",", "paraMax"}], "}"}], "/.", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"Hold", "[", RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"varNo", ",", "paraMin"}], "]"}], "==", RowBox[{"maxll", "+", "1.92"}]}], "]"}], ",", RowBox[{"{", RowBox[{"paraMin", ",", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ")"}], "*", "0.9"}]}], "}"}]}], "]"}]}], "/.", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"Hold", "[", RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"varNo", ",", "paraMax"}], "]"}], "==", RowBox[{"maxll", "+", "1.92"}]}], "]"}], ",", RowBox[{"{", RowBox[{"paraMax", ",", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ")"}], "*", "1.1"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"varNo", ",", RowBox[{"Length", "[", "vars", "]"}]}], "}"}]}], "]"}]}]}]}]], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Optional: examine likelihood surface for a parameter", "Subsection"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", "\n", RowBox[{ RowBox[{ RowBox[{"problemParameter", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"problemRange", "=", RowBox[{"{", RowBox[{"3.5`", ",", "4.5`"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"numberOfDivisions", "=", "15"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"paramNo_", ",", "paramValue_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"tempVars", ",", "newans"}], "}"}], ",", RowBox[{ RowBox[{"tempVars", "=", RowBox[{"Drop", "[", RowBox[{"vars", ",", RowBox[{"{", "paramNo", "}"}]}], "]"}]}], ";", RowBox[{"newans", "=", RowBox[{ RowBox[{"NMinimize", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ll", "[", "]"}], ",", "constraints"}], "}"}], "/.", "\[InvisibleSpace]", RowBox[{ RowBox[{ "vars", "\[LeftDoubleBracket]", "paramNo", "\[RightDoubleBracket]"}], "\[Rule]", "paramValue"}]}], ",", "tempVars"}], "]"}], "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], ";", RowBox[{ RowBox[{"ll", "[", "]"}], "/.", "\[InvisibleSpace]", RowBox[{"Join", "[", RowBox[{"newans", ",", RowBox[{"{", RowBox[{ RowBox[{ "vars", "\[LeftDoubleBracket]", "paramNo", "\[RightDoubleBracket]"}], "\[Rule]", "paramValue"}], "}"}]}], "]"}]}]}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetAttributes", "[", RowBox[{"llProfileFun", ",", "Listable"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sampleAt", "=", RowBox[{"Table", "[", RowBox[{"i", ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{ "problemRange", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", RowBox[{ "problemRange", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], ",", FractionBox[ RowBox[{ RowBox[{ "problemRange", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "-", RowBox[{ "problemRange", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], RowBox[{"numberOfDivisions", "-", "1"}]]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Show", "[", RowBox[{ RowBox[{"ListPlot", "[", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"sampleAt", ",", RowBox[{"llProfileFun", "[", RowBox[{"problemParameter", ",", "sampleAt"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"PointSize", "[", "0.02`", "]"}]}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}], ",", RowBox[{"Plot", "[", RowBox[{ RowBox[{"maxll", "+", "1.92`"}], ",", RowBox[{"{", RowBox[{"i", ",", RowBox[{ "problemRange", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",", RowBox[{ "problemRange", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], "}"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "Identity"}]}], "]"}], ",", RowBox[{"DisplayFunction", "\[Rule]", "$DisplayFunction"}]}], "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]"}]}]], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: .61803 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations -3.30952 0.952381 -69.1483 0.306566 [ [.11905 .12314 -9 -9 ] [.11905 .12314 9 0 ] [.30952 .12314 -9 -9 ] [.30952 .12314 9 0 ] [.69048 .12314 -9 -9 ] [.69048 .12314 9 0 ] [.88095 .12314 -9 -9 ] [.88095 .12314 9 0 ] [.4875 .28892 -30 -4.5 ] [.4875 .28892 0 4.5 ] [.4875 .44221 -18 -4.5 ] [.4875 .44221 0 4.5 ] [.4875 .59549 -30 -4.5 ] [.4875 .59549 0 4.5 ] [ 0 0 0 0 ] [ 1 .61803 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .11905 .13564 m .11905 .14189 L s [(3.6)] .11905 .12314 0 1 Mshowa .30952 .13564 m .30952 .14189 L s [(3.8)] .30952 .12314 0 1 Mshowa .69048 .13564 m .69048 .14189 L s [(4.2)] .69048 .12314 0 1 Mshowa .88095 .13564 m .88095 .14189 L s [(4.4)] .88095 .12314 0 1 Mshowa .125 Mabswid .16667 .13564 m .16667 .13939 L s .21429 .13564 m .21429 .13939 L s .2619 .13564 m .2619 .13939 L s .35714 .13564 m .35714 .13939 L s .40476 .13564 m .40476 .13939 L s .45238 .13564 m .45238 .13939 L s .54762 .13564 m .54762 .13939 L s .59524 .13564 m .59524 .13939 L s .64286 .13564 m .64286 .13939 L s .7381 .13564 m .7381 .13939 L s .78571 .13564 m .78571 .13939 L s .83333 .13564 m .83333 .13939 L s .07143 .13564 m .07143 .13939 L s .02381 .13564 m .02381 .13939 L s .92857 .13564 m .92857 .13939 L s .97619 .13564 m .97619 .13939 L s .25 Mabswid 0 .13564 m 1 .13564 L s .5 .28892 m .50625 .28892 L s [(226.5)] .4875 .28892 1 0 Mshowa .5 .44221 m .50625 .44221 L s [(227)] .4875 .44221 1 0 Mshowa .5 .59549 m .50625 .59549 L s [(227.5)] .4875 .59549 1 0 Mshowa .125 Mabswid .5 .1663 m .50375 .1663 L s .5 .19695 m .50375 .19695 L s .5 .22761 m .50375 .22761 L s .5 .25827 m .50375 .25827 L s .5 .31958 m .50375 .31958 L s .5 .35024 m .50375 .35024 L s .5 .38089 m .50375 .38089 L s .5 .41155 m .50375 .41155 L s .5 .47286 m .50375 .47286 L s .5 .50352 m .50375 .50352 L s .5 .53418 m .50375 .53418 L s .5 .56483 m .50375 .56483 L s .5 .10498 m .50375 .10498 L s .5 .07433 m .50375 .07433 L s .5 .04367 m .50375 .04367 L s .5 .01301 m .50375 .01301 L s .25 Mabswid .5 0 m .5 .61803 L s 0 0 m 1 0 L 1 .61803 L 0 .61803 L closepath clip newpath .02 w .02381 .04759 Mdot .09184 .03747 Mdot .15986 .02921 Mdot .22789 .02279 Mdot .29592 .01824 Mdot .36395 .01555 Mdot .43197 .01472 Mdot .5 .01575 Mdot .56803 .01864 Mdot .63605 .02339 Mdot .70408 .03001 Mdot .77211 .03847 Mdot .84014 .04879 Mdot .90816 .06096 Mdot .97619 .07496 Mdot .5 Mabswid .02381 .60332 m .06244 .60332 L .10458 .60332 L .14415 .60332 L .18221 .60332 L .22272 .60332 L .26171 .60332 L .30316 .60332 L .34309 .60332 L .3815 .60332 L .42237 .60332 L .46172 .60332 L .49955 .60332 L .53984 .60332 L .57861 .60332 L .61984 .60332 L .65954 .60332 L .69774 .60332 L .73838 .60332 L .77751 .60332 L .81909 .60332 L .85916 .60332 L .89771 .60332 L .93871 .60332 L .97619 .60332 L s % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 177.938}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztWktPU0EUvqUvCsjDRGjrhoWIoiuNISlolOfKmBgTl9oQE1goWrtU4g/Q ENfiVoQQwxLQtQbj1se/qZ0z1zN0+Gactjc3veHepO1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5EKV7/8Umos+KKtCoualzU yKtOQr1R28vecQmtAWbc3cJudqE8jT0f7Mq1sYVcod+sBNDOQvu90VUrnSwk 6wtr8SDn6Pc5lhYS/XeYPGyIt94ji8Z4iKIuVUQaS17iL2mYW6U=\ \>"], ImageRangeCache->{{{0, 431}, {265.875, 0}} -> {3.47401, 225.558, 0.00366114, \ 0.0113737}}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Contour Plots of Confidence Intervals (using likelihood profile)\ \>", "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"contourFunction", "[", RowBox[{"r_", ",", "k_"}], "]"}], ":=", RowBox[{"OneSidedPValue", "/.", "\[InvisibleSpace]", RowBox[{"ChiSquarePValue", "[", RowBox[{ RowBox[{"2", " ", RowBox[{"(", RowBox[{ RowBox[{"ll", "[", RowBox[{"r", ",", "k"}], "]"}], "-", "maxll"}], ")"}]}], ",", "2"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ContourPlot", "[", RowBox[{ RowBox[{"contourFunction", "[", RowBox[{"r", ",", "k"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "100", ",", "10000"}], "}"}], ",", RowBox[{"{", RowBox[{"r", ",", "0.09`", ",", "0.17`"}], "}"}], ",", RowBox[{"PlotPoints", "\[Rule]", "50"}], ",", RowBox[{"Contours", "\[Rule]", RowBox[{"{", "0.05`", "}"}]}]}], "]"}]}], "Input"], Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: 1 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% ContourGraphics %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0.00951826 9.71251e-005 -1.0625 12.0192 [ [.00952 -0.0125 -3 -9 ] [.00952 -0.0125 3 0 ] [.20377 -0.0125 -12 -9 ] [.20377 -0.0125 12 0 ] [.39802 -0.0125 -12 -9 ] [.39802 -0.0125 12 0 ] [.59227 -0.0125 -12 -9 ] [.59227 -0.0125 12 0 ] [.78652 -0.0125 -12 -9 ] [.78652 -0.0125 12 0 ] [.98077 -0.0125 -15 -9 ] [.98077 -0.0125 15 0 ] [ 0 0 -0.125 0 ] [-0.0125 .13942 -18 -4.5 ] [-0.0125 .13942 0 4.5 ] [-0.0125 .37981 -24 -4.5 ] [-0.0125 .37981 0 4.5 ] [-0.0125 .62019 -24 -4.5 ] [-0.0125 .62019 0 4.5 ] [-0.0125 .86058 -24 -4.5 ] [-0.0125 .86058 0 4.5 ] [ 0 0 -0.125 0 ] [ 0 1 .125 0 ] [ 1 0 .125 0 ] [ 0 0 0 0 ] [ 1 1 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 g .25 Mabswid [ ] 0 setdash .00952 0 m .00952 .00625 L s [(0)] .00952 -0.0125 0 1 Mshowa .20377 0 m .20377 .00625 L s [(2000)] .20377 -0.0125 0 1 Mshowa .39802 0 m .39802 .00625 L s [(4000)] .39802 -0.0125 0 1 Mshowa .59227 0 m .59227 .00625 L s [(6000)] .59227 -0.0125 0 1 Mshowa .78652 0 m .78652 .00625 L s [(8000)] .78652 -0.0125 0 1 Mshowa .98077 0 m .98077 .00625 L s [(10000)] .98077 -0.0125 0 1 Mshowa .125 Mabswid .05808 0 m .05808 .00375 L s .10664 0 m .10664 .00375 L s .15521 0 m .15521 .00375 L s .25233 0 m .25233 .00375 L s .30089 0 m .30089 .00375 L s .34946 0 m .34946 .00375 L s .44658 0 m .44658 .00375 L s .49514 0 m .49514 .00375 L s .54371 0 m .54371 .00375 L s .64083 0 m .64083 .00375 L s .68939 0 m .68939 .00375 L s .73796 0 m .73796 .00375 L s .83508 0 m .83508 .00375 L s .88364 0 m .88364 .00375 L s .93221 0 m .93221 .00375 L s .25 Mabswid 0 0 m 1 0 L s 0 .13942 m .00625 .13942 L s [(0.1)] -0.0125 .13942 1 0 Mshowa 0 .37981 m .00625 .37981 L s [(0.12)] -0.0125 .37981 1 0 Mshowa 0 .62019 m .00625 .62019 L s [(0.14)] -0.0125 .62019 1 0 Mshowa 0 .86058 m .00625 .86058 L s [(0.16)] -0.0125 .86058 1 0 Mshowa .125 Mabswid 0 .19952 m .00375 .19952 L s 0 .25962 m .00375 .25962 L s 0 .31971 m .00375 .31971 L s 0 .4399 m .00375 .4399 L s 0 .5 m .00375 .5 L s 0 .5601 m .00375 .5601 L s 0 .68029 m .00375 .68029 L s 0 .74038 m .00375 .74038 L s 0 .80048 m .00375 .80048 L s 0 .07933 m .00375 .07933 L s 0 .01923 m .00375 .01923 L s 0 .92067 m .00375 .92067 L s 0 .98077 m .00375 .98077 L s .25 Mabswid 0 0 m 0 1 L s .00952 .99375 m .00952 1 L s .20377 .99375 m .20377 1 L s .39802 .99375 m .39802 1 L s .59227 .99375 m .59227 1 L s .78652 .99375 m .78652 1 L s .98077 .99375 m .98077 1 L s .125 Mabswid .05808 .99625 m .05808 1 L s .10664 .99625 m .10664 1 L s .15521 .99625 m .15521 1 L s .25233 .99625 m .25233 1 L s .30089 .99625 m .30089 1 L s .34946 .99625 m .34946 1 L s .44658 .99625 m .44658 1 L s .49514 .99625 m .49514 1 L s .54371 .99625 m .54371 1 L s .64083 .99625 m .64083 1 L s .68939 .99625 m .68939 1 L s .73796 .99625 m .73796 1 L s .83508 .99625 m .83508 1 L s .88364 .99625 m .88364 1 L s .93221 .99625 m .93221 1 L s .25 Mabswid 0 1 m 1 1 L s .99375 .13942 m 1 .13942 L s .99375 .37981 m 1 .37981 L s .99375 .62019 m 1 .62019 L s .99375 .86058 m 1 .86058 L s .125 Mabswid .99625 .19952 m 1 .19952 L s .99625 .25962 m 1 .25962 L s .99625 .31971 m 1 .31971 L s .99625 .4399 m 1 .4399 L s .99625 .5 m 1 .5 L s .99625 .5601 m 1 .5601 L s .99625 .68029 m 1 .68029 L s .99625 .74038 m 1 .74038 L s .99625 .80048 m 1 .80048 L s .99625 .07933 m 1 .07933 L s .99625 .01923 m 1 .01923 L s .99625 .92067 m 1 .92067 L s .99625 .98077 m 1 .98077 L s .25 Mabswid 1 0 m 1 1 L s 0 0 m 1 0 L 1 1 L 0 1 L closepath clip newpath .01923 .98077 m .98077 .98077 L .98077 .01923 L .01923 .01923 L F .5 Mabswid 1 g .98077 .34702 m .96115 .34879 L .94152 .35062 L .9219 .3525 L .91851 .35283 L .90228 .35416 L .88265 .35585 L .86303 .35762 L .84341 .35949 L .82378 .35921 L .80416 .36159 L .78454 .36422 L .76491 .36703 L .74529 .36997 L .7293 .37245 L .72567 .37293 L .70604 .37563 L .68642 .37638 L .6668 .37959 L .64717 .38339 L .62755 .38758 L .60793 .392 L .60761 .39207 L .5883 .39433 L .56868 .39842 L .54906 .40369 L .52943 .40961 L .52271 .4117 L .50981 .4139 L .49019 .41966 L .47057 .4271 L .46011 .43132 L .45094 .43352 L .43132 .44132 L .41217 .45094 L .4117 .45107 L .39207 .45955 L .37405 .47057 L .37245 .47119 L .35283 .48294 L .34285 .49019 L .3332 .49644 L .31718 .50981 L .31358 .51261 L .29569 .52943 L .29396 .53123 L .2768 .54906 L .27433 .55259 L .26015 .56868 L .25471 .57818 L .24673 .5883 L .23608 .60793 L .23509 .6094 L .22574 .62755 L .21565 .64717 L .21546 .64751 L .2079 .6668 L .19951 .68642 L .19584 .695 L .19115 .70604 L .18715 .72567 L .1804 .74529 L .17622 .75686 L .17455 .76491 L .17075 .78454 L .16671 .80416 L .16159 .82378 L .15659 .83926 L .15561 .84341 L .15199 .86303 L .14931 .88265 L .14682 .90228 L .14393 .9219 L .13981 .94152 L .13697 .95067 L .12918 .94152 L .12663 .9219 L .12567 .90228 L .12527 .88265 L .12522 .86303 L .12547 .84341 L .12603 .82378 L .127 .80416 L .12849 .78454 L .13063 .76491 L .13341 .74529 L .13648 .72567 L .13697 .72245 L .13843 .70604 L .14004 .68642 L .14176 .6668 L .14385 .64717 L .14656 .62755 L .15003 .60793 L .154 .5883 L .15659 .57565 L .15868 .56868 L .16074 .54906 L .16457 .52943 L .16928 .50981 L .1746 .49019 L .17622 .48456 L .17964 .47057 L .18537 .45094 L .19212 .43132 L .19584 .42159 L .20074 .4117 L .20736 .39207 L .21546 .375 L .21691 .37245 L .22914 .35283 L .23509 .33949 L .2394 .3332 L .25323 .31358 L .25471 .31117 L .26936 .29396 L .27433 .28836 L .28816 .27433 L .29396 .26927 L .31084 .25471 L .31358 .25288 L .3332 .23898 L .33889 .23509 L .35283 .22758 L .37245 .21636 L .37413 .21546 L .39207 .20805 L .4117 .19925 L .41975 .19584 L .43132 .19251 L .45094 .18601 L .47057 .17946 L .48092 .17622 L .49019 .17444 L .50981 .17001 L .52943 .16525 L .54906 .16061 L .56725 .15659 L .56868 .15643 L .5883 .15384 L .60793 .15083 L .62755 .14765 L .64717 .1445 L .6668 .14146 L .68642 .1386 L .69822 .13697 L .70604 .13644 L .72567 .13489 L .74529 .13313 L .76491 .13127 L .78454 .12935 L .80416 .12744 L .82378 .12557 L .84341 .12375 L .86303 .122 L .88265 .12033 L .90228 .11874 L .92042 .11735 L .9219 .1173 L .94152 .11661 L .96115 .11582 L .98077 .11496 L F 0 g .98077 .34702 m .96115 .34879 L .94152 .35062 L .9219 .3525 L .91851 .35283 L .90228 .35416 L .88265 .35585 L .86303 .35762 L .84341 .35949 L .82378 .35921 L .80416 .36159 L .78454 .36422 L .76491 .36703 L .74529 .36997 L .7293 .37245 L .72567 .37293 L .70604 .37563 L .68642 .37638 L .6668 .37959 L .64717 .38339 L .62755 .38758 L .60793 .392 L .60761 .39207 L .5883 .39433 L .56868 .39842 L .54906 .40369 L .52943 .40961 L .52271 .4117 L .50981 .4139 L .49019 .41966 L .47057 .4271 L .46011 .43132 L .45094 .43352 L .43132 .44132 L .41217 .45094 L .4117 .45107 L .39207 .45955 L .37405 .47057 L .37245 .47119 L .35283 .48294 L .34285 .49019 L .3332 .49644 L .31718 .50981 L .31358 .51261 L .29569 .52943 L .29396 .53123 L .2768 .54906 L .27433 .55259 L .26015 .56868 L .25471 .57818 L Mistroke .24673 .5883 L .23608 .60793 L .23509 .6094 L .22574 .62755 L .21565 .64717 L .21546 .64751 L .2079 .6668 L .19951 .68642 L .19584 .695 L .19115 .70604 L .18715 .72567 L .1804 .74529 L .17622 .75686 L .17455 .76491 L .17075 .78454 L .16671 .80416 L .16159 .82378 L .15659 .83926 L .15561 .84341 L .15199 .86303 L .14931 .88265 L .14682 .90228 L .14393 .9219 L .13981 .94152 L .13697 .95067 L .12918 .94152 L .12663 .9219 L .12567 .90228 L .12527 .88265 L .12522 .86303 L .12547 .84341 L .12603 .82378 L .127 .80416 L .12849 .78454 L .13063 .76491 L .13341 .74529 L .13648 .72567 L .13697 .72245 L .13843 .70604 L .14004 .68642 L .14176 .6668 L .14385 .64717 L .14656 .62755 L .15003 .60793 L .154 .5883 L .15659 .57565 L .15868 .56868 L .16074 .54906 L .16457 .52943 L .16928 .50981 L Mistroke .1746 .49019 L .17622 .48456 L .17964 .47057 L .18537 .45094 L .19212 .43132 L .19584 .42159 L .20074 .4117 L .20736 .39207 L .21546 .375 L .21691 .37245 L .22914 .35283 L .23509 .33949 L .2394 .3332 L .25323 .31358 L .25471 .31117 L .26936 .29396 L .27433 .28836 L .28816 .27433 L .29396 .26927 L .31084 .25471 L .31358 .25288 L .3332 .23898 L .33889 .23509 L .35283 .22758 L .37245 .21636 L .37413 .21546 L .39207 .20805 L .4117 .19925 L .41975 .19584 L .43132 .19251 L .45094 .18601 L .47057 .17946 L .48092 .17622 L .49019 .17444 L .50981 .17001 L .52943 .16525 L .54906 .16061 L .56725 .15659 L .56868 .15643 L .5883 .15384 L .60793 .15083 L .62755 .14765 L .64717 .1445 L .6668 .14146 L .68642 .1386 L .69822 .13697 L .70604 .13644 L .72567 .13489 L .74529 .13313 L .76491 .13127 L Mistroke .78454 .12935 L .80416 .12744 L .82378 .12557 L .84341 .12375 L .86303 .122 L .88265 .12033 L .90228 .11874 L .92042 .11735 L .9219 .1173 L .94152 .11661 L .96115 .11582 L .98077 .11496 L Mfstroke % End of Graphics MathPictureEnd \ \>"], "Graphics", ImageSize->{288, 288}, ImageMargins->{{43, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["CompressedBitmap", "\<\ eJztnOlzFEUYxvfIKhIVUVGBLNlAEuQUEEQOUZBDRRQsFJWiMAQpQhWHScrC KjxKC6WgLBQKpRAVxSiCyGG4JICKByqeH/wP/AP0Ax/8Evd5F7p3Zntm++2e ye6STbHJ8/TO8+vume7ZuZY5Da3Ln17Z0NrU2JCa1dywZnlTY0tq5urmdFE8 GolEU3ilItCdkcilX53pf501+IWS4tVV+BNDk+ugKqDioqxCoZJQcaiY73JV YjnVu67lPN+Vqi9UIn+9UsUzXexPf6hnpKgwEqklEXcUx9WLxljFySAgMUXr +gYHzinuFzo74Si++FYwFVBxFCqaUX7bvU6xZoPrZqaXCdE/8756NL+8tVlb uz7g1jjHzS0hrkfqEFUXyF6JcLHAcMW1lWvD3g5Z2z0wcJViQJVnt3q7y4OE eqH8P/yTzvGucTjjv5zuYUo/zeVyDlNsjuJojP4HWGX2PHEO2krFeLtKs6yn RbYrykqjfepp47PJRilQIxRlI1nLsZqB1wXPXhotTqP+glCOiivcbftHTBa/ BpRj5djlEaMpEROLyw+l8jS5HGP/io3Miv0Nfx079hd8NTt2Hn6Id6yHGKSu o5qE7F0O9Cz8GG/olYpY+kf1Se9RQzv81OBqkFPzU6jZoqwyqBa3wc8Nc528 A/+kzqbsKVRCjXoLfjF7MG2Bb2THNsCvZMdegW9mx16Ef5Ydex5+LTv2HPw6 dqwF/mV2bA38enZsFfxr7NgK+E3s2DL4zXlickIuhXpDlPl/Vi6B38pu0lPw 29ixRfDb2bGF8DvYsSfgd7JjC+DfY8cehd/Fjs2H/4AdewR+Nzs2F76NHXsY /mN2bA78HnZsNvxeduwB+H3a0+R+sbjGNLkPfj+7STPhD7BjM+APdlVsOvwh duxe+MPs2FT4dnbsHvgjXR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aoAOo+KOB+2M5yFJfGFt24f0/uCpzMf8BewXZfui+Bb5vItVavz l5XG9/+Loy3e7cu/ybL/jwlaooj+K7NI9H8xbjeM\ \>"], ImageRangeCache->{{{0, 287}, {287, 0}} -> {-1216.44, 0.0801623, 41.2371, \ 0.00033323}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ OLD: Confidence Intervals with dragging starting conditions for problem \ parameters (using likelihood profile)\ \>", "Subsubsection"], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "tempGuess", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"llProfileFunDragGuess", "[", RowBox[{"paramNo_", ",", "paramValue_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"tempVars", ",", "derv", ",", "newans"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"tempVars", "=", RowBox[{"Drop", "[", RowBox[{"vars", ",", RowBox[{"{", "paramNo", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"derv", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"Apply", "[", RowBox[{"ll", ",", RowBox[{"vars", "/.", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "paramNo", "]"}], "]"}], "\[Rule]", "paramValue"}]}]}], "]"}], ",", "#"}], "]"}], "&"}], ",", "tempVars"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"newans", "=", RowBox[{"FindRoot", "@@", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"Thread", "[", RowBox[{"derv", "\[Equal]", "0"}], "]"}], "}"}], ",", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"tempVars", ",", "tempGuess"}], "}"}], "]"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"tempGuess", "=", RowBox[{"tempVars", "/.", "newans"}]}], ";", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"ll", ",", RowBox[{"ReplaceAll", "[", RowBox[{"vars", ",", RowBox[{"Join", "[", RowBox[{"newans", ",", RowBox[{"{", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "paramNo", "]"}], "]"}], "\[Rule]", "paramValue"}], "}"}]}], "]"}]}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input"], Cell[BoxData[{ RowBox[{"varNo", "=", "1"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"tempGuess", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"vars", "/.", "ans"}], ",", RowBox[{"{", "varNo", "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"Hold", "[", RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"varNo", ",", "paraMin"}], "]"}], "==", RowBox[{"maxll", "+", "1.92"}]}], "]"}], ",", RowBox[{"{", RowBox[{"paraMin", ",", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ")"}], "*", "0.9"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"tempGuess", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"vars", "/.", "ans"}], ",", RowBox[{"{", "varNo", "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{"Hold", "[", RowBox[{ RowBox[{"llProfileFun", "[", RowBox[{"varNo", ",", "paraMax"}], "]"}], "==", RowBox[{"maxll", "+", "1.92"}]}], "]"}], ",", RowBox[{"{", RowBox[{"paraMax", ",", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "varNo", "]"}], "]"}], "/.", "ans"}], ")"}], "*", "1.1"}]}], "}"}]}], "]"}]}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ OLD: Automatic Confidence Intervals with dragging starting conditions for \ problem parameters\ \>", "Subsubsection"], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "tempGuess", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"llProfileFunDragGuess", "[", RowBox[{"paramNo_", ",", "paramValue_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"tempVars", ",", "derv", ",", "newans"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"tempVars", "=", RowBox[{"Drop", "[", RowBox[{"vars", ",", RowBox[{"{", "paramNo", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"derv", "=", RowBox[{"Map", "[", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"Apply", "[", RowBox[{"ll", ",", RowBox[{"vars", "/.", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "paramNo", "]"}], "]"}], "\[Rule]", "paramValue"}]}]}], "]"}], ",", "#"}], "]"}], "&"}], ",", "tempVars"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"newans", "=", RowBox[{"FindRoot", "@@", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", RowBox[{"Thread", "[", RowBox[{"derv", "\[Equal]", "0"}], "]"}], "}"}], ",", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"tempVars", ",", "tempGuess"}], "}"}], "]"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"tempGuess", "=", RowBox[{"tempVars", "/.", "newans"}]}], ";", "\[IndentingNewLine]", RowBox[{"Apply", "[", RowBox[{"ll", ",", RowBox[{"ReplaceAll", "[", RowBox[{"vars", ",", RowBox[{"Join", "[", RowBox[{"newans", ",", RowBox[{"{", RowBox[{ RowBox[{"vars", "[", RowBox[{"[", "paramNo", "]"}], "]"}], "\[Rule]", "paramValue"}], "}"}]}], "]"}]}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"stepVector", "=", RowBox[{"N", "[", RowBox[{"10", "^", RowBox[{"(", RowBox[{ RowBox[{"Floor", "[", RowBox[{"Log", "[", RowBox[{"10", ",", RowBox[{"Abs", "[", RowBox[{"(", RowBox[{"vars", "/.", "ans"}], ")"}], "]"}]}], "]"}], "]"}], "-", "1"}], ")"}]}], "]"}]}]], "Input"], Cell[BoxData[ RowBox[{"{", RowBox[{ "0.1`", ",", "0.1`", ",", "0.1`", ",", "0.1`", ",", "0.001`", ",", "0.001`", ",", "0.01`", ",", "0.001`", ",", "0.0001`", ",", "0.001`"}], "}"}]], "Output"] }, Open ]], Cell[BoxData[{ RowBox[{ RowBox[{"ciResults", "=", RowBox[{"{", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"tempGuess", "=", RowBox[{"Drop", "[", RowBox[{ RowBox[{"vars", "/.", "ans"}], ",", RowBox[{"{", "varNo", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"currentMaxll", "=", "maxll"}], ";", "\[IndentingNewLine]", RowBox[{"val", "=", RowBox[{"Take", "[", RowBox[{ RowBox[{"vars", "/.", "ans"}], ",", RowBox[{"{", "varNo", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"currentMaxll", "<", RowBox[{"maxll", "+", "1.92"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"previousVal", "=", "val"}], ";", "\[IndentingNewLine]", RowBox[{"previousMaxll", "=", "currentMaxll"}], ";", "\[IndentingNewLine]", RowBox[{"val", "+=", RowBox[{"stepVector", "[", RowBox[{"[", "varNo", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"currentMaxll", "=", RowBox[{"llProfileFunDragGuess", "[", RowBox[{"varNo", ",", "val"}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"middleVal", "=", RowBox[{ RowBox[{ RowBox[{"Round", "[", FractionBox["val", RowBox[{"stepVector", "[", RowBox[{"[", "varNo", "]"}], "]"}]], "]"}], "*", RowBox[{"stepVector", "[", RowBox[{"[", "varNo", "]"}], "]"}]}], "-", FractionBox[ RowBox[{"stepVector", "[", RowBox[{"[", "varNo", "]"}], "]"}], "2"]}]}], ";", "\[IndentingNewLine]", RowBox[{"middleMaxll", "=", RowBox[{"llProfileFunDragGuess", "[", RowBox[{"varNo", ",", "middleVal"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"ciResults", ",", RowBox[{"{", RowBox[{"varNo", ",", RowBox[{"{", RowBox[{"previousVal", ",", "previousMaxll"}], "}"}], ",", RowBox[{"{", RowBox[{"middleVal", ",", "middleMaxll"}], "}"}], ",", RowBox[{"{", RowBox[{"val", ",", "currentMaxll"}], "}"}]}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"tempGuess", "=", RowBox[{"Drop", "[", RowBox[{ RowBox