(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 9.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 157, 7] NotebookDataLength[ 10085, 334] NotebookOptionsPosition[ 9275, 303] NotebookOutlinePosition[ 9762, 322] CellTagsIndexPosition[ 9719, 319] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Quiz 2.22", "Subsubsection", CellChangeTimes->{{3.791440344522746*^9, 3.7914403637039137`*^9}, { 3.791440528281019*^9, 3.791440539308681*^9}, {3.791440593421216*^9, 3.7914406129403152`*^9}, {3.791709135382835*^9, 3.791709145103059*^9}, { 3.79170953911546*^9, 3.791709551345149*^9}, {3.792399815781332*^9, 3.79239982712624*^9}, {3.792418754873685*^9, 3.792418764520961*^9}, { 3.825435357666072*^9, 3.8254353598893642`*^9}, {3.825667601336555*^9, 3.825667602855921*^9}, {3.825670236746559*^9, 3.825670242248989*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"dist", "=", RowBox[{"HypoexponentialDistribution", "[", RowBox[{"{", RowBox[{ SubscriptBox["\[Mu]", "1"], ",", SubscriptBox["\[Mu]", "2"]}], "}"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Ftilde", "[", "s_", "]"}], "=", RowBox[{"MomentGeneratingFunction", "[", RowBox[{"dist", ",", RowBox[{"-", "s"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"mtilde", "[", "s_", "]"}], "=", FractionBox[ RowBox[{"Ftilde", "[", "s", "]"}], RowBox[{"1", "-", RowBox[{"Ftilde", "[", "s", "]"}]}]]}], "\[IndentingNewLine]", RowBox[{"FullSimplify", "[", RowBox[{"InverseLaplaceTransform", "[", RowBox[{ FractionBox[ RowBox[{"mtilde", "[", "s", "]"}], "s"], ",", "s", ",", "t"}], "]"}], "]"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.825668213215652*^9, 3.825668226349819*^9}, { 3.8256682699511623`*^9, 3.8256683948540287`*^9}, {3.825668448749538*^9, 3.825668475142084*^9}, {3.825669098286399*^9, 3.825669101988996*^9}}], Cell[BoxData[ FractionBox[ RowBox[{ SubscriptBox["\[Mu]", "1"], " ", SubscriptBox["\[Mu]", "2"]}], RowBox[{ RowBox[{"(", RowBox[{"s", "+", SubscriptBox["\[Mu]", "1"]}], ")"}], " ", RowBox[{"(", RowBox[{"s", "+", SubscriptBox["\[Mu]", "2"]}], ")"}]}]]], "Output", CellChangeTimes->{3.82566839557743*^9, 3.825668475750948*^9, 3.82566910250317*^9, 3.8256702468300123`*^9}], Cell[BoxData[ FractionBox[ RowBox[{ SubscriptBox["\[Mu]", "1"], " ", SubscriptBox["\[Mu]", "2"]}], RowBox[{ RowBox[{"(", RowBox[{"s", "+", SubscriptBox["\[Mu]", "1"]}], ")"}], " ", RowBox[{"(", RowBox[{"s", "+", SubscriptBox["\[Mu]", "2"]}], ")"}], " ", RowBox[{"(", RowBox[{"1", "-", FractionBox[ RowBox[{ SubscriptBox["\[Mu]", "1"], " ", SubscriptBox["\[Mu]", "2"]}], RowBox[{ RowBox[{"(", RowBox[{"s", "+", SubscriptBox["\[Mu]", "1"]}], ")"}], " ", RowBox[{"(", RowBox[{"s", "+", SubscriptBox["\[Mu]", "2"]}], ")"}]}]]}], ")"}]}]]], "Output", CellChangeTimes->{3.82566839557743*^9, 3.825668475750948*^9, 3.82566910250317*^9, 3.825670246837535*^9}], Cell[BoxData[ FractionBox[ RowBox[{ SubscriptBox["\[Mu]", "1"], " ", SubscriptBox["\[Mu]", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "t"}], " ", RowBox[{"(", RowBox[{ SubscriptBox["\[Mu]", "1"], "+", SubscriptBox["\[Mu]", "2"]}], ")"}]}]], "+", RowBox[{"t", " ", RowBox[{"(", RowBox[{ SubscriptBox["\[Mu]", "1"], "+", SubscriptBox["\[Mu]", "2"]}], ")"}]}]}], ")"}]}], SuperscriptBox[ RowBox[{"(", RowBox[{ SubscriptBox["\[Mu]", "1"], "+", SubscriptBox["\[Mu]", "2"]}], ")"}], "2"]]], "Output", CellChangeTimes->{3.82566839557743*^9, 3.825668475750948*^9, 3.82566910250317*^9, 3.825670247085133*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"dist", "=", RowBox[{"HyperexponentialDistribution", "[", RowBox[{ RowBox[{"{", RowBox[{"p", ",", RowBox[{"1", "-", "p"}]}], "}"}], ",", RowBox[{"{", RowBox[{ SubscriptBox["\[Mu]", "1"], ",", SubscriptBox["\[Mu]", "2"]}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Ftilde", "[", "s_", "]"}], "=", RowBox[{"MomentGeneratingFunction", "[", RowBox[{"dist", ",", RowBox[{"-", "s"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"mtilde", "[", "s_", "]"}], "=", FractionBox[ RowBox[{"Ftilde", "[", "s", "]"}], RowBox[{"1", "-", RowBox[{"Ftilde", "[", "s", "]"}]}]]}], "\[IndentingNewLine]", RowBox[{"FullSimplify", "[", RowBox[{"InverseLaplaceTransform", "[", RowBox[{ FractionBox[ RowBox[{"mtilde", "[", "s", "]"}], "s"], ",", "s", ",", "t"}], "]"}], "]"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.825668213215652*^9, 3.825668226349819*^9}, { 3.8256682699511623`*^9, 3.8256683948540287`*^9}, {3.825668448749538*^9, 3.825668475142084*^9}, {3.825669098286399*^9, 3.825669101988996*^9}, { 3.825670055456502*^9, 3.825670116122398*^9}, {3.825670169992218*^9, 3.825670172614377*^9}}], Cell[BoxData[ RowBox[{ FractionBox[ RowBox[{"p", " ", SubscriptBox["\[Mu]", "1"]}], RowBox[{"s", "+", SubscriptBox["\[Mu]", "1"]}]], "+", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], " ", SubscriptBox["\[Mu]", "2"]}], RowBox[{"s", "+", SubscriptBox["\[Mu]", "2"]}]]}]], "Output", CellChangeTimes->{ 3.8256700851546707`*^9, {3.825670153397319*^9, 3.825670174616271*^9}, 3.825670249076273*^9}], Cell[BoxData[ FractionBox[ RowBox[{ FractionBox[ RowBox[{"p", " ", SubscriptBox["\[Mu]", "1"]}], RowBox[{"s", "+", SubscriptBox["\[Mu]", "1"]}]], "+", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], " ", SubscriptBox["\[Mu]", "2"]}], RowBox[{"s", "+", SubscriptBox["\[Mu]", "2"]}]]}], RowBox[{"1", "-", FractionBox[ RowBox[{"p", " ", SubscriptBox["\[Mu]", "1"]}], RowBox[{"s", "+", SubscriptBox["\[Mu]", "1"]}]], "-", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{"1", "-", "p"}], ")"}], " ", SubscriptBox["\[Mu]", "2"]}], RowBox[{"s", "+", SubscriptBox["\[Mu]", "2"]}]]}]]], "Output", CellChangeTimes->{ 3.8256700851546707`*^9, {3.825670153397319*^9, 3.825670174616271*^9}, 3.825670249080508*^9}], Cell[BoxData[ RowBox[{ FractionBox["1", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "p"}], ")"}], " ", SubscriptBox["\[Mu]", "1"]}], "-", RowBox[{"p", " ", SubscriptBox["\[Mu]", "2"]}]}], ")"}], "2"]], RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "p"}], ")"}], " ", "t", " ", SubscriptBox["\[Mu]", "1"]}], "-", RowBox[{"p", " ", "t", " ", SubscriptBox["\[Mu]", "2"]}]}]], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "p"}], ")"}], " ", "p", " ", SuperscriptBox[ RowBox[{"(", RowBox[{ SubscriptBox["\[Mu]", "1"], "-", SubscriptBox["\[Mu]", "2"]}], ")"}], "2"]}], "+", RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{"t", " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "p"}], ")"}]}], " ", SubscriptBox["\[Mu]", "1"]}], "+", RowBox[{"p", " ", SubscriptBox["\[Mu]", "2"]}]}], ")"}]}]], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "p"}], ")"}]}], " ", "p", " ", SubsuperscriptBox["\[Mu]", "2", "2"]}], "-", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", "p"}], ")"}], " ", SubsuperscriptBox["\[Mu]", "1", "2"], " ", RowBox[{"(", RowBox[{"p", "+", RowBox[{"t", " ", SubscriptBox["\[Mu]", "2"]}]}], ")"}]}], "+", RowBox[{"p", " ", SubscriptBox["\[Mu]", "1"], " ", SubscriptBox["\[Mu]", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{"-", "2"}], "+", RowBox[{"2", " ", "p"}], "+", RowBox[{"t", " ", SubscriptBox["\[Mu]", "2"]}]}], ")"}]}]}], ")"}]}]}], ")"}]}]}]], "Output", CellChangeTimes->{ 3.8256700851546707`*^9, {3.825670153397319*^9, 3.825670174616271*^9}, 3.825670249083263*^9}] }, Open ]] }, Open ]] }, WindowSize->{913, 689}, WindowMargins->{{169, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, PrivateNotebookOptions->{"VersionedStylesheet"->{"Default.nb"[8.] -> False}}, FrontEndVersion->"10.4 for Mac OS X x86 (32-bit, 64-bit Kernel) (April 11, \ 2016)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[579, 22, 536, 7, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[1140, 33, 1070, 28, 144, "Input"], Cell[2213, 63, 415, 13, 47, "Output"], Cell[2631, 78, 792, 26, 59, "Output"], Cell[3426, 106, 814, 26, 55, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4277, 137, 1279, 34, 144, "Input"], Cell[5559, 173, 470, 16, 50, "Output"], Cell[6032, 191, 849, 30, 73, "Output"], Cell[6884, 223, 2363, 76, 75, "Output"] }, Open ]] }, Open ]] } ] *)