Intelligent Quality Control

A software tool for exploring the application of convolutional neural networks to quality control samples of very small size

Rallou A. Chatzimichail, PhD 
rallou@hcsl.com
Aristides T. Hatjimihail, MD, PhD
 ath@hcsl.com

Hellenic Complex Systems Laboratory, Kostis Palamas 21, 66131 Drama, Greece.

Clear["`*"]
Off[General::stop];
minfn=(10^(-100));
pfrn[1,1]=0.12724`;
prn[1,1,1]={{0.12724`,0.12724`},{0.16824`,0.13113`},{0.2057`,0.13683`},{0.24066`,0.14475`},{0.27748`,0.15741`},{0.30849`,0.17319`},{0.34451`,0.19298`},{0.3697`,0.21563`},{0.39689`,0.24599`},{0.41983`,0.27418`},{0.44485`,0.30802`},{0.46922`,0.33974`},{0.48695`,0.37869`},{0.50905`,0.41291`},{0.5237`,0.44979`},{0.54303`,0.49473`},{0.55927`,0.52998`},{0.57375`,0.56989`},{0.58485`,0.61016`},{0.6001`,0.64757`},{0.60917`,0.68431`},{0.62089`,0.71476`},{0.63329`,0.75057`},{0.64493`,0.78091`},{0.65399`,0.809`},{0.66216`,0.83498`},{0.6719`,0.86232`},{0.68048`,0.88136`},{0.68878`,0.89914`},{0.69468`,0.91507`},{0.70487`,0.92923`},{0.71041`,0.94202`},{0.715`,0.95323`},{0.72128`,0.96157`},{0.72916`,0.96986`},{0.73387`,0.9761`},{0.73968`,0.98064`},{0.74545`,0.98509`},{0.74974`,0.98861`},{0.75422`,0.99115`},{0.76134`,0.99352`},{0.76484`,0.99496`},{0.7691`,0.99615`},{0.77579`,0.99743`},{0.77652`,0.99812`},{0.77973`,0.99831`},{0.78817`,0.99878`},{0.78994`,0.99927`},{0.79212`,0.99951`},{0.79603`,0.99976`},{0.79895`,0.99976`},{0.803`,0.99984`},{0.80664`,0.99989`},{0.809`,0.99991`},{0.81`,0.99998`},{0.81357`,0.99996`},{0.81925`,0.99994`},{0.81912`,0.99997`},{0.82284`,1.`},{0.82236`,1.`},{0.8297`,1.`}};
pfrn[2,1]=0.114545`;
prn[2,2,1]={{0.114545`,0.114545`},{0.16628`,0.1166`},{0.21886`,0.12399`},{0.27641`,0.13856`},{0.32854`,0.15469`},{0.37585`,0.18117`},{0.42415`,0.21124`},{0.46939`,0.24386`},{0.50927`,0.28031`},{0.54702`,0.32442`},{0.57723`,0.36959`},{0.61063`,0.41547`},{0.63506`,0.46764`},{0.65979`,0.51947`},{0.68527`,0.57099`},{0.70232`,0.62014`},{0.72408`,0.66928`},{0.74089`,0.71436`},{0.7577`,0.75697`},{0.76916`,0.80041`},{0.78491`,0.83553`},{0.79643`,0.86527`},{0.80882`,0.89337`},{0.81833`,0.91612`},{0.82606`,0.93289`},{0.83477`,0.95029`},{0.84232`,0.96314`},{0.85117`,0.97312`},{0.85926`,0.98021`},{0.8649`,0.98586`},{0.87182`,0.98943`},{0.87689`,0.993`},{0.88298`,0.99515`},{0.88918`,0.99685`},{0.89303`,0.99776`},{0.898`,0.99863`},{0.9008`,0.99919`},{0.90606`,0.9994`},{0.90787`,0.99972`},{0.91378`,0.99973`},{0.91556`,0.99992`},{0.92023`,0.99994`},{0.92126`,0.99996`},{0.92553`,0.99994`},{0.92757`,0.99999`},{0.9307`,1.`},{0.93098`,1.`},{0.93425`,1.`},{0.93631`,1.`},{0.93911`,1.`},{0.94043`,1.`},{0.94191`,1.`},{0.94479`,1.`},{0.94644`,1.`},{0.94694`,1.`},{0.94907`,1.`},{0.95093`,1.`},{0.95304`,1.`},{0.95321`,1.`},{0.95403`,1.`},{0.95586`,1.`}};
pfrn[3,1]=0.12081375`;
prn[3,3,1]={{0.12081375`,0.12081375`},{0.18425`,0.12361`},{0.25605`,0.13505`},{0.3229`,0.15214`},{0.38996`,0.17887`},{0.45417`,0.20885`},{0.51043`,0.24751`},{0.56149`,0.29023`},{0.60961`,0.34226`},{0.65212`,0.39583`},{0.68611`,0.45281`},{0.71795`,0.51505`},{0.74786`,0.57637`},{0.77121`,0.63284`},{0.79381`,0.69435`},{0.81426`,0.74477`},{0.83008`,0.79246`},{0.84637`,0.83525`},{0.85756`,0.87285`},{0.87063`,0.89989`},{0.8827`,0.9271`},{0.89215`,0.94801`},{0.90247`,0.96185`},{0.90762`,0.97436`},{0.91574`,0.98163`},{0.92148`,0.98744`},{0.92834`,0.99232`},{0.93332`,0.99475`},{0.93764`,0.99717`},{0.94193`,0.99804`},{0.94611`,0.9992`},{0.94906`,0.99951`},{0.95275`,0.99975`},{0.95524`,0.99986`},{0.95776`,0.99994`},{0.96111`,0.99995`},{0.96375`,0.99999`},{0.96508`,0.99999`},{0.96864`,0.99999`},{0.96972`,0.99999`},{0.97067`,1.`},{0.97174`,1.`},{0.97382`,1.`},{0.97464`,1.`},{0.97624`,1.`},{0.97826`,1.`},{0.97947`,1.`},{0.97988`,1.`},{0.98074`,1.`},{0.98238`,1.`},{0.98297`,1.`},{0.98354`,1.`},{0.98382`,1.`},{0.98583`,1.`},{0.98622`,1.`},{0.98648`,1.`},{0.98685`,1.`},{0.98793`,1.`},{0.98823`,1.`},{0.9885`,1.`},{0.98907`,1.`}};
pfrn[4,1]=0.1014825`;
prn[4,4,1]={{0.1014825`,0.1014825`},{0.16793`,0.10414`},{0.24584`,0.11813`},{0.32721`,0.13852`},{0.40533`,0.169`},{0.48118`,0.20581`},{0.54139`,0.25164`},{0.60378`,0.30445`},{0.65612`,0.36657`},{0.69854`,0.43349`},{0.73887`,0.50513`},{0.77474`,0.57102`},{0.80183`,0.64236`},{0.82474`,0.70955`},{0.8497`,0.76892`},{0.86701`,0.82111`},{0.8819`,0.86368`},{0.89616`,0.90184`},{0.90923`,0.93034`},{0.91664`,0.95207`},{0.92735`,0.96847`},{0.93504`,0.98017`},{0.94149`,0.98715`},{0.94758`,0.99254`},{0.95368`,0.99571`},{0.9565`,0.99765`},{0.96104`,0.99867`},{0.96617`,0.99944`},{0.96794`,0.99963`},{0.97201`,0.99983`},{0.97478`,0.99988`},{0.97643`,0.99997`},{0.97866`,0.99999`},{0.98038`,0.99999`},{0.98187`,0.99999`},{0.98385`,1.`},{0.98405`,1.`},{0.9865`,1.`},{0.98721`,1.`},{0.98806`,1.`},{0.98868`,1.`},{0.98972`,1.`},{0.99049`,1.`},{0.99108`,1.`},{0.99146`,1.`},{0.99238`,1.`},{0.99281`,1.`},{0.99294`,1.`},{0.99316`,1.`},{0.99419`,1.`},{0.99452`,1.`},{0.99475`,1.`},{0.99493`,1.`},{0.99556`,1.`},{0.99583`,1.`},{0.99605`,1.`},{0.99579`,1.`},{0.99654`,1.`},{0.99634`,1.`},{0.99677`,1.`},{0.99666`,1.`}};
pfrn[1,2]=0.03472625`;
prn[1,1,2]={{0.03472625`,0.03472625`},{0.0558`,0.03601`},{0.07891`,0.03904`},{0.10557`,0.04353`},{0.13293`,0.05066`},{0.15992`,0.05947`},{0.18841`,0.06899`},{0.21552`,0.08308`},{0.2419`,0.09805`},{0.26631`,0.11472`},{0.29334`,0.13437`},{0.31601`,0.15992`},{0.33856`,0.18239`},{0.35959`,0.20964`},{0.38065`,0.24012`},{0.39692`,0.27562`},{0.41897`,0.30711`},{0.43744`,0.34091`},{0.45327`,0.37731`},{0.4667`,0.41761`},{0.48402`,0.45941`},{0.49691`,0.49894`},{0.50917`,0.53585`},{0.52287`,0.57362`},{0.53555`,0.61549`},{0.54972`,0.65188`},{0.55922`,0.68681`},{0.5679`,0.72197`},{0.57948`,0.75465`},{0.58739`,0.78479`},{0.59602`,0.81551`},{0.60866`,0.83935`},{0.61577`,0.86275`},{0.62296`,0.88324`},{0.63216`,0.90065`},{0.6398`,0.91831`},{0.64541`,0.93263`},{0.65248`,0.94482`},{0.66059`,0.95506`},{0.66722`,0.96248`},{0.67266`,0.97073`},{0.68082`,0.97715`},{0.68598`,0.98097`},{0.69266`,0.98653`},{0.69773`,0.98963`},{0.70022`,0.99196`},{0.70456`,0.99396`},{0.71018`,0.99513`},{0.71915`,0.99644`},{0.71912`,0.99779`},{0.72723`,0.99821`},{0.73115`,0.99846`},{0.73507`,0.999`},{0.73741`,0.99924`},{0.74254`,0.99957`},{0.74713`,0.9996`},{0.74968`,0.99978`},{0.75366`,0.99985`},{0.7574`,0.99992`},{0.75948`,0.99995`},{0.76453`,0.99995`}};
pfrn[2,2]=0.0460775`;
prn[2,2,2]={{0.0460775`,0.0460775`},{0.07873`,0.04693`},{0.1158`,0.05233`},{0.16012`,0.06074`},{0.2044`,0.07187`},{0.25042`,0.08805`},{0.29827`,0.10635`},{0.3433`,0.13158`},{0.38303`,0.16171`},{0.42432`,0.19202`},{0.45533`,0.22847`},{0.49349`,0.27089`},{0.52572`,0.31392`},{0.554`,0.3648`},{0.58216`,0.41204`},{0.60669`,0.47011`},{0.63094`,0.52203`},{0.65073`,0.57244`},{0.66924`,0.62362`},{0.68974`,0.6722`},{0.70518`,0.72066`},{0.72242`,0.76248`},{0.73474`,0.80411`},{0.74943`,0.83695`},{0.76358`,0.86943`},{0.7761`,0.89749`},{0.78574`,0.91948`},{0.79435`,0.93808`},{0.80651`,0.95284`},{0.8139`,0.96484`},{0.82119`,0.97459`},{0.82999`,0.98188`},{0.83683`,0.9867`},{0.84473`,0.99075`},{0.85244`,0.99398`},{0.85668`,0.99541`},{0.86278`,0.9972`},{0.86612`,0.99822`},{0.87332`,0.99883`},{0.87605`,0.99926`},{0.88228`,0.99951`},{0.88702`,0.99975`},{0.88949`,0.99975`},{0.89426`,0.99988`},{0.89575`,0.99995`},{0.90221`,0.99995`},{0.90629`,1.`},{0.9077`,1.`},{0.90966`,0.99998`},{0.91321`,1.`},{0.91502`,1.`},{0.91879`,1.`},{0.92125`,1.`},{0.92522`,1.`},{0.92883`,1.`},{0.92784`,1.`},{0.92947`,1.`},{0.93136`,1.`},{0.93491`,1.`},{0.93647`,1.`},{0.93821`,1.`}};
pfrn[3,2]=0.0415275`;
prn[3,3,2]={{0.0415275`,0.0415275`},{0.07869`,0.04364`},{0.12446`,0.04975`},{0.17589`,0.0585`},{0.2328`,0.07048`},{0.29267`,0.09006`},{0.35118`,0.11173`},{0.40506`,0.1389`},{0.45879`,0.17341`},{0.50837`,0.21402`},{0.54963`,0.25965`},{0.58997`,0.3094`},{0.62823`,0.36737`},{0.65931`,0.42411`},{0.6882`,0.48638`},{0.71695`,0.54755`},{0.74233`,0.60698`},{0.76414`,0.66813`},{0.78092`,0.72552`},{0.79722`,0.77372`},{0.81413`,0.81939`},{0.83035`,0.85961`},{0.84284`,0.89042`},{0.85351`,0.92166`},{0.86546`,0.94019`},{0.87707`,0.95766`},{0.88435`,0.9706`},{0.89233`,0.98006`},{0.89951`,0.98621`},{0.90681`,0.99149`},{0.91324`,0.99438`},{0.91773`,0.99648`},{0.92331`,0.99803`},{0.9276`,0.99883`},{0.9326`,0.9994`},{0.93701`,0.99965`},{0.94042`,0.99981`},{0.94238`,0.99982`},{0.9472`,0.99994`},{0.94916`,0.99998`},{0.95291`,0.99999`},{0.95512`,0.99999`},{0.95738`,1.`},{0.95973`,1.`},{0.9611`,1.`},{0.96314`,1.`},{0.96605`,1.`},{0.96682`,1.`},{0.96889`,1.`},{0.96969`,1.`},{0.97099`,1.`},{0.97286`,1.`},{0.97456`,1.`},{0.97492`,1.`},{0.97668`,1.`},{0.97721`,1.`},{0.97846`,1.`},{0.97924`,1.`},{0.98041`,1.`},{0.98124`,1.`},{0.98204`,1.`}};
pfrn[4,2]=0.04015875`;
prn[4,4,2]={{0.04015875`,0.04015875`},{0.08017`,0.04276`},{0.13327`,0.04913`},{0.195`,0.06145`},{0.26333`,0.07873`},{0.33475`,0.09898`},{0.40066`,0.12674`},{0.4625`,0.16371`},{0.52404`,0.21055`},{0.57848`,0.26138`},{0.62451`,0.31995`},{0.66874`,0.38628`},{0.71029`,0.4523`},{0.74313`,0.52062`},{0.77102`,0.58974`},{0.79394`,0.66039`},{0.81818`,0.72375`},{0.8377`,0.78288`},{0.85443`,0.83047`},{0.86871`,0.8743`},{0.88424`,0.90898`},{0.89574`,0.93576`},{0.906`,0.95542`},{0.91485`,0.97065`},{0.92356`,0.98114`},{0.92919`,0.98886`},{0.93727`,0.99289`},{0.94212`,0.99637`},{0.94735`,0.99739`},{0.95166`,0.99872`},{0.95511`,0.99922`},{0.96065`,0.9996`},{0.96319`,0.99978`},{0.96654`,0.99992`},{0.96967`,0.99996`},{0.97128`,1.`},{0.97352`,0.99999`},{0.97514`,1.`},{0.9776`,1.`},{0.98002`,1.`},{0.98077`,1.`},{0.98237`,1.`},{0.98267`,1.`},{0.98403`,1.`},{0.98514`,1.`},{0.98697`,1.`},{0.98696`,1.`},{0.98783`,1.`},{0.98977`,1.`},{0.98933`,1.`},{0.99069`,1.`},{0.99048`,1.`},{0.99114`,1.`},{0.99205`,1.`},{0.99233`,1.`},{0.99315`,1.`},{0.99399`,1.`},{0.99388`,1.`},{0.99434`,1.`},{0.99395`,1.`},{0.9948`,1.`}};
pfrn[1,3]=0.02742125`;
prn[1,1,3]={{0.02742125`,0.02742125`},{0.04598`,0.02922`},{0.06642`,0.03037`},{0.09042`,0.03458`},{0.11592`,0.0408`},{0.14283`,0.04849`},{0.16892`,0.05838`},{0.19593`,0.06906`},{0.22201`,0.08168`},{0.24359`,0.09805`},{0.2723`,0.11593`},{0.29508`,0.13614`},{0.32071`,0.15928`},{0.33753`,0.18427`},{0.36367`,0.21207`},{0.37889`,0.24359`},{0.39806`,0.2743`},{0.41389`,0.31126`},{0.42953`,0.3436`},{0.44601`,0.38372`},{0.46361`,0.42013`},{0.47911`,0.45878`},{0.49133`,0.49791`},{0.50582`,0.5372`},{0.51736`,0.579`},{0.53021`,0.61835`},{0.54351`,0.65293`},{0.55272`,0.69064`},{0.56225`,0.72581`},{0.57208`,0.75923`},{0.5832`,0.78601`},{0.59094`,0.81533`},{0.60027`,0.83917`},{0.60916`,0.86594`},{0.6182`,0.88595`},{0.62393`,0.90278`},{0.63312`,0.91971`},{0.64003`,0.93151`},{0.64639`,0.94413`},{0.65319`,0.95585`},{0.66197`,0.96398`},{0.66681`,0.97026`},{0.67071`,0.97686`},{0.67806`,0.98157`},{0.68434`,0.98626`},{0.68998`,0.98893`},{0.69634`,0.99151`},{0.69884`,0.99389`},{0.70449`,0.99541`},{0.70669`,0.99648`},{0.71416`,0.99733`},{0.71696`,0.99796`},{0.71925`,0.99874`},{0.72572`,0.99893`},{0.73444`,0.99912`},{0.73333`,0.99958`},{0.74036`,0.99963`},{0.74348`,0.99975`},{0.74561`,0.99983`},{0.74948`,0.99993`},{0.7522`,0.99992`}};
pfrn[2,3]=0.03189`;
prn[2,2,3]={{0.03189`,0.03189`},{0.05691`,0.03295`},{0.08948`,0.03562`},{0.12833`,0.0432`},{0.16714`,0.05093`},{0.2127`,0.06491`},{0.25268`,0.07892`},{0.29667`,0.09741`},{0.33828`,0.11978`},{0.37812`,0.1456`},{0.41656`,0.17774`},{0.45076`,0.21206`},{0.48357`,0.25343`},{0.51553`,0.29643`},{0.54371`,0.34484`},{0.56947`,0.39279`},{0.59373`,0.44431`},{0.6179`,0.49817`},{0.6396`,0.55002`},{0.65744`,0.60419`},{0.67632`,0.65572`},{0.69425`,0.70134`},{0.71075`,0.74692`},{0.72523`,0.78865`},{0.73723`,0.82579`},{0.7511`,0.85682`},{0.75974`,0.88661`},{0.77168`,0.91089`},{0.78549`,0.93073`},{0.79286`,0.9482`},{0.80346`,0.96094`},{0.81247`,0.97093`},{0.81861`,0.97902`},{0.82443`,0.98577`},{0.8351`,0.98993`},{0.83914`,0.99223`},{0.84628`,0.99493`},{0.85214`,0.99693`},{0.85569`,0.99778`},{0.86382`,0.99862`},{0.87044`,0.99905`},{0.87386`,0.99937`},{0.87816`,0.99963`},{0.88235`,0.99977`},{0.88494`,0.9999`},{0.89145`,0.99994`},{0.89387`,0.99994`},{0.89699`,1.`},{0.89974`,0.99998`},{0.90493`,0.99998`},{0.90641`,0.99999`},{0.90983`,1.`},{0.91236`,1.`},{0.91591`,1.`},{0.91903`,1.`},{0.91912`,1.`},{0.92184`,1.`},{0.92462`,1.`},{0.927`,1.`},{0.92937`,1.`},{0.93113`,1.`}};
pfrn[3,3]=0.0242325`;
prn[3,3,3]={{0.0242325`,0.0242325`},{0.04905`,0.02572`},{0.08603`,0.02911`},{0.12985`,0.0363`},{0.17935`,0.04606`},{0.23407`,0.05962`},{0.28817`,0.07695`},{0.34326`,0.10005`},{0.39311`,0.12631`},{0.44352`,0.15962`},{0.48833`,0.19937`},{0.53344`,0.24345`},{0.57473`,0.29704`},{0.6046`,0.34588`},{0.63864`,0.40776`},{0.66955`,0.47092`},{0.70002`,0.53104`},{0.72411`,0.59608`},{0.7424`,0.65671`},{0.7641`,0.71303`},{0.78211`,0.7665`},{0.79874`,0.81095`},{0.81407`,0.8526`},{0.8261`,0.88604`},{0.83839`,0.91479`},{0.85022`,0.93878`},{0.86127`,0.95619`},{0.86827`,0.96763`},{0.87925`,0.97843`},{0.88731`,0.98566`},{0.89389`,0.99091`},{0.90186`,0.99419`},{0.90793`,0.99633`},{0.913`,0.99807`},{0.91886`,0.99868`},{0.92278`,0.99929`},{0.9283`,0.99954`},{0.93077`,0.99984`},{0.93422`,0.99986`},{0.93862`,0.99995`},{0.94229`,0.99999`},{0.94432`,0.99999`},{0.94843`,0.99999`},{0.95189`,1.`},{0.95348`,1.`},{0.95592`,1.`},{0.95797`,1.`},{0.96`,1.`},{0.96221`,1.`},{0.96402`,1.`},{0.96559`,1.`},{0.96729`,1.`},{0.96841`,1.`},{0.96856`,1.`},{0.97183`,1.`},{0.9724`,1.`},{0.97375`,1.`},{0.97442`,1.`},{0.97481`,1.`},{0.9774`,1.`},{0.97792`,1.`}};
pfrn[4,3]=0.02901125`;
prn[4,4,3]={{0.02901125`,0.02901125`},{0.06221`,0.03048`},{0.10729`,0.03571`},{0.16591`,0.04607`},{0.22775`,0.06032`},{0.29608`,0.0808`},{0.36145`,0.10514`},{0.42708`,0.1402`},{0.49081`,0.18135`},{0.53985`,0.22936`},{0.59346`,0.28606`},{0.63911`,0.35061`},{0.68013`,0.41979`},{0.71471`,0.48955`},{0.74624`,0.56442`},{0.77222`,0.63429`},{0.79751`,0.70369`},{0.82107`,0.76303`},{0.83509`,0.81499`},{0.85611`,0.86142`},{0.86987`,0.89873`},{0.8839`,0.92669`},{0.8948`,0.95134`},{0.90474`,0.96894`},{0.91397`,0.97886`},{0.92219`,0.98663`},{0.92915`,0.99211`},{0.9355`,0.99585`},{0.93992`,0.99731`},{0.94468`,0.99853`},{0.95036`,0.99925`},{0.9561`,0.99953`},{0.95954`,0.99975`},{0.96189`,0.99994`},{0.96514`,0.99996`},{0.96783`,0.99997`},{0.97035`,1.`},{0.97273`,1.`},{0.97469`,1.`},{0.97616`,0.99999`},{0.97806`,1.`},{0.97956`,1.`},{0.9811`,1.`},{0.98244`,1.`},{0.98354`,1.`},{0.9848`,1.`},{0.98561`,1.`},{0.98678`,1.`},{0.98709`,1.`},{0.98885`,1.`},{0.9885`,1.`},{0.98907`,1.`},{0.98937`,1.`},{0.99082`,1.`},{0.99137`,1.`},{0.99198`,1.`},{0.99194`,1.`},{0.99302`,1.`},{0.99273`,1.`},{0.99347`,1.`},{0.99404`,1.`}};
pfrn[1,4]=0.023005;
prn[1,1,4]={{0.023005`,0.023005`},{0.03936`,0.02396`},{0.05943`,0.02469`},{0.08028`,0.02943`},{0.10414`,0.03505`},{0.12893`,0.04144`},{0.15627`,0.0498`},{0.18134`,0.05952`},{0.20576`,0.07283`},{0.23341`,0.08527`},{0.25892`,0.1027`},{0.28164`,0.12017`},{0.3032`,0.14535`},{0.3253`,0.16629`},{0.34502`,0.19438`},{0.35977`,0.21977`},{0.38227`,0.25045`},{0.40584`,0.28524`},{0.41671`,0.31986`},{0.43465`,0.35659`},{0.44899`,0.39664`},{0.46472`,0.43138`},{0.47914`,0.47504`},{0.48945`,0.51226`},{0.50633`,0.55352`},{0.51794`,0.59159`},{0.53001`,0.62777`},{0.53959`,0.66935`},{0.55131`,0.70324`},{0.56008`,0.73587`},{0.56912`,0.76644`},{0.57831`,0.79783`},{0.59078`,0.82502`},{0.59787`,0.8496`},{0.60723`,0.87287`},{0.61265`,0.89069`},{0.6221`,0.90966`},{0.62885`,0.9226`},{0.63582`,0.93712`},{0.64653`,0.94916`},{0.65301`,0.95829`},{0.65832`,0.96569`},{0.66389`,0.97398`},{0.67137`,0.97886`},{0.67428`,0.98315`},{0.68251`,0.98735`},{0.68706`,0.99029`},{0.68791`,0.99232`},{0.69321`,0.99394`},{0.70088`,0.99562`},{0.7069`,0.99672`},{0.70885`,0.99767`},{0.71628`,0.99836`},{0.72009`,0.99873`},{0.72307`,0.9991`},{0.72897`,0.99946`},{0.73001`,0.99948`},{0.7359`,0.99968`},{0.73671`,0.99975`},{0.74378`,0.99988`},{0.74595`,0.99989`}};
pfrn[2,4]=0.022235;
prn[2,2,4]={{0.022235`,0.022235`},{0.04201`,0.0229`},{0.06966`,0.02607`},{0.10257`,0.03092`},{0.14075`,0.03863`},{0.18043`,0.04706`},{0.22`,0.05801`},{0.25999`,0.07409`},{0.30327`,0.09231`},{0.34128`,0.11447`},{0.37709`,0.1398`},{0.41663`,0.17035`},{0.44997`,0.2033`},{0.47561`,0.24172`},{0.50828`,0.2821`},{0.53561`,0.33089`},{0.56148`,0.37803`},{0.58714`,0.42913`},{0.60777`,0.4824`},{0.62731`,0.53677`},{0.64926`,0.58589`},{0.66494`,0.63682`},{0.68038`,0.68773`},{0.69744`,0.73276`},{0.71257`,0.77458`},{0.72826`,0.81123`},{0.74147`,0.84724`},{0.75058`,0.87604`},{0.76395`,0.90254`},{0.7723`,0.92316`},{0.78237`,0.94101`},{0.79107`,0.95545`},{0.80072`,0.96662`},{0.80815`,0.9752`},{0.81578`,0.98307`},{0.82567`,0.98812`},{0.83313`,0.99137`},{0.8386`,0.99422`},{0.8425`,0.996`},{0.85113`,0.99781`},{0.85555`,0.99844`},{0.86006`,0.99911`},{0.86695`,0.99928`},{0.86985`,0.99961`},{0.8734`,0.99982`},{0.87732`,0.99984`},{0.88233`,0.99994`},{0.88663`,0.9999`},{0.89114`,0.99999`},{0.89585`,0.99999`},{0.89808`,1.`},{0.90006`,0.99999`},{0.90372`,1.`},{0.90724`,1.`},{0.91085`,0.99999`},{0.91362`,1.`},{0.91298`,1.`},{0.91535`,1.`},{0.91804`,1.`},{0.92233`,1.`},{0.92308`,1.`}};
pfrn[3,4]=0.014565;
prn[3,3,4]={{0.014565`,0.014565`},{0.0322`,0.0158`},{0.0603`,0.01808`},{0.09768`,0.02258`},{0.13951`,0.03022`},{0.18781`,0.04094`},{0.24277`,0.05385`},{0.29261`,0.07095`},{0.34353`,0.09114`},{0.39028`,0.11984`},{0.4386`,0.15459`},{0.48533`,0.18988`},{0.52057`,0.23721`},{0.5612`,0.28503`},{0.59786`,0.34334`},{0.62732`,0.40191`},{0.65599`,0.46467`},{0.68639`,0.52831`},{0.7085`,0.59214`},{0.72808`,0.64859`},{0.74954`,0.70827`},{0.77104`,0.7642`},{0.78676`,0.81085`},{0.80149`,0.85364`},{0.81319`,0.88692`},{0.8263`,0.91467`},{0.84122`,0.93705`},{0.8505`,0.95513`},{0.86096`,0.96855`},{0.86876`,0.97873`},{0.87781`,0.98638`},{0.88407`,0.99095`},{0.89246`,0.99429`},{0.89973`,0.99666`},{0.90459`,0.99793`},{0.9097`,0.99882`},{0.91397`,0.99935`},{0.91996`,0.99961`},{0.92344`,0.9998`},{0.92732`,0.99983`},{0.93188`,0.99993`},{0.93663`,0.99997`},{0.94023`,0.99999`},{0.94233`,1.`},{0.9452`,1.`},{0.94739`,1.`},{0.9493`,1.`},{0.95286`,1.`},{0.95565`,1.`},{0.95791`,1.`},{0.95768`,1.`},{0.96162`,1.`},{0.96333`,1.`},{0.96584`,1.`},{0.96689`,1.`},{0.96827`,1.`},{0.96906`,1.`},{0.97015`,1.`},{0.97168`,1.`},{0.97317`,1.`},{0.97359`,1.`}};
pfrn[4,4]=0.0147863;
prn[4,4,4]={{0.01478625`,0.01478625`},{0.0357`,0.01602`},{0.06943`,0.01921`},{0.11326`,0.02493`},{0.16836`,0.0333`},{0.2282`,0.04703`},{0.29127`,0.06445`},{0.35489`,0.08739`},{0.41628`,0.11802`},{0.47013`,0.15581`},{0.52559`,0.20012`},{0.57717`,0.25449`},{0.62068`,0.31567`},{0.66031`,0.38191`},{0.69626`,0.45096`},{0.7268`,0.52829`},{0.75583`,0.5975`},{0.77875`,0.66874`},{0.80156`,0.73213`},{0.82007`,0.79023`},{0.83742`,0.84241`},{0.85429`,0.88331`},{0.87041`,0.91617`},{0.8785`,0.94241`},{0.89356`,0.96161`},{0.90163`,0.97369`},{0.91112`,0.98361`},{0.91801`,0.99035`},{0.92584`,0.99444`},{0.93147`,0.99695`},{0.93802`,0.99805`},{0.94307`,0.99921`},{0.94795`,0.99958`},{0.95129`,0.99978`},{0.95494`,0.99988`},{0.95909`,0.99994`},{0.96104`,0.99998`},{0.96436`,0.99999`},{0.96649`,1.`},{0.9688`,0.99999`},{0.97233`,1.`},{0.97465`,1.`},{0.9743`,1.`},{0.97788`,1.`},{0.97892`,1.`},{0.98066`,1.`},{0.98203`,1.`},{0.98183`,1.`},{0.98301`,1.`},{0.98435`,1.`},{0.98628`,1.`},{0.98684`,1.`},{0.98764`,1.`},{0.98846`,1.`},{0.98851`,1.`},{0.98936`,1.`},{0.98977`,1.`},{0.99066`,1.`},{0.99154`,1.`},{0.99183`,1.`},{0.99168`,1.`}};
pfrn[1,6]=0.0122575`;
prn[1,1,6]={{0.0122575`,0.0122575`},{0.02287`,0.0123`},{0.03724`,0.01435`},{0.05301`,0.01599`},{0.07276`,0.01955`},{0.09531`,0.02397`},{0.11742`,0.03045`},{0.1404`,0.03636`},{0.16488`,0.04471`},{0.1855`,0.05439`},{0.21188`,0.06606`},{0.23293`,0.08173`},{0.25459`,0.09704`},{0.27694`,0.11232`},{0.29571`,0.13463`},{0.31707`,0.1574`},{0.33467`,0.18335`},{0.35278`,0.21159`},{0.37097`,0.24084`},{0.38692`,0.27303`},{0.40611`,0.31107`},{0.41568`,0.34398`},{0.4351`,0.38`},{0.44916`,0.41954`},{0.46134`,0.45752`},{0.47491`,0.49863`},{0.48665`,0.53916`},{0.49849`,0.57868`},{0.51027`,0.61633`},{0.52017`,0.65178`},{0.53055`,0.68659`},{0.54262`,0.72416`},{0.55219`,0.75631`},{0.55935`,0.78816`},{0.57103`,0.81488`},{0.58134`,0.84088`},{0.58516`,0.86367`},{0.59537`,0.88388`},{0.60139`,0.90253`},{0.61146`,0.91986`},{0.61632`,0.93238`},{0.62088`,0.9452`},{0.63045`,0.95467`},{0.63591`,0.96286`},{0.64117`,0.9705`},{0.64895`,0.97716`},{0.65085`,0.98156`},{0.65944`,0.98634`},{0.6671`,0.98968`},{0.67411`,0.99147`},{0.67716`,0.99367`},{0.68151`,0.99478`},{0.68705`,0.99642`},{0.69016`,0.99716`},{0.69453`,0.99811`},{0.69844`,0.99864`},{0.7025`,0.99907`},{0.70706`,0.99919`},{0.71307`,0.99956`},{0.71843`,0.99958`},{0.72155`,0.99981`}};
pfrn[2,6]=0.01620375`;
prn[2,1,6]={{0.01620375`,0.01620375`},{0.023895`,0.01666`},{0.03576`,0.0176`},{0.050005`,0.019825`},{0.066635`,0.02122`},{0.08484`,0.025745`},{0.10456`,0.029535`},{0.126195`,0.034285`},{0.14771`,0.041025`},{0.168515`,0.049575`},{0.190385`,0.057835`},{0.21237`,0.069485`},{0.232965`,0.08163`},{0.25498`,0.096655`},{0.27389`,0.11365`},{0.29442`,0.132665`},{0.312685`,0.153805`},{0.331875`,0.177755`},{0.34963`,0.20311`},{0.36546`,0.231775`},{0.38069`,0.263055`},{0.394915`,0.296085`},{0.410945`,0.33039`},{0.42371`,0.36452`},{0.435855`,0.40373`},{0.452185`,0.439435`},{0.46331`,0.47985`},{0.47553`,0.51869`},{0.48844`,0.55918`},{0.500515`,0.596505`},{0.50899`,0.63364`},{0.52107`,0.671485`},{0.53165`,0.706375`},{0.540265`,0.73848`},{0.54774`,0.76876`},{0.55843`,0.797255`},{0.56609`,0.82454`},{0.57567`,0.84901`},{0.582165`,0.87234`},{0.591675`,0.890495`},{0.59883`,0.907955`},{0.60438`,0.92285`},{0.612655`,0.93658`},{0.619505`,0.94734`},{0.62439`,0.95799`},{0.63304`,0.965405`},{0.638355`,0.973795`},{0.64333`,0.978865`},{0.648715`,0.982755`},{0.65479`,0.986505`},{0.661915`,0.98985`},{0.665895`,0.992035`},{0.670215`,0.99421`},{0.674275`,0.99555`},{0.679955`,0.996825`},{0.685175`,0.997715`},{0.691345`,0.99824`},{0.695115`,0.99874`},{0.697415`,0.999115`},{0.70238`,0.999305`},{0.70615`,0.999555`}};
prn[2,2,6]={{0.01620375`,0.01620375`},{0.03319`,0.01721`},{0.05597`,0.01982`},{0.08673`,0.02261`},{0.11841`,0.02823`},{0.15551`,0.03624`},{0.1959`,0.04889`},{0.23466`,0.0611`},{0.27523`,0.07597`},{0.31381`,0.0948`},{0.35252`,0.11936`},{0.3884`,0.14399`},{0.42074`,0.17894`},{0.45186`,0.21375`},{0.48457`,0.25205`},{0.50952`,0.29783`},{0.53872`,0.34303`},{0.5608`,0.39283`},{0.58637`,0.44632`},{0.61131`,0.50038`},{0.62926`,0.55182`},{0.64746`,0.60551`},{0.66187`,0.65653`},{0.67935`,0.70365`},{0.69783`,0.7478`},{0.71132`,0.79019`},{0.72235`,0.82763`},{0.73588`,0.85772`},{0.74741`,0.88773`},{0.75995`,0.911`},{0.76732`,0.93149`},{0.77648`,0.94768`},{0.78656`,0.96071`},{0.79801`,0.97155`},{0.80424`,0.97932`},{0.81107`,0.98495`},{0.82176`,0.98924`},{0.82608`,0.99254`},{0.83594`,0.99505`},{0.83815`,0.99679`},{0.84478`,0.9982`},{0.85053`,0.9988`},{0.85635`,0.99922`},{0.86103`,0.9996`},{0.86414`,0.99963`},{0.86992`,0.99974`},{0.87395`,0.99992`},{0.87776`,0.99995`},{0.88291`,0.99993`},{0.88562`,1.`},{0.88871`,0.99998`},{0.89186`,0.99999`},{0.89714`,1.`},{0.8995`,0.99999`},{0.90182`,1.`},{0.9048`,1.`},{0.90871`,1.`},{0.91069`,1.`},{0.91256`,1.`},{0.91635`,1.`},{0.91821`,1.`}};
pfrn[3,6]=0.00923375`;
prn[3,3,6]={{0.00923375`,0.00923375`},{0.02303`,0.01013`},{0.04397`,0.01108`},{0.07175`,0.01441`},{0.11147`,0.01926`},{0.15151`,0.02579`},{0.20002`,0.03709`},{0.24953`,0.04944`},{0.2991`,0.06468`},{0.34501`,0.08374`},{0.39567`,0.11129`},{0.43944`,0.14328`},{0.48021`,0.17732`},{0.51769`,0.22195`},{0.55437`,0.27111`},{0.58654`,0.32851`},{0.61809`,0.38389`},{0.6469`,0.44466`},{0.67515`,0.50827`},{0.69908`,0.5739`},{0.71981`,0.63231`},{0.74091`,0.6903`},{0.75621`,0.74604`},{0.77626`,0.79409`},{0.7897`,0.83862`},{0.80332`,0.87311`},{0.81686`,0.90429`},{0.83067`,0.92941`},{0.8399`,0.94982`},{0.85369`,0.96345`},{0.85981`,0.97571`},{0.86818`,0.98294`},{0.87619`,0.98899`},{0.88426`,0.99317`},{0.89102`,0.99573`},{0.89936`,0.9972`},{0.90288`,0.99853`},{0.90803`,0.99913`},{0.91188`,0.99942`},{0.91657`,0.99967`},{0.92261`,0.9998`},{0.92721`,0.99991`},{0.93013`,0.99999`},{0.93338`,1.`},{0.937`,1.`},{0.93982`,1.`},{0.94391`,1.`},{0.94535`,1.`},{0.94795`,1.`},{0.95039`,1.`},{0.95231`,1.`},{0.95497`,1.`},{0.95771`,1.`},{0.96026`,1.`},{0.95989`,1.`},{0.96201`,1.`},{0.96464`,1.`},{0.96618`,1.`},{0.96811`,1.`},{0.96873`,1.`},{0.97089`,1.`}};
pfrn[4,6]=0.01038125`;
prn[4,4,6]={{0.01038125`,0.01038125`},{0.02668`,0.01133`},{0.05425`,0.01354`},{0.09279`,0.01813`},{0.14264`,0.02388`},{0.1969`,0.03439`},{0.25642`,0.04618`},{0.32106`,0.06633`},{0.37948`,0.08955`},{0.43272`,0.11945`},{0.48584`,0.15943`},{0.53808`,0.20334`},{0.58493`,0.25709`},{0.62323`,0.31482`},{0.66509`,0.38141`},{0.69835`,0.45439`},{0.72908`,0.52341`},{0.75175`,0.59715`},{0.77994`,0.66423`},{0.80255`,0.72929`},{0.82152`,0.7886`},{0.83734`,0.83577`},{0.85348`,0.87878`},{0.86671`,0.91283`},{0.87737`,0.93763`},{0.8886`,0.95872`},{0.89807`,0.97285`},{0.909`,0.98143`},{0.91589`,0.98952`},{0.92331`,0.99337`},{0.92834`,0.99628`},{0.93541`,0.99817`},{0.93958`,0.99903`},{0.94575`,0.99939`},{0.9494`,0.99965`},{0.95315`,0.99981`},{0.95602`,0.99993`},{0.9608`,0.99997`},{0.96267`,0.99998`},{0.96541`,0.99999`},{0.96687`,1.`},{0.97089`,1.`},{0.9722`,1.`},{0.97434`,1.`},{0.97629`,1.`},{0.97752`,1.`},{0.97834`,1.`},{0.98052`,1.`},{0.98101`,1.`},{0.98247`,1.`},{0.98247`,1.`},{0.98484`,1.`},{0.98606`,1.`},{0.98635`,1.`},{0.9868`,1.`},{0.98754`,1.`},{0.98838`,1.`},{0.98935`,1.`},{0.98968`,1.`},{0.99005`,1.`},{0.99024`,1.`}};
pfrn[1,8]=0.0136188;
prn[1,1,8]={{0.01361875`,0.01361875`},{0.02486`,0.01354`},{0.03936`,0.0154`},{0.05728`,0.01754`},{0.07659`,0.02052`},{0.09874`,0.02515`},{0.12347`,0.03227`},{0.14431`,0.03808`},{0.17044`,0.04747`},{0.19361`,0.05889`},{0.21964`,0.07035`},{0.23905`,0.08423`},{0.26325`,0.10146`},{0.28091`,0.1213`},{0.3014`,0.14111`},{0.32503`,0.16397`},{0.33937`,0.19001`},{0.35898`,0.21967`},{0.37848`,0.25159`},{0.39373`,0.28126`},{0.40997`,0.31944`},{0.42654`,0.35452`},{0.44029`,0.3942`},{0.45172`,0.4325`},{0.46682`,0.46939`},{0.47783`,0.51133`},{0.49077`,0.5506`},{0.50193`,0.58961`},{0.51603`,0.62933`},{0.5253`,0.66304`},{0.53739`,0.7009`},{0.54518`,0.73483`},{0.55645`,0.76565`},{0.56617`,0.7962`},{0.57385`,0.82178`},{0.58073`,0.84626`},{0.59279`,0.87109`},{0.59928`,0.89018`},{0.60578`,0.90885`},{0.61536`,0.92361`},{0.62055`,0.93548`},{0.6306`,0.94849`},{0.63445`,0.95854`},{0.64083`,0.96433`},{0.6469`,0.97282`},{0.65365`,0.97906`},{0.65993`,0.98294`},{0.66246`,0.9868`},{0.66967`,0.98945`},{0.67381`,0.99251`},{0.68058`,0.99423`},{0.68464`,0.99577`},{0.69069`,0.99695`},{0.696`,0.9976`},{0.70178`,0.99824`},{0.70347`,0.99875`},{0.70909`,0.99908`},{0.71001`,0.99929`},{0.718`,0.99957`},{0.71953`,0.99972`},{0.72228`,0.99979`}};
pfrn[2,8]=0.00722875;
prn[2,2,8]={{0.00722875`,0.00722875`},{0.01698`,0.00746`},{0.03275`,0.00853`},{0.05211`,0.01076`},{0.08083`,0.01436`},{0.11012`,0.01887`},{0.14238`,0.02559`},{0.17817`,0.0333`},{0.2142`,0.04383`},{0.24984`,0.05696`},{0.28466`,0.07242`},{0.32569`,0.09326`},{0.35465`,0.11516`},{0.39136`,0.14384`},{0.41939`,0.17518`},{0.44828`,0.2137`},{0.47447`,0.25173`},{0.50299`,0.29973`},{0.5292`,0.34575`},{0.55173`,0.39888`},{0.57415`,0.4525`},{0.59477`,0.50524`},{0.61356`,0.56068`},{0.63156`,0.61183`},{0.64937`,0.66557`},{0.66227`,0.71019`},{0.68175`,0.75688`},{0.69317`,0.79651`},{0.7062`,0.83404`},{0.71575`,0.86561`},{0.73072`,0.89374`},{0.74357`,0.91679`},{0.75188`,0.93526`},{0.76388`,0.95144`},{0.77213`,0.96349`},{0.78091`,0.97394`},{0.79057`,0.98131`},{0.79781`,0.98664`},{0.80524`,0.99058`},{0.80917`,0.99365`},{0.81764`,0.99594`},{0.82691`,0.99706`},{0.83116`,0.99831`},{0.83537`,0.99891`},{0.8432`,0.99928`},{0.84841`,0.99964`},{0.85225`,0.9996`},{0.85613`,0.9999`},{0.86219`,0.99994`},{0.86467`,0.99995`},{0.86984`,1.`},{0.87196`,1.`},{0.87645`,0.99998`},{0.88095`,1.`},{0.8854`,1.`},{0.88765`,1.`},{0.89222`,1.`},{0.89449`,1.`},{0.89606`,1.`},{0.89898`,1.`},{0.90378`,1.`}};
pfrn[3,8]=0.00514625;
prn[3,3,8]={{0.00514625`,0.00514625`},{0.01456`,0.00543`},{0.02942`,0.00669`},{0.05256`,0.00896`},{0.08231`,0.01223`},{0.12084`,0.01675`},{0.1626`,0.02437`},{0.20855`,0.03204`},{0.25258`,0.04438`},{0.30084`,0.05945`},{0.3464`,0.07979`},{0.39298`,0.10261`},{0.43467`,0.13458`},{0.47468`,0.17295`},{0.51656`,0.21657`},{0.54918`,0.26492`},{0.57985`,0.31704`},{0.6124`,0.37401`},{0.63924`,0.43737`},{0.66424`,0.50003`},{0.68534`,0.56237`},{0.71225`,0.62534`},{0.72971`,0.68764`},{0.7462`,0.74087`},{0.76459`,0.7916`},{0.77796`,0.83493`},{0.79528`,0.87313`},{0.80901`,0.90509`},{0.8178`,0.92781`},{0.83047`,0.94951`},{0.84142`,0.96484`},{0.84972`,0.97521`},{0.8616`,0.98428`},{0.86696`,0.98995`},{0.87696`,0.9929`},{0.88171`,0.99587`},{0.88856`,0.9975`},{0.89452`,0.99839`},{0.90196`,0.99926`},{0.90609`,0.99952`},{0.91212`,0.99978`},{0.91567`,0.9999`},{0.92015`,0.99992`},{0.92269`,0.99998`},{0.92852`,1.`},{0.93304`,0.99999`},{0.93637`,1.`},{0.93762`,1.`},{0.93993`,1.`},{0.94429`,1.`},{0.94548`,1.`},{0.94815`,1.`},{0.95099`,1.`},{0.95422`,1.`},{0.95588`,1.`},{0.95656`,1.`},{0.95816`,1.`},{0.96064`,1.`},{0.96219`,1.`},{0.96384`,1.`},{0.96519`,1.`}};
pfrn[4,8]=0.00559875;
prn[4,4,8]={{0.00559875`,0.00559875`},{0.01606`,0.00577`},{0.03566`,0.00793`},{0.06459`,0.01046`},{0.10589`,0.01562`},{0.15536`,0.02171`},{0.20642`,0.03162`},{0.26307`,0.04549`},{0.32257`,0.06555`},{0.37813`,0.08947`},{0.43622`,0.12265`},{0.48397`,0.16031`},{0.53227`,0.20692`},{0.57769`,0.2634`},{0.61765`,0.32745`},{0.65466`,0.39311`},{0.68764`,0.466`},{0.71726`,0.53868`},{0.7416`,0.61563`},{0.77136`,0.68333`},{0.78992`,0.74797`},{0.80321`,0.80142`},{0.82635`,0.85`},{0.84423`,0.89226`},{0.85586`,0.92242`},{0.86973`,0.94653`},{0.88306`,0.96375`},{0.89162`,0.97678`},{0.89853`,0.9856`},{0.90936`,0.99131`},{0.91546`,0.99524`},{0.92213`,0.99752`},{0.93026`,0.99854`},{0.93541`,0.99932`},{0.93983`,0.99957`},{0.94423`,0.99978`},{0.9485`,0.99989`},{0.9516`,0.99994`},{0.95474`,0.99997`},{0.95774`,1.`},{0.96174`,0.99999`},{0.96392`,0.99999`},{0.96668`,1.`},{0.96798`,1.`},{0.9712`,1.`},{0.97192`,1.`},{0.97514`,1.`},{0.97521`,1.`},{0.97745`,1.`},{0.97912`,1.`},{0.98032`,1.`},{0.98099`,1.`},{0.9826`,1.`},{0.98292`,1.`},{0.98472`,1.`},{0.98506`,1.`},{0.98678`,1.`},{0.98731`,1.`},{0.98739`,1.`},{0.98844`,1.`},{0.98947`,1.`}};
pfrn[1,12]=0.0051775`;
prn[1,1,12]={{0.0051775`,0.0051775`},{0.01021`,0.00507`},{0.01939`,0.00591`},{0.03154`,0.00693`},{0.04515`,0.00901`},{0.06255`,0.01132`},{0.07943`,0.01373`},{0.09959`,0.01862`},{0.11907`,0.02185`},{0.13854`,0.02784`},{0.16124`,0.03598`},{0.18104`,0.04453`},{0.20367`,0.05468`},{0.22344`,0.0659`},{0.24073`,0.0817`},{0.2611`,0.09542`},{0.279`,0.11339`},{0.29922`,0.13305`},{0.31714`,0.15675`},{0.33404`,0.18225`},{0.34719`,0.21079`},{0.36642`,0.24158`},{0.37856`,0.2735`},{0.39563`,0.307`},{0.40847`,0.3427`},{0.42297`,0.3809`},{0.4369`,0.41904`},{0.44906`,0.45905`},{0.45902`,0.49638`},{0.47507`,0.5381`},{0.48514`,0.57612`},{0.49498`,0.61426`},{0.50339`,0.65453`},{0.51454`,0.68792`},{0.52201`,0.72543`},{0.53359`,0.75668`},{0.54494`,0.78722`},{0.55122`,0.81482`},{0.56001`,0.84013`},{0.56605`,0.8639`},{0.57239`,0.88232`},{0.58386`,0.90125`},{0.59013`,0.91778`},{0.59746`,0.9323`},{0.60368`,0.94489`},{0.60799`,0.9554`},{0.61692`,0.96445`},{0.62162`,0.97124`},{0.63031`,0.9785`},{0.63236`,0.98221`},{0.64015`,0.98634`},{0.64648`,0.98905`},{0.65028`,0.99205`},{0.65655`,0.99386`},{0.66013`,0.99532`},{0.66792`,0.99644`},{0.66831`,0.99733`},{0.67643`,0.99822`},{0.67704`,0.99857`},{0.6857`,0.99899`},{0.69136`,0.99917`}};
pfrn[2,12]=0.00331125`;
prn[2,2,12]={{0.00331125`,0.00331125`},{0.00825`,0.00336`},{0.01862`,0.00385`},{0.03199`,0.0055`},{0.05361`,0.00678`},{0.07861`,0.00897`},{0.1039`,0.01257`},{0.13378`,0.01712`},{0.1683`,0.02373`},{0.19981`,0.03187`},{0.2321`,0.04141`},{0.26701`,0.05426`},{0.30048`,0.06982`},{0.33478`,0.0888`},{0.36333`,0.11073`},{0.39573`,0.13742`},{0.42558`,0.17083`},{0.44882`,0.20175`},{0.47309`,0.24509`},{0.50273`,0.28875`},{0.52078`,0.33703`},{0.54672`,0.38833`},{0.56357`,0.43981`},{0.58806`,0.49523`},{0.60408`,0.5487`},{0.62221`,0.60115`},{0.63801`,0.65182`},{0.65255`,0.70069`},{0.6671`,0.74393`},{0.68149`,0.78895`},{0.69406`,0.82618`},{0.70749`,0.85986`},{0.71738`,0.88824`},{0.73225`,0.91225`},{0.73917`,0.93156`},{0.74971`,0.94894`},{0.76014`,0.96094`},{0.76544`,0.97148`},{0.77599`,0.97938`},{0.78416`,0.9852`},{0.79226`,0.98954`},{0.7993`,0.99302`},{0.80158`,0.99526`},{0.8111`,0.99726`},{0.81916`,0.99786`},{0.82412`,0.99877`},{0.83088`,0.99923`},{0.83452`,0.99961`},{0.83949`,0.99967`},{0.84504`,0.99991`},{0.85062`,0.99991`},{0.85558`,0.99995`},{0.85803`,0.99997`},{0.86434`,0.99997`},{0.86834`,0.99999`},{0.87105`,0.99999`},{0.87598`,1.`},{0.87962`,1.`},{0.88064`,1.`},{0.88557`,1.`},{0.88699`,1.`}};
pfrn[3,12]=0.00521125`;
prn[3,3,12]={{0.00521125`,0.00521125`},{0.01387`,0.00561`},{0.02922`,0.00696`},{0.05247`,0.00833`},{0.08249`,0.01182`},{0.12042`,0.01591`},{0.16071`,0.02208`},{0.20668`,0.03147`},{0.25287`,0.04375`},{0.298`,0.05857`},{0.34403`,0.07896`},{0.39148`,0.1016`},{0.43011`,0.13022`},{0.46979`,0.16828`},{0.51265`,0.20681`},{0.54361`,0.25492`},{0.57772`,0.30641`},{0.60476`,0.36356`},{0.63648`,0.42092`},{0.66331`,0.48751`},{0.68498`,0.55076`},{0.70686`,0.61018`},{0.72718`,0.6749`},{0.7457`,0.72893`},{0.76221`,0.77942`},{0.77976`,0.82418`},{0.79316`,0.86388`},{0.80388`,0.89623`},{0.81841`,0.92212`},{0.83277`,0.94291`},{0.84119`,0.95972`},{0.84872`,0.97281`},{0.85817`,0.98166`},{0.86496`,0.98694`},{0.87402`,0.99233`},{0.88289`,0.99526`},{0.88912`,0.9968`},{0.89458`,0.99823`},{0.89834`,0.99903`},{0.90669`,0.99953`},{0.91029`,0.99965`},{0.91564`,0.99981`},{0.91977`,0.99992`},{0.92339`,0.99996`},{0.92875`,0.99997`},{0.93024`,1.`},{0.93314`,1.`},{0.9358`,1.`},{0.94087`,1.`},{0.94314`,1.`},{0.94451`,1.`},{0.94826`,1.`},{0.94993`,1.`},{0.95182`,1.`},{0.95553`,1.`},{0.95684`,1.`},{0.95895`,1.`},{0.96014`,1.`},{0.96211`,1.`},{0.96397`,1.`},{0.96435`,1.`}};
pfrn[4,12]=0.0038475`;
prn[4,4,12]={{0.0038475`,0.0038475`},{0.01228`,0.00423`},{0.02802`,0.00556`},{0.0528`,0.00794`},{0.0907`,0.01144`},{0.13498`,0.01556`},{0.18483`,0.02484`},{0.23872`,0.03392`},{0.29661`,0.04847`},{0.35335`,0.06858`},{0.40482`,0.0936`},{0.46129`,0.12706`},{0.50586`,0.16846`},{0.55261`,0.21351`},{0.59455`,0.27643`},{0.6319`,0.33741`},{0.66524`,0.40841`},{0.69905`,0.48085`},{0.72639`,0.55485`},{0.75205`,0.62715`},{0.77603`,0.69349`},{0.79496`,0.75919`},{0.81267`,0.81298`},{0.8303`,0.85978`},{0.84504`,0.89815`},{0.85809`,0.92815`},{0.87055`,0.95141`},{0.88418`,0.9681`},{0.89176`,0.97997`},{0.90249`,0.98715`},{0.90935`,0.99227`},{0.91539`,0.99539`},{0.92151`,0.99753`},{0.92975`,0.99865`},{0.9343`,0.99925`},{0.93784`,0.99961`},{0.94433`,0.99977`},{0.94784`,0.99998`},{0.9524`,0.99994`},{0.95499`,1.`},{0.958`,1.`},{0.96098`,1.`},{0.9636`,1.`},{0.96547`,1.`},{0.96801`,1.`},{0.96986`,1.`},{0.97218`,1.`},{0.97482`,1.`},{0.97557`,1.`},{0.97758`,1.`},{0.97846`,1.`},{0.97892`,1.`},{0.98025`,1.`},{0.98191`,1.`},{0.98223`,1.`},{0.98491`,1.`},{0.98472`,1.`},{0.98586`,1.`},{0.98675`,1.`},{0.98717`,1.`},{0.98744`,1.`}};
pfrn[1,16]=0.00418625;
prn[1,1,16]={{0.00418625`,0.00418625`},{0.00881`,0.00424`},{0.01684`,0.00469`},{0.02759`,0.00542`},{0.0399`,0.00732`},{0.05539`,0.0093`},{0.07367`,0.01229`},{0.09218`,0.01582`},{0.11302`,0.01964`},{0.13286`,0.02481`},{0.14937`,0.02971`},{0.17174`,0.03914`},{0.18948`,0.04787`},{0.21323`,0.05842`},{0.2324`,0.07194`},{0.25036`,0.08632`},{0.27105`,0.10269`},{0.2876`,0.12135`},{0.30723`,0.14231`},{0.32359`,0.16559`},{0.33879`,0.19064`},{0.35653`,0.22126`},{0.37292`,0.24877`},{0.38468`,0.28607`},{0.39996`,0.31991`},{0.41296`,0.3552`},{0.42559`,0.39387`},{0.43852`,0.43437`},{0.44945`,0.47286`},{0.46453`,0.51398`},{0.47473`,0.54952`},{0.48338`,0.59383`},{0.49628`,0.62785`},{0.50658`,0.66729`},{0.5128`,0.69953`},{0.52341`,0.73726`},{0.53219`,0.76635`},{0.5423`,0.79625`},{0.54967`,0.82547`},{0.55953`,0.85193`},{0.56935`,0.87015`},{0.57513`,0.88879`},{0.57932`,0.90815`},{0.58462`,0.92466`},{0.59474`,0.93731`},{0.60155`,0.94853`},{0.60776`,0.95892`},{0.61487`,0.96705`},{0.61998`,0.97378`},{0.62794`,0.97843`},{0.63166`,0.98324`},{0.63769`,0.9873`},{0.64368`,0.99002`},{0.6492`,0.99217`},{0.65572`,0.99414`},{0.65783`,0.99593`},{0.66426`,0.99691`},{0.6709`,0.99766`},{0.67297`,0.99832`},{0.67805`,0.99883`},{0.68214`,0.99907`}};
pfrn[2,16]=0.00257375;
prn[2,2,16]={{0.00257375`,0.00257375`},{0.00704`,0.00278`},{0.01553`,0.00321`},{0.02771`,0.00401`},{0.04651`,0.00528`},{0.06716`,0.00732`},{0.09529`,0.01068`},{0.12294`,0.01435`},{0.15353`,0.02069`},{0.18464`,0.02706`},{0.21956`,0.03439`},{0.24974`,0.04587`},{0.28247`,0.05948`},{0.31768`,0.07815`},{0.34712`,0.09626`},{0.37598`,0.12266`},{0.40508`,0.15068`},{0.4297`,0.18249`},{0.45819`,0.22269`},{0.48802`,0.2634`},{0.50828`,0.3078`},{0.52837`,0.35788`},{0.55313`,0.40876`},{0.56951`,0.46063`},{0.58818`,0.51357`},{0.60411`,0.56827`},{0.61949`,0.62166`},{0.63951`,0.67049`},{0.65509`,0.71827`},{0.66889`,0.76222`},{0.68227`,0.80566`},{0.69649`,0.83896`},{0.7049`,0.87012`},{0.71927`,0.89676`},{0.72771`,0.9212`},{0.73956`,0.93804`},{0.74856`,0.95488`},{0.75814`,0.9659`},{0.76722`,0.97503`},{0.77433`,0.98298`},{0.78173`,0.98725`},{0.78904`,0.99114`},{0.79551`,0.99347`},{0.80315`,0.99595`},{0.81207`,0.9974`},{0.81644`,0.99828`},{0.82194`,0.999`},{0.82788`,0.99946`},{0.83196`,0.99957`},{0.83754`,0.99977`},{0.84484`,0.99991`},{0.84797`,0.99992`},{0.85365`,0.99996`},{0.85571`,0.99996`},{0.86081`,1.`},{0.8655`,0.99998`},{0.86876`,1.`},{0.87204`,1.`},{0.87604`,1.`},{0.88009`,1.`},{0.88477`,1.`}};
pfrn[3,16]=0.002915;
prn[3,3,16]={{0.002915`,0.002915`},{0.00892`,0.00303`},{0.01951`,0.004`},{0.03783`,0.00518`},{0.06138`,0.00674`},{0.09355`,0.0101`},{0.13105`,0.01504`},{0.16819`,0.02024`},{0.21664`,0.02912`},{0.25843`,0.04105`},{0.30156`,0.05545`},{0.34799`,0.07323`},{0.38854`,0.09697`},{0.43256`,0.12576`},{0.46742`,0.15932`},{0.50589`,0.20133`},{0.53614`,0.24756`},{0.5733`,0.30163`},{0.60035`,0.35573`},{0.62795`,0.42113`},{0.65168`,0.48134`},{0.67615`,0.54529`},{0.69705`,0.61135`},{0.71916`,0.66891`},{0.73689`,0.72518`},{0.75192`,0.77692`},{0.76943`,0.82233`},{0.78145`,0.86164`},{0.79611`,0.89676`},{0.80937`,0.92353`},{0.8191`,0.94374`},{0.83265`,0.95976`},{0.83993`,0.97245`},{0.84924`,0.98038`},{0.85908`,0.98716`},{0.86748`,0.99207`},{0.8743`,0.99529`},{0.88047`,0.99727`},{0.88852`,0.99816`},{0.89491`,0.9991`},{0.8989`,0.99945`},{0.90593`,0.99968`},{0.90767`,0.99984`},{0.91341`,0.99991`},{0.91807`,0.99996`},{0.92077`,1.`},{0.92752`,0.99999`},{0.92823`,0.99997`},{0.93126`,1.`},{0.9365`,1.`},{0.93818`,1.`},{0.9397`,1.`},{0.94305`,1.`},{0.94661`,1.`},{0.94757`,1.`},{0.95092`,1.`},{0.95144`,1.`},{0.9555`,1.`},{0.95538`,1.`},{0.9588`,1.`},{0.95986`,1.`}};
pfrn[4,16]=0.00408;
prn[4,4,16]={{0.00408`,0.00408`},{0.01197`,0.00483`},{0.02733`,0.00583`},{0.05308`,0.00726`},{0.08802`,0.01056`},{0.13284`,0.01465`},{0.17971`,0.02268`},{0.23265`,0.03295`},{0.28886`,0.04661`},{0.34586`,0.06762`},{0.39644`,0.09315`},{0.45199`,0.12565`},{0.49898`,0.16481`},{0.54717`,0.21189`},{0.58714`,0.26755`},{0.62777`,0.33168`},{0.66113`,0.39856`},{0.69167`,0.46882`},{0.72043`,0.54364`},{0.74748`,0.61331`},{0.77088`,0.68118`},{0.79114`,0.74492`},{0.80987`,0.80042`},{0.8256`,0.84681`},{0.84061`,0.88783`},{0.85585`,0.91976`},{0.86557`,0.94473`},{0.87834`,0.96251`},{0.88968`,0.97533`},{0.89739`,0.98443`},{0.90667`,0.99107`},{0.91361`,0.99458`},{0.92102`,0.99682`},{0.92633`,0.99812`},{0.93128`,0.99892`},{0.93684`,0.9994`},{0.94143`,0.9998`},{0.94438`,0.99988`},{0.95014`,0.99988`},{0.95331`,0.99997`},{0.95597`,1.`},{0.95959`,1.`},{0.962`,1.`},{0.96422`,1.`},{0.9671`,1.`},{0.96949`,1.`},{0.9719`,1.`},{0.97397`,1.`},{0.97378`,1.`},{0.9763`,1.`},{0.97672`,1.`},{0.97867`,1.`},{0.97997`,1.`},{0.98067`,1.`},{0.98225`,1.`},{0.98368`,1.`},{0.98436`,1.`},{0.98544`,1.`},{0.98595`,1.`},{0.98721`,1.`},{0.9877`,1.`}};
pv[n_,k_,m_,s_,l_]:=N[(1/(k! (-k+n)!))(2^(-n)) (((-1+Erf[((l+m)/((Sqrt[2]) s))]+Erfc[((-l+m)/((Sqrt[2]) s))]))^(-k+n)) (((1+Erf[((-l+m)/((Sqrt[2]) s))]+Erfc[((l+m)/((Sqrt[2]) s))]))^k) Gamma[1+n] Hypergeometric2F1[1,k-n,1+k,1+(2/(Erf[((-l+m)/((Sqrt[2]) s))]-Erf[((l+m)/((Sqrt[2]) s))]))]]
pm[n_,m_,s_,l_]:=N[(1/2) (1+Erf[(((-l+m) (Sqrt[n]))/((Sqrt[2]) s))]+Erfc[(((l+m) (Sqrt[n]))/((Sqrt[2]) s))])]
pn[t_,n_,i_]:=ListInterpolation[Transpose[prn[n,n,i]][[t]],{2-t,2-t+6}]
lpfrv[n_,k_,p_]:=u/.Quiet[FindRoot[pv[n,k,0,1,u]==p,{u,2,0.5,5}]]
lpfrm[n_,p_]:=v/.Quiet[FindRoot[pm[n,0,1,v]==p,{v,2,0.5,5}]]

