(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.2' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 66789, 1491] NotebookOptionsPosition[ 64515, 1415] NotebookOutlinePosition[ 64924, 1433] CellTagsIndexPosition[ 64881, 1430] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell["MAP30#4", "Subsubsection", CellChangeTimes->{{3.728978072142015*^9, 3.728978078436468*^9}, { 3.7289787758916683`*^9, 3.728978777915042*^9}, {3.728979117073182*^9, 3.728979124168069*^9}, {3.72897937739428*^9, 3.7289793834544497`*^9}, { 3.728980621199177*^9, 3.728980659270624*^9}, {3.72898742841497*^9, 3.728987435586033*^9}, {3.887203586315774*^9, 3.8872035919214087`*^9}, { 3.889075926817493*^9, 3.889075926969419*^9}, {3.8943531183107777`*^9, 3.894353118459375*^9}}], Cell[CellGroupData[{ Cell[TextData[{ "Question 1 \[LongDash] (X-bar,", Cell[BoxData[ FormBox[ SuperscriptBox["S", "2"], TraditionalForm]], FormatType->"TraditionalForm"], ")\[NonBreakingSpace]joint scheme for \[Mu] and ", Cell[BoxData[ FormBox[ SuperscriptBox["\[Sigma]", "2"], TraditionalForm]]] }], "Subsubsection", CellChangeTimes->{{3.728978072142015*^9, 3.728978078436468*^9}, { 3.7289787758916683`*^9, 3.728978777915042*^9}, {3.728979117073182*^9, 3.728979124168069*^9}, {3.72897937739428*^9, 3.7289793834544497`*^9}, { 3.728980621199177*^9, 3.728980659270624*^9}, {3.72898742841497*^9, 3.728987435586033*^9}, {3.8872035562635403`*^9, 3.887203571506999*^9}, { 3.889075948658783*^9, 3.889075948905105*^9}, {3.893068488938219*^9, 3.893068489604116*^9}, 3.894353121097001*^9, {3.894355313323731*^9, 3.894355315510623*^9}, {3.89436020311318*^9, 3.894360216677417*^9}, { 3.89453939123385*^9, 3.894539436008844*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"n", "=", "5"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["\[Mu]", "0"], "=", "1050"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["\[Sigma]", "0"], "=", SuperscriptBox["25", "2"]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"incontrolARLindiv", "=", "200."}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"distmu", "=", RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"\[Gamma]mu", "=", RowBox[{"Quantile", "[", RowBox[{"distmu", ",", RowBox[{"1", "-", RowBox[{"1", "/", RowBox[{"(", RowBox[{"2", "*", "incontrolARLindiv"}], ")"}]}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"\[Xi]mu", "[", RowBox[{"\[Delta]_", ",", "\[Theta]_"}], "]"}], "=", RowBox[{"1", "-", RowBox[{"(", RowBox[{ RowBox[{"CDF", "[", RowBox[{"distmu", ",", FractionBox[ RowBox[{"\[Gamma]mu", "-", "\[Delta]"}], "\[Theta]"]}], "]"}], "-", RowBox[{"CDF", "[", RowBox[{"distmu", ",", FractionBox[ RowBox[{ RowBox[{"-", "\[Gamma]mu"}], "-", "\[Delta]"}], "\[Theta]"]}], "]"}]}], ")"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ARLmu", "[", RowBox[{"\[Delta]_", ",", "\[Theta]_"}], "]"}], "=", RowBox[{"1", "/", RowBox[{"\[Xi]mu", "[", RowBox[{"\[Delta]", ",", "\[Theta]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ARLmu", "[", RowBox[{"0", ",", "1"}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"distsigma", "=", RowBox[{"ChiSquareDistribution", "[", RowBox[{"n", "-", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"\[Gamma]sigma", " ", "=", RowBox[{"Quantile", "[", RowBox[{"distsigma", ",", RowBox[{"1", "-", RowBox[{"1", "/", "incontrolARLindiv"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"\[Xi]sigma", "[", "\[Theta]_", "]"}], "=", RowBox[{"1", "-", RowBox[{"CDF", "[", RowBox[{"distsigma", ",", FractionBox["\[Gamma]sigma", SuperscriptBox["\[Theta]", "2"]]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ARLsigma", "[", "\[Theta]_", "]"}], "=", RowBox[{"1", "/", RowBox[{"\[Xi]sigma", "[", "\[Theta]", "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ARLsigma", "[", "1", "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"\[Xi]musigma", "[", RowBox[{"\[Delta]_", ",", "\[Theta]_"}], "]"}], "=", RowBox[{ RowBox[{"\[Xi]mu", "[", RowBox[{"\[Delta]", ",", "\[Theta]"}], "]"}], "+", RowBox[{"\[Xi]sigma", "[", "\[Theta]", "]"}], "-", RowBox[{ RowBox[{"\[Xi]mu", "[", RowBox[{"\[Delta]", ",", "\[Theta]"}], "]"}], "\[Times]", RowBox[{"\[Xi]sigma", "[", "\[Theta]", "]"}]}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ARLmusigma", "[", RowBox[{"\[Delta]_", ",", "\[Theta]_"}], "]"}], "=", RowBox[{"1", "/", RowBox[{"\[Xi]musigma", "[", RowBox[{"\[Delta]", ",", "\[Theta]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"ARLmusigma", "[", RowBox[{"0", ",", "1"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"ARLmusigma", "[", RowBox[{"\[Delta]_", ",", "\[Theta]_"}], "]"}], "=", FractionBox[ RowBox[{ RowBox[{"ARLmu", "[", RowBox[{"\[Delta]", ",", "\[Theta]"}], "]"}], "*", RowBox[{"ARLsigma", "[", "\[Theta]", "]"}]}], RowBox[{ RowBox[{"ARLmu", "[", RowBox[{"\[Delta]", ",", "\[Theta]"}], "]"}], "+", RowBox[{"ARLsigma", "[", "\[Theta]", "]"}], "-", "1"}]]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ARLmusigma", "[", RowBox[{"0", ",", "1"}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"shiftsigma", "=", "1.1"}], ";"}], "\[IndentingNewLine]", RowBox[{"ARLmu", "[", RowBox[{"0", ",", "shiftsigma"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ARLsigma", "[", "shiftsigma", "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", FractionBox[ RowBox[{ RowBox[{"\[Xi]mu", "[", RowBox[{"0", ",", "shiftsigma"}], "]"}], "\[Times]", RowBox[{"(", RowBox[{"1", "-", RowBox[{"\[Xi]sigma", "[", "shiftsigma", "]"}]}], ")"}]}], RowBox[{"\[Xi]musigma", "[", RowBox[{"0", ",", "shiftsigma"}], "]"}]], "\[IndentingNewLine]", FractionBox[ RowBox[{ RowBox[{"1", "/", RowBox[{"ARLmu", "[", RowBox[{"0", ",", "shiftsigma"}], "]"}]}], "\[Times]", RowBox[{"(", RowBox[{"1", "-", RowBox[{"1", "/", RowBox[{"ARLsigma", "[", "shiftsigma", "]"}]}]}], ")"}]}], RowBox[{"1", "/", RowBox[{"ARLmusigma", "[", RowBox[{"0", ",", "shiftsigma"}], "]"}]}]], "\[IndentingNewLine]", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"1", "/", RowBox[{"ARLmu", "[", RowBox[{"0", ",", "shiftsigma"}], "]"}]}], "\[Times]", RowBox[{"(", RowBox[{"1", "-", RowBox[{"1", "/", RowBox[{"ARLsigma", "[", "shiftsigma", "]"}]}]}], ")"}]}], ")"}], "/", RowBox[{"(", RowBox[{ RowBox[{"1", "/", RowBox[{"ARLmu", "[", RowBox[{"0", ",", "shiftsigma"}], "]"}]}], "+", RowBox[{"1", "/", RowBox[{"ARLsigma", "[", "shiftsigma", "]"}]}], "-", RowBox[{ RowBox[{"1", "/", RowBox[{"ARLmu", "[", RowBox[{"0", ",", "shiftsigma"}], "]"}]}], "*", RowBox[{"1", "/", RowBox[{"ARLsigma", "[", "shiftsigma", "]"}]}]}]}], ")"}]}], "\[IndentingNewLine]", FractionBox[ RowBox[{ FractionBox["1", "93.3245"], "*", RowBox[{"(", RowBox[{"1", "-", FractionBox["1", "65.0272"]}], " ", ")"}]}], RowBox[{ FractionBox["1", "93.3245"], "+", FractionBox["1", "65.0272"], "-", RowBox[{ FractionBox["1", "93.3245"], "\[Times]", FractionBox["1", "65.0272"]}]}]], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{{3.610566851562529*^9, 3.610567236912198*^9}, { 3.6105676861101637`*^9, 3.610567688877533*^9}, {3.610600911285817*^9, 3.610600960216777*^9}, {3.610600991170627*^9, 3.6106010412172527`*^9}, { 3.610704762320983*^9, 3.610704762583201*^9}, {3.629216315522439*^9, 3.629216452138616*^9}, {3.629217432516494*^9, 3.62921745745497*^9}, { 3.6292177033925047`*^9, 3.629217735654768*^9}, 3.629217773089197*^9, { 3.6292643556015053`*^9, 3.6292643705074463`*^9}, {3.629269564739069*^9, 3.629269577276051*^9}, {3.6293408145163107`*^9, 3.62934081809447*^9}, { 3.629340849614993*^9, 3.629340899714168*^9}, {3.6293410738113337`*^9, 3.6293411054385777`*^9}, 3.6293418132986794`*^9, {3.629344670455871*^9, 3.6293446963241377`*^9}, {3.69181686049205*^9, 3.691817269191139*^9}, { 3.6918173152889547`*^9, 3.6918173772397957`*^9}, {3.691817756229415*^9, 3.6918177609950523`*^9}, {3.691818934978718*^9, 3.6918189662325373`*^9}, { 3.691819857216969*^9, 3.6918199536372137`*^9}, {3.693992738340912*^9, 3.693992739970517*^9}, {3.693992830553602*^9, 3.6939929888834543`*^9}, { 3.693993074971363*^9, 3.693993106567788*^9}, {3.694072436145273*^9, 3.694072464901731*^9}, {3.694072502280669*^9, 3.694072568903949*^9}, { 3.694072701672122*^9, 3.694072733828229*^9}, {3.694073518272686*^9, 3.694073544691671*^9}, {3.694073788461231*^9, 3.694073794569219*^9}, { 3.8943553547623367`*^9, 3.894355372038225*^9}, {3.894355500615923*^9, 3.8943556423704643`*^9}, {3.894356084544202*^9, 3.894356114818677*^9}, { 3.894356193045001*^9, 3.894356399386421*^9}, 3.894357064791*^9, { 3.894357305220826*^9, 3.894357437561091*^9}, {3.894357955574892*^9, 3.894357961498468*^9}, {3.894358022575542*^9, 3.894358041725114*^9}, { 3.89435809196469*^9, 3.894358118815227*^9}, {3.8943581730796013`*^9, 3.894358174053856*^9}, {3.894358278781322*^9, 3.894358330658637*^9}, { 3.894359301655196*^9, 3.894359418995804*^9}}], Cell[BoxData["2.8070337683438114`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.89436046677752*^9}], Cell[BoxData["200.00000000000426`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.894360466780438*^9}], Cell[BoxData["14.860259000560243`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.894360466782728*^9}], Cell[BoxData["199.99999999999983`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.8943604667849407`*^9}], Cell[BoxData["100.2506265664176`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.8943604667872267`*^9}], Cell[BoxData["100.25062656641705`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.894360466789369*^9}], Cell[BoxData["93.32451245570259`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.8943604667915363`*^9}], Cell[BoxData["65.02720242789893`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.894360466793858*^9}], Cell[BoxData["0.4069050183232015`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.894360466796032*^9}], Cell[BoxData["0.4069050183232007`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.894360466798355*^9}], Cell[BoxData["0.4069050183232007`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.8943604668005543`*^9}], Cell[BoxData["0.40690504138182176`"], "Output", CellChangeTimes->{ 3.610567239133748*^9, 3.610567693644808*^9, {3.610601012543502*^9, 3.610601042368022*^9}, 3.6106011187313128`*^9, 3.610642047987028*^9, 3.6107047630913057`*^9, {3.6292163882729607`*^9, 3.629216409185521*^9}, 3.629216452678238*^9, {3.629217433093609*^9, 3.629217458022676*^9}, 3.6292177371686296`*^9, {3.629264356877611*^9, 3.629264371044162*^9}, 3.62926957830231*^9, {3.629341088458417*^9, 3.629341106626956*^9}, 3.629341813942048*^9, 3.629341935060129*^9, 3.6293447157382317`*^9, 3.629377688741724*^9, 3.629464182463147*^9, {3.691817219408803*^9, 3.6918172410763893`*^9}, 3.69181727251726*^9, {3.691817365268092*^9, 3.69181737793106*^9}, 3.691817761849625*^9, 3.6918189669984217`*^9, 3.691819011906039*^9, {3.691819910362315*^9, 3.691819954670439*^9}, 3.693992948138544*^9, 3.693992989450602*^9, {3.6939930792386293`*^9, 3.69399310920816*^9}, 3.694072399384956*^9, 3.694072466563129*^9, { 3.694072528922606*^9, 3.69407257334441*^9}, 3.694072734883706*^9, 3.694073545550599*^9, 3.6940737980672493`*^9, {3.8943553583915653`*^9, 3.894355379550091*^9}, {3.894355596923451*^9, 3.894355600577169*^9}, 3.89435565814253*^9, {3.8943561057526407`*^9, 3.894356120155342*^9}, { 3.894356278183148*^9, 3.8943563037824583`*^9}, 3.894356400011545*^9, 3.894357065951386*^9, {3.894357354932864*^9, 3.894357401056988*^9}, { 3.894357431872126*^9, 3.894357438153936*^9}, 3.894357964946764*^9, 3.894358175615156*^9, 3.894358347109344*^9, 3.894359407883816*^9, 3.894360466802786*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Question 2 \[LongDash]\[NonBreakingSpace]Single sampling plan for attributes \ with RECTIFYING INSPECTION\ \>", "Subsubsection", CellChangeTimes->{{3.728978072142015*^9, 3.728978078436468*^9}, { 3.7289787758916683`*^9, 3.728978777915042*^9}, {3.728979117073182*^9, 3.728979124168069*^9}, {3.72897937739428*^9, 3.7289793834544497`*^9}, { 3.728980621199177*^9, 3.728980659270624*^9}, {3.72898742841497*^9, 3.728987435586033*^9}, {3.8872035562635403`*^9, 3.887203571506999*^9}, { 3.889075948658783*^9, 3.889075948905105*^9}, {3.893068488938219*^9, 3.893068489604116*^9}, 3.894353121097001*^9, {3.894355313323731*^9, 3.894355315510623*^9}, {3.89436020311318*^9, 3.894360270691959*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"Evaluate", "[", RowBox[{ RowBox[{"Context", "[", "]"}], "<>", "\"\<*\>\""}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["p", "1"], "=", "0.005"}], ";"}], " ", StyleBox[ RowBox[{"(*", " ", "AQL", " ", "*)"}], FontSize->9]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"\[Alpha]", "=", RowBox[{"1", "-", "0.95"}]}], ";"}], " ", StyleBox[ RowBox[{"(*", " ", RowBox[{ RowBox[{"producer", "'"}], "s", " ", "risk"}], " ", "*)"}], FontSize->9]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["p", "2"], "=", "0.175"}], ";"}], " ", StyleBox[ RowBox[{"(*", " ", "LTPD", " ", "*)"}], FontSize->9]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"\[Beta]", "=", "0.15"}], ";"}], " ", StyleBox[ RowBox[{"(*", " ", RowBox[{ RowBox[{"consumer", "'"}], "s", " ", "risk"}], " ", "*)"}], FontSize->9], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Q", "[", RowBox[{"c_", ",", "x_"}], "]"}], "=", RowBox[{"Quantile", "[", RowBox[{ RowBox[{"ChiSquareDistribution", "[", RowBox[{"2", "\[Times]", RowBox[{"(", RowBox[{"c", "+", "1"}], ")"}]}], "]"}], ",", "x"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"r", "[", "c_", "]"}], "=", FractionBox[ RowBox[{"N", "[", RowBox[{ RowBox[{"Q", "[", RowBox[{"c", ",", RowBox[{"1", "-", "\[Beta]"}]}], "]"}], ",", "5"}], "]"}], RowBox[{"N", "[", RowBox[{ RowBox[{"Q", "[", RowBox[{"c", ",", "\[Alpha]"}], "]"}], ",", "5"}], "]"}]]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"i", "=", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{ RowBox[{"r", "[", "i", "]"}], ">", FractionBox[ SubscriptBox["p", "2"], SubscriptBox["p", "1"]]}], ",", RowBox[{ RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", "i", ",", "\"\< because r(c)=\>\"", ",", RowBox[{"N", "[", RowBox[{ RowBox[{"Q", "[", RowBox[{"i", ",", RowBox[{"1", "-", "\[Beta]"}]}], "]"}], ",", "5"}], "]"}], ",", "\"\\"", ",", RowBox[{"N", "[", RowBox[{ RowBox[{"Q", "[", RowBox[{"i", ",", "\[Alpha]"}], "]"}], ",", "5"}], "]"}], " ", ",", "\"\<=\>\"", ",", RowBox[{"r", "[", "i", "]"}], ",", "\"\<>\!\(\*FractionBox[SubscriptBox[\(p\), \(2\)], SubscriptBox[\(p\), \ \(1\)]]\)=\>\"", ",", FractionBox[ SubscriptBox["p", "2"], SubscriptBox["p", "1"]]}], "]"}], ";", RowBox[{"i", "++"}]}]}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", "i", ",", "\"\< because r(c)=\>\"", ",", RowBox[{"N", "[", RowBox[{ RowBox[{"Q", "[", RowBox[{"i", ",", RowBox[{"1", "-", "\[Beta]"}]}], "]"}], ",", "5"}], "]"}], ",", "\"\\"", ",", RowBox[{"N", "[", RowBox[{ RowBox[{"Q", "[", RowBox[{"i", ",", "\[Alpha]"}], "]"}], ",", "5"}], "]"}], " ", ",", "\"\<=\>\"", ",", RowBox[{"r", "[", "i", "]"}], ",", "\"\<\[LessEqual]\!\(\*FractionBox[SubscriptBox[\(p\), \(2\)], \ SubscriptBox[\(p\), \(1\)]]\)=\>\"", ",", FractionBox[ SubscriptBox["p", "2"], SubscriptBox["p", "1"]]}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"samplesize", "[", "c_", "]"}], "=", RowBox[{"Ceiling", "[", FractionBox[ RowBox[{"Q", "[", RowBox[{"i", ",", RowBox[{"1", "-", "\[Beta]"}]}], "]"}], RowBox[{"2", "\[Times]", SubscriptBox["p", "2"]}]], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Ceiling", "[", FractionBox[ RowBox[{"Q", "[", RowBox[{"i", ",", RowBox[{"1", "-", "\[Beta]"}]}], "]"}], RowBox[{"2", "\[Times]", SubscriptBox["p", "2"]}]], "]"}], "\[LessEqual]", RowBox[{"Floor", "[", FractionBox[ RowBox[{"Q", "[", RowBox[{"i", ",", "\[Alpha]"}], "]"}], RowBox[{"2", "\[Times]", SubscriptBox["p", "1"]}]], "]"}]}], ",", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", RowBox[{"samplesize", "[", "i", "]"}], ",", "\"\<.\>\""}], "]"}], ",", RowBox[{"Print", "[", "\"\\"", "]"}]}], "]"}]}], "Input", CellChangeTimes->{ 3.532605428673882*^9, {3.581247455648386*^9, 3.581247466526042*^9}, { 3.58124756210353*^9, 3.5812475670958023`*^9}, {3.581247736672215*^9, 3.581247748140965*^9}, {3.58124785896005*^9, 3.58124785934206*^9}, { 3.5816718651212883`*^9, 3.581671990019285*^9}, {3.581672309336495*^9, 3.581672338433188*^9}, {3.581672452757107*^9, 3.581672453754414*^9}, { 3.62935306064037*^9, 3.629353083908741*^9}, {3.629353119733007*^9, 3.629353179657146*^9}, {3.6293532283641233`*^9, 3.629353297438581*^9}, { 3.629353334092362*^9, 3.629353359557012*^9}, {3.629354115348728*^9, 3.62935417080341*^9}, {3.629354256253642*^9, 3.629354256353353*^9}, { 3.6940819598965*^9, 3.6940819682609453`*^9}, {3.694082011272462*^9, 3.694082032908976*^9}, {3.89436033052048*^9, 3.894360344420833*^9}, { 3.894360386849416*^9, 3.8943603890973*^9}, 3.8943604595757113`*^9, { 3.894360573839727*^9, 3.894360581588643*^9}, {3.89436063457828*^9, 3.8943607093545713`*^9}, {3.894360740880534*^9, 3.894360769643279*^9}, { 3.894361775450355*^9, 3.894361805124662*^9}, {3.894361837317771*^9, 3.8943618682637978`*^9}, {3.894361959492255*^9, 3.894362038117751*^9}, { 3.894362315188889*^9, 3.894362343937152*^9}, {3.894362381989642*^9, 3.8943623844881372`*^9}, {3.8943629797527437`*^9, 3.8943631903567657`*^9}, {3.8943632557464867`*^9, 3.894363304921726*^9}}], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"Do not use acceptance number c=\"\>", "\[InvisibleSpace]", "0", "\[InvisibleSpace]", "\<\" because r(c)=\"\>", "\[InvisibleSpace]", "3.794239969771762`", "\[InvisibleSpace]", "\<\"/\"\>", "\[InvisibleSpace]", "0.10258658877510116`", "\[InvisibleSpace]", "\<\"=\"\>", "\[InvisibleSpace]", "36.98573093301514`", "\[InvisibleSpace]", "\<\">\\!\\(\\*FractionBox[SubscriptBox[\\(p\\), \\(2\ \\)], SubscriptBox[\\(p\\), \\(1\\)]]\\)=\"\>", "\[InvisibleSpace]", "35.`"}], SequenceForm[ "Do not use acceptance number c=", 0, " because r(c)=", 3.794239969771762, "/", 0.10258658877510116`, "=", 36.98573093301514, ">\!\(\*FractionBox[SubscriptBox[\(p\), \(2\)], SubscriptBox[\(p\), \ \(1\)]]\)=", 35.], Editable->False]], "Print", CellChangeTimes->{ 3.5812474917380743`*^9, 3.58124756819413*^9, {3.581247738136841*^9, 3.5812477489157333`*^9}, 3.58124786471029*^9, 3.581247907080031*^9, { 3.581671949196847*^9, 3.581671963653523*^9}, 3.5816722763239*^9, { 3.5816723099601927`*^9, 3.581672339553278*^9}, {3.581672454501172*^9, 3.581672478471991*^9}, 3.6293530890671186`*^9, {3.6293531215316467`*^9, 3.629353183019148*^9}, {3.629353239100585*^9, 3.629353301142063*^9}, { 3.62935333890705*^9, 3.62935336003929*^9}, 3.6293536945624866`*^9, { 3.629354124092083*^9, 3.629354171309757*^9}, 3.629354258541307*^9, 3.629354404114555*^9, 3.6294708095682697`*^9, 3.629470839978318*^9, 3.629471941234346*^9, 3.629472102060915*^9, 3.6940819702560453`*^9, { 3.694082018098744*^9, 3.694082033410187*^9}, 3.694149959984191*^9, 3.694150969448477*^9, 3.694157752011487*^9, {3.694157838927938*^9, 3.6941578549263906`*^9}, 3.894360345274507*^9, {3.894360460935989*^9, 3.894360470697587*^9}, 3.894360582791684*^9, 3.894360710349966*^9, { 3.894360759040967*^9, 3.894360770673149*^9}, {3.894361776134691*^9, 3.894361806249374*^9}, {3.894361863074456*^9, 3.894361868973769*^9}, { 3.8943619663217707`*^9, 3.894362002302685*^9}, 3.894362039161701*^9, 3.894362084515448*^9, {3.894362335635091*^9, 3.894362344573263*^9}, 3.894362385711423*^9, {3.894362992001525*^9, 3.894363190868415*^9}, { 3.894363259649087*^9, 3.894363305403614*^9}, 3.894539308725625*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"Use the acceptance number c=\"\>", "\[InvisibleSpace]", "1", "\[InvisibleSpace]", "\<\" because r(c)=\"\>", "\[InvisibleSpace]", "6.74488308721242`", "\[InvisibleSpace]", "\<\"/\"\>", "\[InvisibleSpace]", "0.7107230213973244`", "\[InvisibleSpace]", "\<\"=\"\>", "\[InvisibleSpace]", "9.49017111328626`", "\[InvisibleSpace]", \ "\<\"\[LessEqual]\\!\\(\\*FractionBox[SubscriptBox[\\(p\\), \\(2\\)], \ SubscriptBox[\\(p\\), \\(1\\)]]\\)=\"\>", "\[InvisibleSpace]", "35.`"}], SequenceForm[ "Use the acceptance number c=", 1, " because r(c)=", 6.74488308721242, "/", 0.7107230213973244, "=", 9.49017111328626, "\[LessEqual]\!\(\*FractionBox[SubscriptBox[\(p\), \(2\)], \ SubscriptBox[\(p\), \(1\)]]\)=", 35.], Editable->False]], "Print", CellChangeTimes->{ 3.5812474917380743`*^9, 3.58124756819413*^9, {3.581247738136841*^9, 3.5812477489157333`*^9}, 3.58124786471029*^9, 3.581247907080031*^9, { 3.581671949196847*^9, 3.581671963653523*^9}, 3.5816722763239*^9, { 3.5816723099601927`*^9, 3.581672339553278*^9}, {3.581672454501172*^9, 3.581672478471991*^9}, 3.6293530890671186`*^9, {3.6293531215316467`*^9, 3.629353183019148*^9}, {3.629353239100585*^9, 3.629353301142063*^9}, { 3.62935333890705*^9, 3.62935336003929*^9}, 3.6293536945624866`*^9, { 3.629354124092083*^9, 3.629354171309757*^9}, 3.629354258541307*^9, 3.629354404114555*^9, 3.6294708095682697`*^9, 3.629470839978318*^9, 3.629471941234346*^9, 3.629472102060915*^9, 3.6940819702560453`*^9, { 3.694082018098744*^9, 3.694082033410187*^9}, 3.694149959984191*^9, 3.694150969448477*^9, 3.694157752011487*^9, {3.694157838927938*^9, 3.6941578549263906`*^9}, 3.894360345274507*^9, {3.894360460935989*^9, 3.894360470697587*^9}, 3.894360582791684*^9, 3.894360710349966*^9, { 3.894360759040967*^9, 3.894360770673149*^9}, {3.894361776134691*^9, 3.894361806249374*^9}, {3.894361863074456*^9, 3.894361868973769*^9}, { 3.8943619663217707`*^9, 3.894362002302685*^9}, 3.894362039161701*^9, 3.894362084515448*^9, {3.894362335635091*^9, 3.894362344573263*^9}, 3.894362385711423*^9, {3.894362992001525*^9, 3.894363190868415*^9}, { 3.894363259649087*^9, 3.894363305403614*^9}, 3.8945393087500896`*^9}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"Use the sample size n=\"\>", "\[InvisibleSpace]", "20", "\[InvisibleSpace]", "\<\".\"\>"}], SequenceForm["Use the sample size n=", 20, "."], Editable->False]], "Print", CellChangeTimes->{ 3.5812474917380743`*^9, 3.58124756819413*^9, {3.581247738136841*^9, 3.5812477489157333`*^9}, 3.58124786471029*^9, 3.581247907080031*^9, { 3.581671949196847*^9, 3.581671963653523*^9}, 3.5816722763239*^9, { 3.5816723099601927`*^9, 3.581672339553278*^9}, {3.581672454501172*^9, 3.581672478471991*^9}, 3.6293530890671186`*^9, {3.6293531215316467`*^9, 3.629353183019148*^9}, {3.629353239100585*^9, 3.629353301142063*^9}, { 3.62935333890705*^9, 3.62935336003929*^9}, 3.6293536945624866`*^9, { 3.629354124092083*^9, 3.629354171309757*^9}, 3.629354258541307*^9, 3.629354404114555*^9, 3.6294708095682697`*^9, 3.629470839978318*^9, 3.629471941234346*^9, 3.629472102060915*^9, 3.6940819702560453`*^9, { 3.694082018098744*^9, 3.694082033410187*^9}, 3.694149959984191*^9, 3.694150969448477*^9, 3.694157752011487*^9, {3.694157838927938*^9, 3.6941578549263906`*^9}, 3.894360345274507*^9, {3.894360460935989*^9, 3.894360470697587*^9}, 3.894360582791684*^9, 3.894360710349966*^9, { 3.894360759040967*^9, 3.894360770673149*^9}, {3.894361776134691*^9, 3.894361806249374*^9}, {3.894361863074456*^9, 3.894361868973769*^9}, { 3.8943619663217707`*^9, 3.894362002302685*^9}, 3.894362039161701*^9, 3.894362084515448*^9, {3.894362335635091*^9, 3.894362344573263*^9}, 3.894362385711423*^9, {3.894362992001525*^9, 3.894363190868415*^9}, { 3.894363259649087*^9, 3.894363305403614*^9}, 3.894539308752584*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"Unnecessary", " ", "verification"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["n", "tot"], "=", "1000"}], ";", " ", StyleBox[ RowBox[{"(*", " ", RowBox[{"lot", " ", "size"}], " ", "*)"}], FontSize->10], "\[IndentingNewLine]", RowBox[{ RowBox[{"exactdist", "[", "p_", "]"}], "=", RowBox[{"HypergeometricDistribution", "[", RowBox[{ RowBox[{"samplesize", "[", "i", "]"}], ",", RowBox[{"Round", "[", RowBox[{ SubscriptBox["n", "tot"], "\[Times]", "p"}], "]"}], ",", SubscriptBox["n", "tot"]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"CDF", "[", RowBox[{ RowBox[{"exactdist", "[", SubscriptBox["p", "1"], "]"}], ",", "i"}], "]"}], "\[GreaterEqual]", RowBox[{"1", "-", "\[Alpha]"}]}], " ", "&&", RowBox[{ RowBox[{"CDF", "[", RowBox[{ RowBox[{"exactdist", "[", SubscriptBox["p", "2"], "]"}], ",", "i"}], "]"}], "\[LessEqual]", "\[Beta]"}]}], ",", RowBox[{ "Print", "[", "\"\\"", "]"}], ",", RowBox[{ "Print", "[", "\"\\"", "]"}]}], "]"}]}]}]], "Input", CellChangeTimes->{{3.894361927577982*^9, 3.894361950564671*^9}, { 3.894362059804772*^9, 3.8943622902601147`*^9}, 3.8943624731538677`*^9, { 3.8943625226798477`*^9, 3.8943625472363377`*^9}, {3.894362582079486*^9, 3.894362605293244*^9}, {3.89436263636924*^9, 3.894362641443512*^9}, { 3.894362674982443*^9, 3.8943628235601187`*^9}, 3.89436452325114*^9, { 3.8945393276454763`*^9, 3.894539340194544*^9}}], Cell[BoxData["\<\"The single sampling plan for attributes complies with the \ producer's and consumer's risk points.\"\>"], "Print", CellChangeTimes->{3.894362825447496*^9, 3.8943629950403347`*^9, 3.894363202045453*^9, 3.8943633233327923`*^9, 3.8943645394988127`*^9, 3.894539314306116*^9, 3.8945393470142603`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ StyleBox[ RowBox[{"(*", " ", RowBox[{"Average", " ", "Outgoing", " ", "Quality", " ", RowBox[{"(", "AOQ", ")"}], " ", "or", " ", "percentage", " ", "of", " ", "defective", " ", "due", " ", "to", " ", "rectifying", " ", "inspection", " ", "in", " ", "a", " ", "single", " ", "sampling", " ", "plan", " ", "and", " ", "using", " ", "the", " ", "binomial", " ", "approximation", " ", "to", " ", "the", " ", "acceptance", " ", "probability"}], " ", "*)"}], FontSize->10], RowBox[{ RowBox[{ RowBox[{ RowBox[{"AOQ", "[", RowBox[{"n_", ",", "c_", ",", "p_"}], "]"}], "=", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{ SubscriptBox["n", "tot"], "-", "n"}], ")"}], "\[Times]", "p", "\[Times]", RowBox[{"CDF", "[", RowBox[{ RowBox[{"BinomialDistribution", "[", RowBox[{"n", ",", "p"}], "]"}], ",", "c"}], "]"}]}], SubscriptBox["n", "tot"]]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"midp", "=", "0.1"}], ";"}], "\[IndentingNewLine]", RowBox[{"AOQ", "[", RowBox[{ RowBox[{"samplesize", "[", "i", "]"}], ",", "i", ",", "midp"}], "]"}], "\[IndentingNewLine]", StyleBox[ RowBox[{"(*", " ", RowBox[{ "Associated", " ", "relative", " ", "reduction", " ", "of", " ", "the", " ", "percentage", " ", "of", " ", "defective"}], " ", "*)"}], FontSize->10], "\[IndentingNewLine]", RowBox[{ RowBox[{"(", RowBox[{"1", "-", FractionBox[ RowBox[{"AOQ", "[", RowBox[{ RowBox[{"samplesize", "[", "i", "]"}], ",", "i", ",", "midp"}], "]"}], "midp"]}], ")"}], "\[Times]", "100"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Results", " ", "using", " ", "the", " ", "tables"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(", RowBox[{"1000", "-", "20"}], ")"}], "*", "midp", "*", RowBox[{"0.3917", "/", "1000"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{"%", "/", "midp"}]}], ")"}], "*", "100"}]}]}]], "Input", CellChangeTimes->{ 3.532605853537725*^9, {3.532606065511526*^9, 3.5326060793540163`*^9}, { 3.532606243987359*^9, 3.532606275994974*^9}, {3.532606485306294*^9, 3.532606486099886*^9}, {3.894362471892501*^9, 3.894362517292061*^9}, { 3.8943625700675383`*^9, 3.8943625727294893`*^9}, {3.894362850861459*^9, 3.894362936638308*^9}, {3.894363217519985*^9, 3.894363232369625*^9}, { 3.8943633425349407`*^9, 3.894363381048128*^9}, {3.894363429939167*^9, 3.894363463074844*^9}, {3.8943634987514057`*^9, 3.894363533951611*^9}, { 3.894364520652769*^9, 3.8943645462001047`*^9}, 3.894364609352087*^9, { 3.894365928145643*^9, 3.8943659492837048`*^9}, 3.8945393031321383`*^9}], Cell[BoxData["0.03839120581626645`"], "Output", CellChangeTimes->{ 3.894362836546735*^9, {3.894362916229774*^9, 3.89436293864913*^9}, 3.894363005709785*^9, {3.894363205038435*^9, 3.894363232917244*^9}, { 3.894363328598493*^9, 3.894363347670392*^9}, 3.8943634637975817`*^9, { 3.8943635005605*^9, 3.894363534725265*^9}, 3.894364542424378*^9, { 3.8943646000522413`*^9, 3.894364609915452*^9}, {3.894365942595893*^9, 3.89436594971894*^9}, 3.894539304602644*^9, 3.8945393494502907`*^9}], Cell[BoxData["61.60879418373355`"], "Output", CellChangeTimes->{ 3.894362836546735*^9, {3.894362916229774*^9, 3.89436293864913*^9}, 3.894363005709785*^9, {3.894363205038435*^9, 3.894363232917244*^9}, { 3.894363328598493*^9, 3.894363347670392*^9}, 3.8943634637975817`*^9, { 3.8943635005605*^9, 3.894363534725265*^9}, 3.894364542424378*^9, { 3.8943646000522413`*^9, 3.894364609915452*^9}, {3.894365942595893*^9, 3.89436594971894*^9}, 3.894539304602644*^9, 3.894539349452338*^9}], Cell[BoxData["0.0383866`"], "Output", CellChangeTimes->{ 3.894362836546735*^9, {3.894362916229774*^9, 3.89436293864913*^9}, 3.894363005709785*^9, {3.894363205038435*^9, 3.894363232917244*^9}, { 3.894363328598493*^9, 3.894363347670392*^9}, 3.8943634637975817`*^9, { 3.8943635005605*^9, 3.894363534725265*^9}, 3.894364542424378*^9, { 3.8943646000522413`*^9, 3.894364609915452*^9}, {3.894365942595893*^9, 3.89436594971894*^9}, 3.894539304602644*^9, 3.8945393494536753`*^9}], Cell[BoxData["61.6134`"], "Output", CellChangeTimes->{ 3.894362836546735*^9, {3.894362916229774*^9, 3.89436293864913*^9}, 3.894363005709785*^9, {3.894363205038435*^9, 3.894363232917244*^9}, { 3.894363328598493*^9, 3.894363347670392*^9}, 3.8943634637975817`*^9, { 3.8943635005605*^9, 3.894363534725265*^9}, 3.894364542424378*^9, { 3.8943646000522413`*^9, 3.894364609915452*^9}, {3.894365942595893*^9, 3.89436594971894*^9}, 3.894539304602644*^9, 3.894539349455039*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Question 3 \[LongDash]\[NonBreakingSpace]Single sampling plan for variables \ with KNOWN STANDARD DEVIATION\ \>", "Subsubsection", CellChangeTimes->{{3.728978072142015*^9, 3.728978078436468*^9}, { 3.7289787758916683`*^9, 3.728978777915042*^9}, {3.728979117073182*^9, 3.728979124168069*^9}, {3.72897937739428*^9, 3.7289793834544497`*^9}, { 3.728980621199177*^9, 3.728980659270624*^9}, {3.72898742841497*^9, 3.728987435586033*^9}, {3.8872035562635403`*^9, 3.887203571506999*^9}, { 3.889075948658783*^9, 3.889075948905105*^9}, {3.893068488938219*^9, 3.893068489604116*^9}, 3.894353121097001*^9, {3.894355313323731*^9, 3.894355315510623*^9}, {3.89436020311318*^9, 3.894360270691959*^9}, { 3.894539364307907*^9, 3.8945393803073893`*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ SubscriptBox["p", "1"], "=", "0.015"}], ";"}], " ", StyleBox[ RowBox[{"(*", " ", "AQL", " ", "*)"}], FontSize->9]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"\[Alpha]", "=", "0.05"}], ";"}], " ", StyleBox[ RowBox[{"(*", " ", RowBox[{ RowBox[{"producer", "'"}], "s", " ", "risk"}], " ", "*)"}], FontSize->9]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["p", "2"], "=", "0.065"}], ";", " ", StyleBox[ RowBox[{"(*", " ", "LTPD", " ", "*)"}], FontSize->9], "\[IndentingNewLine]", RowBox[{"\[Beta]", "=", "0.1"}], ";", " ", StyleBox[ RowBox[{"(*", " ", RowBox[{ RowBox[{"consumer", "'"}], "s", " ", "risk"}], " ", "*)"}], FontSize->9], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"gdist", "=", RowBox[{"NormalDistribution", "[", RowBox[{"0", ",", "1"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"\[CapitalPhi]", "[", "x_", "]"}], ":=", RowBox[{"CDF", "[", RowBox[{"gdist", ",", "x"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"\[CapitalOmega]", "[", "x_", "]"}], ":=", RowBox[{"Quantile", "[", RowBox[{"gdist", ",", "x"}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ SuperscriptBox[ RowBox[{"(", FractionBox[ RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"1", "-", "\[Alpha]"}], "]"}], "-", RowBox[{"\[CapitalOmega]", "[", "\[Beta]", "]"}]}], RowBox[{ RowBox[{"\[CapitalOmega]", "[", SubscriptBox["p", "2"], "]"}], "-", RowBox[{"\[CapitalOmega]", "[", SubscriptBox["p", "1"], "]"}]}]], ")"}], "2"], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["n", "\[Sigma]"], "=", RowBox[{"Ceiling", "[", SuperscriptBox[ RowBox[{"(", FractionBox[ RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"1", "-", "\[Alpha]"}], "]"}], "-", RowBox[{"\[CapitalOmega]", "[", "\[Beta]", "]"}]}], RowBox[{ RowBox[{"\[CapitalOmega]", "[", SubscriptBox["p", "2"], "]"}], "-", RowBox[{"\[CapitalOmega]", "[", SubscriptBox["p", "1"], "]"}]}]], ")"}], "2"], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["k", "\[Sigma]"], "=", FractionBox[ RowBox[{ RowBox[{ RowBox[{"\[CapitalOmega]", "[", SubscriptBox["p", "2"], "]"}], "\[Times]", RowBox[{"\[CapitalOmega]", "[", RowBox[{"1", "-", "\[Alpha]"}], "]"}]}], "-", RowBox[{ RowBox[{"\[CapitalOmega]", "[", SubscriptBox["p", "1"], "]"}], "\[Times]", RowBox[{"\[CapitalOmega]", "[", "\[Beta]", "]"}]}]}], RowBox[{ RowBox[{"\[CapitalOmega]", "[", "\[Beta]", "]"}], "-", RowBox[{"\[CapitalOmega]", "[", RowBox[{"1", "-", "\[Alpha]"}], "]"}]}]]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"PVar", "[", RowBox[{"n_", ",", "p_"}], "]"}], "=", RowBox[{"\[CapitalPhi]", "[", RowBox[{ SqrtBox["n"], "\[Times]", RowBox[{"(", RowBox[{ RowBox[{"-", SubscriptBox["k", "\[Sigma]"]}], "-", RowBox[{"\[CapitalOmega]", "[", "p", "]"}]}], ")"}]}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"i", "=", SubscriptBox["n", "\[Sigma]"]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"While", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"PVar", "[", RowBox[{"i", ",", SubscriptBox["p", "1"]}], "]"}], "<", RowBox[{"1", "-", "\[Alpha]"}]}], " ", "||", " ", RowBox[{ RowBox[{"PVar", "[", RowBox[{"i", ",", SubscriptBox["p", "2"]}], "]"}], ">", "\[Beta]"}]}], ",", RowBox[{ RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", "i", ",", "\"\< because \!\(\*SubscriptBox[\(P\), \ \(a\)]\)[\!\(\*SubscriptBox[\(p\), \(1\)]\)]=\>\"", ",", RowBox[{"PVar", "[", RowBox[{"i", ",", SubscriptBox["p", "1"]}], "]"}], ",", "\"\<<\>\"", ",", RowBox[{"1", "-", "\[Alpha]"}], " ", ",", "\"\< or \!\(\*SubscriptBox[\(P\), \(a\)]\)[\!\(\*SubscriptBox[\(p\), \ \(2\)]\)]=\>\"", ",", RowBox[{"PVar", "[", RowBox[{"i", ",", SubscriptBox["p", "2"]}], "]"}], ",", "\"\<>\>\"", ",", "\[Beta]"}], "]"}], ";", RowBox[{"i", "++"}]}]}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", "i", ",", "\"\< and acceptance constant \>\"", ",", SubscriptBox["k", "\[Sigma]"], ",", "\"\< because \!\(\*SubscriptBox[\(P\), \(a\)]\)[\!\(\*SubscriptBox[\(p\), \ \(1\)]\)]=\>\"", ",", RowBox[{"PVar", "[", RowBox[{"i", ",", SubscriptBox["p", "1"]}], "]"}], ",", "\"\<\[GreaterEqual]\>\"", ",", RowBox[{"1", "-", "\[Alpha]"}], " ", ",", "\"\< and \!\(\*SubscriptBox[\(P\), \(a\)]\)[\!\(\*SubscriptBox[\(p\), \(2\ \)]\)]=\>\"", ",", RowBox[{"PVar", "[", RowBox[{"i", ",", SubscriptBox["p", "2"]}], "]"}], ",", "\"\<\[LessEqual]\>\"", ",", "\[Beta]"}], "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["n", "\[Sigma]"], "=", "i"}], ";"}]}], "Input", CellChangeTimes->{ 3.532606701038724*^9, {3.579534321304598*^9, 3.5795343637293587`*^9}, { 3.579534394947639*^9, 3.579534399443844*^9}, {3.610568712647711*^9, 3.610568746136747*^9}, 3.6105688178022118`*^9, {3.6105700673195744`*^9, 3.610570079259368*^9}, {3.610570130197524*^9, 3.6105701303330793`*^9}, 3.610570284437396*^9, {3.894540876120837*^9, 3.894540885941831*^9}, { 3.8945410610588217`*^9, 3.894541077321045*^9}, {3.894541466568733*^9, 3.894541474305337*^9}}], Cell[BoxData[ InterpretationBox[ RowBox[{"\<\"Use sample size \\!\\(\\*SubscriptBox[\\(n\\), \\(\[Sigma]\\)]\ \\)=\"\>", "\[InvisibleSpace]", "20", "\[InvisibleSpace]", "\<\" and acceptance constant \"\>", "\[InvisibleSpace]", "1.8013768960323127`", "\[InvisibleSpace]", "\<\" because \\!\\(\\*SubscriptBox[\\(P\\), \\(a\\)]\ \\)[\\!\\(\\*SubscriptBox[\\(p\\), \\(1\\)]\\)]=\"\>", "\[InvisibleSpace]", "0.9504197103316847`", "\[InvisibleSpace]", "\<\"\[GreaterEqual]\"\>", "\[InvisibleSpace]", "0.95`", "\[InvisibleSpace]", "\<\" and \\!\\(\\*SubscriptBox[\\(P\\), \\(a\\)]\\)[\ \\!\\(\\*SubscriptBox[\\(p\\), \\(2\\)]\\)]=\"\>", "\[InvisibleSpace]", "0.09944281968066127`", "\[InvisibleSpace]", "\<\"\[LessEqual]\"\>", "\[InvisibleSpace]", "0.1`"}], SequenceForm[ "Use sample size \!\(\*SubscriptBox[\(n\), \(\[Sigma]\)]\)=", 20, " and acceptance constant ", 1.8013768960323127`, " because \!\(\*SubscriptBox[\(P\), \(a\)]\)[\!\(\*SubscriptBox[\(p\), \(1\ \)]\)]=", 0.9504197103316847, "\[GreaterEqual]", 0.95, " and \!\(\*SubscriptBox[\(P\), \(a\)]\)[\!\(\*SubscriptBox[\(p\), \ \(2\)]\)]=", 0.09944281968066127, "\[LessEqual]", 0.1], Editable->False]], "Print", CellChangeTimes->{ 3.894540889393619*^9, 3.8945412048401213`*^9, 3.894541243504141*^9, { 3.894541467203106*^9, 3.894541474932262*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "The", " ", "2", "nd", " ", "condition", " ", "fails", " ", "if", " ", "we", " ", "use", " ", "the", " ", "tables"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Round", "[", RowBox[{ RowBox[{ SqrtBox["20"], "*", RowBox[{"(", RowBox[{ RowBox[{"-", "1.80138"}], "+", "2.1701"}], ")"}]}], ",", "0.01"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Round", "[", RowBox[{ RowBox[{ SqrtBox["20"], "*", RowBox[{"(", RowBox[{ RowBox[{"-", "1.80138"}], "+", "1.5141"}], ")"}]}], ",", "0.01"}], "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", " ", RowBox[{"(*", " ", RowBox[{ RowBox[{"Thus", " ", SubscriptBox["n", "\[Sigma]"]}], "+", "1"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Round", "[", RowBox[{ RowBox[{ SqrtBox[ RowBox[{ SubscriptBox["n", "\[Sigma]"], "+", "1"}]], "*", RowBox[{"(", RowBox[{ RowBox[{"-", "1.80138"}], "+", "2.1701"}], ")"}]}], ",", "0.01"}], "]"}], "\[IndentingNewLine]", "0.9545", "\[IndentingNewLine]", RowBox[{"Round", "[", RowBox[{ RowBox[{ SqrtBox[ RowBox[{ SubscriptBox["n", "\[Sigma]"], "+", "1"}]], "*", RowBox[{"(", RowBox[{ RowBox[{"-", "1.80138"}], "+", "1.5141"}], ")"}]}], ",", "0.01"}], "]"}], "\[IndentingNewLine]", RowBox[{"1", "-", "0.9066"}]}]}]], "Input", CellChangeTimes->{{3.894542025435863*^9, 3.8945420445806103`*^9}, { 3.894542120259251*^9, 3.894542139994691*^9}, {3.8945422442353773`*^9, 3.894542248961932*^9}, {3.894542301474271*^9, 3.894542301887293*^9}, { 3.894542355288068*^9, 3.894542420976164*^9}, {3.8945424774027147`*^9, 3.894542535503819*^9}, {3.894542573293298*^9, 3.894542579004736*^9}, { 3.894542623332794*^9, 3.894542642695528*^9}, {3.894542688371867*^9, 3.8945427362091722`*^9}, {3.8945429626402617`*^9, 3.894543019365452*^9}, { 3.894543065229423*^9, 3.89454308998059*^9}}], Cell[BoxData["1.69`"], "Output", CellChangeTimes->{ 3.8945421410063763`*^9, 3.894542249813286*^9, 3.8945423029474173`*^9, { 3.894542369843206*^9, 3.89454242251192*^9}, {3.894542480901122*^9, 3.894542535940217*^9}, 3.894542582124893*^9, {3.894542624866941*^9, 3.8945426438476686`*^9}, 3.894542696006672*^9, 3.894542736920155*^9, 3.8945430279384117`*^9, 3.894543093140217*^9}], Cell[BoxData["0.9545`"], "Output", CellChangeTimes->{ 3.8945421410063763`*^9, 3.894542249813286*^9, 3.8945423029474173`*^9, { 3.894542369843206*^9, 3.89454242251192*^9}, {3.894542480901122*^9, 3.894542535940217*^9}, 3.894542582124893*^9, {3.894542624866941*^9, 3.8945426438476686`*^9}, 3.894542696006672*^9, 3.894542736920155*^9, 3.8945430279384117`*^9, 3.894543093142942*^9}], Cell[BoxData[ RowBox[{"-", "1.32`"}]], "Output", CellChangeTimes->{ 3.8945421410063763`*^9, 3.894542249813286*^9, 3.8945423029474173`*^9, { 3.894542369843206*^9, 3.89454242251192*^9}, {3.894542480901122*^9, 3.894542535940217*^9}, 3.894542582124893*^9, {3.894542624866941*^9, 3.8945426438476686`*^9}, 3.894542696006672*^9, 3.894542736920155*^9, 3.8945430279384117`*^9, 3.894543093145033*^9}], Cell[BoxData["0.09340000000000004`"], "Output", CellChangeTimes->{ 3.8945421410063763`*^9, 3.894542249813286*^9, 3.8945423029474173`*^9, { 3.894542369843206*^9, 3.89454242251192*^9}, {3.894542480901122*^9, 3.894542535940217*^9}, 3.894542582124893*^9, {3.894542624866941*^9, 3.8945426438476686`*^9}, 3.894542696006672*^9, 3.894542736920155*^9, 3.8945430279384117`*^9, 3.894543093147091*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"U", "=", "3"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sigma", "=", "0.1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"dist", "=", RowBox[{"NormalDistribution", "[", RowBox[{ RowBox[{"U", "-", RowBox[{"2", "*", "sigma"}]}], ",", "sigma"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"data", "=", RowBox[{"RandomVariate", "[", RowBox[{"dist", ",", RowBox[{ SubscriptBox["n", "\[Sigma]"], "+", "1"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Mean", "[", "data", "]"}], "\[IndentingNewLine]", FractionBox[ RowBox[{"U", "-", RowBox[{"Mean", "[", "data", "]"}]}], "sigma"], "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ FractionBox[ RowBox[{"U", "-", RowBox[{"Mean", "[", "data", "]"}]}], "sigma"], "\[GreaterEqual]", SubscriptBox["k", "\[Sigma]"]}], ",", RowBox[{"Print", "[", "\"\\"", "]"}], ",", RowBox[{"Print", "[", "\"\\"", "]"}]}], "]"}]}], "Input", CellChangeTimes->{{3.610569661612401*^9, 3.610569666512258*^9}, { 3.6105697503413897`*^9, 3.6105698651763563`*^9}, {3.610569919995222*^9, 3.610569928844089*^9}, {3.610570570499569*^9, 3.6105705708373337`*^9}, { 3.6105964731854*^9, 3.610596473612959*^9}, {3.894540978219243*^9, 3.8945409785184298`*^9}, {3.8945410186197863`*^9, 3.894541047909112*^9}, { 3.8945410848090773`*^9, 3.894541142284721*^9}, {3.894541194536516*^9, 3.894541307101515*^9}, {3.894543120780569*^9, 3.89454315841819*^9}}], Cell[BoxData["2.7801175288630295`"], "Output", CellChangeTimes->{ 3.610569788694401*^9, 3.6105698245098743`*^9, 3.610569934585927*^9, { 3.6105705446881523`*^9, 3.610570599048304*^9}, 3.610596476057232*^9, { 3.8945411996354837`*^9, 3.894541207369759*^9}, {3.8945412451070957`*^9, 3.8945413102693443`*^9}, {3.894543123534935*^9, 3.894543158864936*^9}}], Cell[BoxData["2.1988247113697046`"], "Output", CellChangeTimes->{ 3.610569788694401*^9, 3.6105698245098743`*^9, 3.610569934585927*^9, { 3.6105705446881523`*^9, 3.610570599048304*^9}, 3.610596476057232*^9, { 3.8945411996354837`*^9, 3.894541207369759*^9}, {3.8945412451070957`*^9, 3.8945413102693443`*^9}, {3.894543123534935*^9, 3.8945431588664923`*^9}}], Cell[BoxData["\<\"We should accept the lot.\"\>"], "Print", CellChangeTimes->{{3.894541264884635*^9, 3.894541310271914*^9}, { 3.894543123538581*^9, 3.894543158867445*^9}}] }, Open ]] }, Open ]] }, WindowSize->{861, 1041}, WindowMargins->{{Automatic, 143}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, FrontEndVersion->"10.2 for Mac OS X x86 (32-bit, 64-bit Kernel) (July 29, \ 2015)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 490, 7, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[1073, 31, 940, 19, 29, "Subsubsection"], Cell[CellGroupData[{ Cell[2038, 54, 8150, 215, 758, "Input"], Cell[10191, 271, 1610, 23, 28, "Output"], Cell[11804, 296, 1611, 23, 28, "Output"], Cell[13418, 321, 1611, 23, 28, "Output"], Cell[15032, 346, 1613, 23, 28, "Output"], Cell[16648, 371, 1612, 23, 28, "Output"], Cell[18263, 396, 1611, 23, 28, "Output"], Cell[19877, 421, 1612, 23, 28, "Output"], Cell[21492, 446, 1610, 23, 28, "Output"], Cell[23105, 471, 1611, 23, 28, "Output"], Cell[24719, 496, 1611, 23, 28, "Output"], Cell[26333, 521, 1613, 23, 28, "Output"], Cell[27949, 546, 1612, 23, 28, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[29610, 575, 717, 11, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[30352, 590, 6021, 166, 442, "Input"], Cell[CellGroupData[{ Cell[36398, 760, 2280, 37, 39, "Print"], Cell[38681, 799, 2286, 36, 39, "Print"], Cell[40970, 837, 1694, 26, 22, "Print"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[42713, 869, 1976, 50, 182, "Input"], Cell[44692, 921, 320, 4, 22, "Print"] }, Open ]], Cell[CellGroupData[{ Cell[45049, 930, 2897, 69, 249, "Input"], Cell[47949, 1001, 500, 7, 28, "Output"], Cell[48452, 1010, 496, 7, 28, "Output"], Cell[48951, 1019, 490, 7, 28, "Output"], Cell[49444, 1028, 486, 7, 28, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[49979, 1041, 771, 12, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[50775, 1057, 6002, 169, 474, "Input"], Cell[56780, 1228, 1358, 24, 38, "Print"] }, Open ]], Cell[CellGroupData[{ Cell[58175, 1257, 2139, 59, 215, "Input"], Cell[60317, 1318, 392, 6, 28, "Output"], Cell[60712, 1326, 394, 6, 28, "Output"], Cell[61109, 1334, 409, 7, 28, "Output"], Cell[61521, 1343, 407, 6, 28, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[61965, 1354, 1611, 39, 180, "Input"], Cell[63579, 1395, 363, 5, 28, "Output"], Cell[63945, 1402, 365, 5, 28, "Output"], Cell[64313, 1409, 174, 2, 22, "Print"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)