pstrvl[e_,n_,k_,l_]:=Switch[e,0,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"P\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"], StyleBox[\"S\",FontSize->9]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[k,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"],1,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"P\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"], StyleBox[\"S\",FontSize->9]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[k,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"],2,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"P\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"], StyleBox[\"S\",FontSize->9]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[k,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"]]
pstrml[e_,n_,l_]:=Switch[e,0,Text@StringJoin["\!\(\*SubscriptBox[StyleBox[\"P\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"M\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"],1,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"P\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"], StyleBox[\"M\",FontSize->9]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"],2,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"P\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"], StyleBox[\"M\",FontSize->9]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"]]
pstrpn[e_,n_,i_]:=Switch[e,0,Text["\!\(\*StyleBox[SubscriptBox[StyleBox[\"P\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"], \"N\"],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)"<>ToString[Style[n,FontFamily->"Arial"]]<>"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)"<>ToString[Style[i,FontFamily->"Arial"]]<>";"<>ToString[Style[n,FontFamily->"Arial"]]<>")"],1,Text["\!\(\*StyleBox[SubscriptBox[StyleBox[\"P\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"], StyleBox[\"N\",FontSize->9]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)"<>ToString[Style[n,FontFamily->"Arial"]]<>"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)"<>ToString[Style[i,FontFamily->"Arial"]]<>")"],2,Text["\!\(\*StyleBox[SubscriptBox[StyleBox[\"P\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"], StyleBox[\"N\",FontSize->9]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)"<>ToString[Style[n,FontFamily->"Arial"]]<>"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)"<>ToString[Style[i,FontFamily->"Arial"]]<>")"]]
strvl[e_,n_,k_,l_]:=Switch[e,0,Text@StringJoin["\!\(\*SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"S\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\" \",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[k,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"],1,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"S\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\" \",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[k,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"],2,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"S\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\" \",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[k,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"]]
strml[e_,n_,l_]:=Switch[e,0,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"M\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\" \",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"],1,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"M\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\" \",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"],2,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"M\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\" \",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"]]
strn[e_,n_,i_]:=Switch[e,0,Text@StringJoin["\!\(\*SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"N\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\" \",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[i,FontFamily->"Arial"]],")"],1,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"N\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\" \",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"0\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[i,FontFamily->"Arial"]],")"],2,Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"N\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\" \",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"1\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[i,FontFamily->"Arial"]],")"]]
strvl[m_,s_,n_,k_,l_]:=Text@StringJoin["\!\(\*SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"S\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[m,{4,2}],FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[s,{4,2}],FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[k,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"]
strml[m_,s_,n_,l_]:=Text@StringJoin["\!\(\*StyleBox[SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"M\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]],FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\" \",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[m,{4,2}],FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[s,{4,2}],FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[l,{3,2}],FontFamily->"Arial"]],")"]
strn[m_,s_,n_,i_]:=Text@StringJoin["\!\(\*SubscriptBox[StyleBox[\"R\",FontFamily->\"Arial\",FontWeight->\"Plain\",FontSlant->\"Italic\"], StyleBox[\"N\",FontFamily->\"Arial\",FontSize->9,FontWeight->\"Plain\",FontSlant->\"Italic\"]]\)\!\(\*StyleBox[\"(\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)\!\(\*StyleBox[\"x\",FontFamily->\"Arial\",FontWeight->\"Bold\",FontSlant->\"Oblique\"]\)\!\(\*StyleBox[\";\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[m,{4,2}],FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[NumberForm[s,{4,2}],FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[n,FontFamily->"Arial"]],"\!\(\*StyleBox[\",\",FontFamily->\"Arial\",FontWeight->\"Normal\"]\)",ToString[Style[i,FontFamily->"Arial"]],")"]

pstrvp[e_,n_,k_,p_]:=pstrvl[e,n,k,lpfrv[n,k,p]]
pstrmp[e_,n_,p_]:=pstrml[e,n,lpfrm[n,p]]
strvp[e_,n_,k_,p_]:=strvl[e,n,k,lpfrv[n,k,p]]
strmp[e_,n_,p_]:=strml[e,n,lpfrm[n,p]]
vpli[e_,n_,i_]:=Switch[e,1,Plot[Evaluate@Prepend[Append[Table[pv[n,k,0,s,lpfrv[n,k,pfrn[n,i]]],{k,1,n}],pm[n,0,s,lpfrm[n,pfrn[n,i]]]],pn[1,n,i][s]],{s,1,7},PlotRange->{{1,7},{0,1}},AxesOrigin->{1,0},AxesLabel->{"\!\(\*StyleBox[\"s\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)","\!\(\*StyleBox[\"p\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)"},PlotLabel->"probability for rejection",PlotLegends->Prepend[Append[Table[pstrvp[1,n,k,pfrn[n,i]],{k,1,n}],pstrmp[1,n,pfrn[n,i]]],pstrpn[1,n,i]]],2,Plot[Evaluate@Prepend[Append[Table[pv[n,k,m,1,lpfrv[n,k,pfrn[n,i]]],{k,1,n}],pm[n,m,1,lpfrm[n,pfrn[n,i]]]],pn[2,n,i][m]],{m,0,6},PlotRange->{{0,6},{0,1}},AxesOrigin->{0,0},AxesLabel->{"\!\(\*StyleBox[\"m\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)","\!\(\*StyleBox[\"p\",FontFamily->\"Arial\",FontWeight->\"Normal\",FontSlant->\"Oblique\"]\)"},PlotLabel->"probability for rejection",PlotLegends->Prepend[Append[Table[pstrvp[2,n,k,pfrn[n,i]],{k,1,n}],pstrmp[2,n,pfrn[n,i]]],pstrpn[2,n,i]]]]
ploti[e_,n_,i_]:=
Quiet[Pane[vpli[e,n,i],{600}]]
tv[n_,m_,s_,p_]:=Splice[Evaluate[Table[strvp[0,n,k,p],{k,1,n}]]]
tpv[n_,m_,s_,p_]:=Splice[Evaluate[Table[pstrvp[0,n,k,p],{k,1,n}]]]
tppfrn[n_,m_,s_,p_]:=Splice[Evaluate[Table[NumberForm[N@pv[n,k,0,1,lpfrv[n,k,p]],{10,6}],{k,1,n}]]]
tppred[n_,m_,s_,p_]:=Splice[Evaluate[Table[NumberForm[N@pv[n,k,0,s,lpfrv[n,k,p]],{10,6}],{k,1,n}]]]
tppsed[n_,m_,s_,p_]:=Splice[Evaluate[Table[NumberForm[N@pv[n,k,m,1,lpfrv[n,k,p]],{10,6}],{k,1,n}]]]

tn[n_,m_,s_,i_]:=
Text@Grid[Quiet[Transpose[
{{Style["probabilities for rejection",Bold],Style["QC rules",Bold],strn[0,n,i],tv[n,m,s,pfrn[n,i]],strmp[0,n,pfrn[n,i]]},
{SpanFromLeft,
Style["pfr",Bold, Italic],
NumberForm[N@pfrn[n,i],{10,6}],tppfrn[n,m,s,pfrn[n,i]],NumberForm[N@pm[n,0,1,lpfrm[n,pfrn[n,i]]],{10,6}]},
{SpanFromLeft,
Style["pred",Bold, Italic],
NumberForm[N@pn[1,n,i][s],{10,6}],tppred[n,m,s,pfrn[n,i]],NumberForm[N@pm[n,0,s,lpfrm[n,pfrn[n,i]]],{10,6}]},
{SpanFromLeft,
Style["psed",Bold, Italic],
NumberForm[N@pn[2,n,i][m],{10,6}],tppsed[n,m,s,pfrn[n,i]],NumberForm[N@pm[n,m,1,lpfrm[n,pfrn[n,i]]],{10,6}]}}]],
Frame->All, FrameStyle->Blend[{Blue,Cyan},0.35],Spacings->{1,1},ItemSize->Automatic]
gpfrn[n_,i_]:=Text[Grid[Transpose[{{"pfr"},{ToString[NumberForm[pfrn[n,i],6]]}}],Frame->All, FrameStyle->Blend[{Blue,Cyan},0.35],Spacings->{1,1},ItemSize->{All,Automatic}],BaseStyle->{Medium}]
TabView[{
"QC plots"->
Manipulate[If[k>n,k=n];
Column[{Pane[vpli[t,n,i],550],Text@gpfrn[n,i]},Center],
Style["probability for rejection plot",Bold],
{{t,2,"vs"},{1->"\!\(\*StyleBox[\"s\",FontSlant->\"Italic\"]\)",2->"\!\(\*StyleBox[\"m\",FontSlant->\"Italic\"]\)"},ControlPlacement->Left},
Delimiter,
Style["NN QC function",Bold],
{{i,6,"NN"},{
1->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"1\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)",
2->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"2\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)",
3->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"3\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)",
4->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"4\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)",6->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"6\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)",8->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"8\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)", 12->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"12\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)", 16-> "\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"16\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)"},ControlPlacement->Left},
Delimiter,
Style["size of QC samples",Plain],
{{n,4,"n"},1,4,1,ImageSize->Tiny,Appearance->"Labeled"},
Delimiter,
SaveDefinitions->True,TrackedSymbols->True,ControlPlacement->Left],
"QC calculator"->
Manipulate[
tn[n,mc,sc,i],
Style["size of QC sample",Bold],
{{n,4,"control measurements"},1,4,1,Appearance->"Labeled", ImageSize->"Tiny"},
Delimiter,
Style["NN QC function",Bold],
{{i,6,"NN"},{
1->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"1\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)",
2->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"2\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)",
3->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"3\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)",
4->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"4\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)",6->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"6\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)",8->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"8\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)", 12->"\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"12\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)", 16-> "\!\(\*StyleBox[SubscriptBox[StyleBox[\"N\",FontSlant->\"Italic\"], \"16\"],FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"(\",FontWeight->\"Plain\"]\)\!\(\*StyleBox[\"x\",FontWeight->\"Bold\",FontSlant->\"Italic\"]\)\!\(\*StyleBox[\")\",FontWeight->\"Plain\",FontSlant->\"Italic\"]\)"},ControlPlacement->Left},
Delimiter,
Style["standardized critical errors",Bold],
{{mc,3.0,"systematic error"},0.0,6.0,0.01,Appearance->"Labeled", ImageSize->"Tiny"},
{{sc,4.0,"random error"},1.0,7.0,0.01,Appearance->"Labeled", ImageSize->"Tiny"},
Delimiter,
SaveDefinitions->True,TrackedSymbols->True,ControlPlacement->Left]},
ImageSize->All]

Abbreviations
QC: quality control
NN: neural network
pfr: probability for false rejection
pred: probability for random error detection
psed: probability for systematic error detection

Notation
(Subscript[p, r]): probability for rejection 
(Subscript[p, fr]): probability for false rejection
𝒩(m,(s^2)): normal distribution with mean m and standard deviation s.
 (Subscript[R, N])(x; (Subscript[m, 0]),(Subscript[s , 0]),n,a): NN QC rule applied on a n-tuple x  of n control measurements, distributed as 𝒩(m,(s^2)),  where  (Subscript[m, 0]), (Subscript[s , 0]) and α  are training dataset related parameters.
 (Subscript[N, a])(x)=(Subscript[R, N])(x; 1,0,n,a)
(Subscript[R, S])(x; (Subscript[m, 0]),(Subscript[s , 0]),n,k,l): statistical QC rule applied on a n-tuple x  of n control measurements, distributed as 𝒩(m,(s^2)), with decision limits  (Subscript[m, 0])±l (Subscript[s , 0]) for at least  k of them.
(Subscript[R, M])(x; (Subscript[m, 0]),(Subscript[s , 0]),n,n,l): statistical QC rule applied on a n-tuple x  of n control measurements, distributed as 𝒩(m,(s^2)),  with decision limits  (Subscript[m, 0])±l (Subscript[s , 0]) for  their mean.
(Subscript[P, N])(m,s;(Subscript[m, 0]),(Subscript[s , 0]),n,a): probability for rejection of the statistical QC rule  (Subscript[R, N])(x; (Subscript[m, 0]),(Subscript[s , 0]),n,a) applied on a n-tuples of control measurements, distributed as 𝒩(m,(s^2)).
(Subscript[P, S])(m,s; (Subscript[m, 0]),(Subscript[s , 0]),n,k,l): probability for rejection of the statistical QC rule  (Subscript[R, S])(x; (Subscript[m, 0]),(Subscript[s , 0]),n,k,l) applied on a n-tuples of control measurements, distributed as 𝒩(m,(s^2)).
(Subscript[P, M])(m,s; (Subscript[m, 0]),(Subscript[s , 0]),n,n,l): probability for rejection of the statistical QC rule  (Subscript[R, M])(x;(Subscript[m, 0]),(Subscript[s , 0]),n,n,l) applied on a n-tuples of control measurements, distributed as 𝒩(m,(s^2)).

Disclaimer of Warranties
The notebook is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or Hellenic Complex Systems Laboratory or any of its members be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the notebook or the use or other dealings in the notebook.

About
Intelligent Quality Control
Version Number 1.0.5.4
Hellenic Complex Systems Laboratory 2024
The notebook is distributed under  an Attribution - NonCommercial - ShareAlike 4.0 International Creative Commons License