\(\(\( (*p2Numerical[s]\ is\ the\ Painleve\ II\ solution*) \)\( (*F2[
          s]\ is\ the\ distr\ function\ for\ GUE\ edge\ scaling*) \)\( (*f2[
          s]\ is\ the\ associated\ density, f2 = dF2/ds*) \)\( (*F1, f1, F4, 
      and\ f4\ are\ the\ similar\ quantities\ in\ GOE\ and\ GSE*) \)\( (*wp = 
        WorkingPrecision*) \)\(\(wp = 75;\)


    c0 = 0; c2 = 0; c3 = 0;

    \(y[x_, 0] := \(y[x, 0] = 
          Sqrt[x/2]*\((1 - 1/\((8*x^3)\) - 73/\((128*x^6)\) - 
                10657/\((1024*x^9)\) - 
                13912277/\((32768*x^12)\) - \((8045883943/262144)\)/
                  x^15 - \((14518451390349/4194304)\)/
                  x^18 - \((18847128706420641/33554432)\)/
                  x^21 - \((266287398541797779277/2147483648)\)/
                  x^24 - \((614077537500104697967243/17179869184)\)/
                  x^27 - \((3583820408994355704357070999/274877906944)\)/
                  x^30 - \((12909064475999593160583566233991/2199023255552)\)/
                  x^33 - \((225032454118493801360210306128796801/
                      70368744177664)\)/
                  x^36 - \((1167024146596038918316117313883961507459/
                      562949953421312)\)/
                  x^39 - \((14205068353420952020935752835796596130983637/
                      9007199254740992)\)/x^42 - 
                c0/x^45)\)\);\)


    \(solnB = 
        NDSolve[{\(qB''\)[x] + x*qB[x] - 2*qB[x]^3 == 0, 
            qB[\(-7.5\)] == 
              N[AiryAi[7.5], wp], \(qB'\)[\(-7.5\)] == 
              N[\(-AiryAiPrime[7.5]\), wp]}, qB, {x, \(-7.5\), 6.5}, 
          AccuracyGoal -> Infinity, PrecisionGoal -> 18, 
          WorkingPrecision -> wp, MaxSteps -> 50000, 
          InterpolationPrecision -> 20];\)


    \(solnF = 
        NDSolve[{\(qF''\)[x] - x*qF[x] - 2*qF[x]^3 == 0, 
            qF[\(-8.5\)] == 
              N[y[8.5, 0], wp], \(qF'\)[\(-8.5\)] == 
              N[\(-D[y[z, 0], z]\) /. z -> 8.5, wp]}, 
          qF, {x, \(-8.5\), \(-6\)}, AccuracyGoal -> Infinity, 
          PrecisionGoal -> 18, WorkingPrecision -> wp, 
          MaxSteps -> 50000, 
          InterpolationPrecision -> 20];\)


    \(p2Backward[x_] := 
        N[\(\(\(solnB[\([1]\)]\)[\([1]\)]\)[\([2]\)]\)[\(-x\)], 
          wp];\)


    \(p2Forward[x_] := 
        N[\(\(\(solnF[\([1]\)]\)[\([1]\)]\)[\([2]\)]\)[x], 
          wp];\)


    \(p2Numerical[x_] := 
        N[Which[x < \(-8.5\), 
            N[y[\(-x\), 0], 20], \(-8.5\) ≤ x < \(-6.2\), 
            N[p2Forward[x], 20], \(-6.2\) ≤ x < 7.5, 
            N[p2Backward[x], 20], x ≥ 7.5, N[AiryAi[x], 20]], 
          18];\)



    \(F2[s_] := \(F2[s] = 
          N[Exp[\(-NIntegrate[\((x - s)\)*p2Numerical[x]^2, {x, s, 
                    Infinity}]\)], 10]\);\)


    \(f2[s_] := \(f2[s] = 
          NIntegrate[p2Numerical[x]^2, {x, s, Infinity}]*
            F2[s]\);\)


    \(FSigned[s_] := F2[s]^2;\)

    \(fSigned[s_] := 2*f2[s]*F2[s];\)


    \(mu[s_] := \(mu[s] = 
          NIntegrate[
            p2Numerical[x], {x, s, Infinity}]\);\)


    \(F1[s_] := \(F1[s] = 
          N[Sqrt[F2[s]]*Exp[\(-mu[s]\)/2], 10]\);\)


    \(f1[s_] := \(f1[s] = 
          N[\((1/2)\)*\((NIntegrate[p2Numerical[x]^2, {x, s, Infinity}] + 
                  p2Numerical[s])\)*F1[s], 10]\);\)


    \(F4[s_] := \(F4[s] = 
          N[Sqrt[F2[Sqrt[2]*s]]*Cosh[mu[s*Sqrt[2]]/2], 
            10]\);\)


    \(f4[s_] := \(f4[s] = 
          N[\((1/Sqrt[2])\)*\((NIntegrate[
                    p2Numerical[x]^2, {x, s*Sqrt[2], Infinity}] - 
                  Tanh[mu[s*Sqrt[2]]/2]*p2Numerical[s*Sqrt[2]])\)*F4[s], 
            10]\);\)



    \(fSqrt[s_] := 
        f2[s]/\((2*
              Sqrt[F2[s]])\);\)

 (*The\ following\ moments\ data\ is\ taken\ from\ Michael\ Praeoffer' 
        s*) 
 (*more\ accurate\ evaluation\ of\ Painleve\ II*) 


    \(mu1 = \(-1.2065335745820248144270527323766069500\);\)

    \(mu2 = \(-1.7710868074116016259887144218519987151\);\)

    \(mu4 = \(-2.30688\);\)



    \(var1 = 1.607781034581361120108427651187775928;\)

    \(var2 = 0.81319479283295784477695611758803;\)

    \(var4 = 0.517724;\)


    \(std1 = 1.26798;\)

    \(std2 = 0.901773;\)

    \(std4 = 0.71953;\)


    \(skew1 = 0.2934645240865233105031388768290490539331;\)

    \(skew2 = 0.224084203610730312732129021267184339304;\)

    \(skew4 = 0.16549;\)


    \(kurt1 = 0.16524293845555974581963566037599127333475;\)

    \(kurt2 = 0.0934480876609831407180685809014826271259;\)

    \(kurt4 = 0.04919;\)


    \(muS = \(-1.263318152616701\);\)

    \(varS = 0.606689;\)


    \(f2M2 = 0.813194792814914;\)

    \(f2M3 = 0.1643248052502469;\)

    \(f2M4 = 2.045653203947724;\)


    \(fSM2 = 0.6066887541206018;\)

    \(fSM3 = 0.1554737743264964;\)

    \(fSM4 = 1.187188750834044;\)


    \(f2Data = {mu2, f2M2, f2M3, f2M4};\)

    \(fSignedData = {muS, fSM2, fSM3, fSM4};\)


    \(statistics[data__] := 
        Module[{I2, I3, I4, skew, kurt}, I2 = data[\([2]\)]; 
          I3 = data[\([3]\)]; 
I4 = 
            N[data[\([4]\)] - 3*I2^2, 15]; 
skew = 
            N[I3*\((I2)\)^\((\(-3\)/2)\), 6]; 
kurt = 
            N[I4/I2^2, 6]; 
{N[data[\([1]\)], 6], 
            N[Sqrt[I2], 6], skew, 
            kurt}];\)



    \(\(s2Max = \(-1.873\);\)\( (*f2 \((s)\)\ is\ maximum\ at\ this\ value\ of\ s*) \)\)\)\)\)

Plot[f1[s],  {s, -5, 4}]

<< Graphics`MultipleListPlot`
<< Graphics`Graphics`
<< Statistics`DataManipulation`
<< Statistics`NormalDistribution`
ndist  =  NormalDistribution[ 0,  1 ];

invCDFf1  =  {};
start  =  -6;  end  =  4;
numdo  = 600;
step  =  (end  -  start) / numdo;

For[i  =  0,  i  ≤  numdo + 1,  i++,  
        invCDFf1  =  
          AppendTo[invCDFf1,  F1[start + i*step]]];

invCDFf1

invCDFf1  =  {2.7073193255929307`*^-6, 2.960448538926729`*^-6, 
          3.23583647337051`*^-6, 3.535306925870718`*^-6, 
          3.860821134777515`*^-6, 4.214487121464312`*^-6, 
          4.598569586149674`*^-6, 5.015500384804503`*^-6, 
          5.467889614912645`*^-6, 5.958537338740563`*^-6, 
          6.490445973655459`*^-6, 7.066833379912655`*^-6, 
          7.691146677206544`*^-6, 8.367076822144211`*^-6, 
          9.098573979651204`*^-6, 9.889863722157323`*^-6, 
          0.000010745464091224231`, 0.00001167020355707352`, 
          0.000012669239912240939`, 0.000013748080136320812`, 
          0.000014912601269469884`, 0.0000161690723330043`, 
          0.000017524177336050826`, 0.000018985039407786027`, 
          0.00002055924609532823`, 0.00002225487586781275`, 
          0.000024080525867593557`, 0.000026045340949854597`, 
          0.000028159044052191713`, 0.00003043196793591414`, 
          0.00003287508834094258`, 0.000035500058597494704`, 
          0.000038319245728600774`, 0.00004134576810460557`, 
          0.00004459353466511474`, 0.00004807728576886536`, 
          0.00005181263570430584`, 0.00005581611690213137`, 
          0.00006010522588898439`, 0.00006469847102068156`, 
          0.00006961542203232375`, 0.0000748767614407126`, 
          0.00008050433783893544`, 0.00008652122110400126`, 
          0.00009295175956665463`, 0.00009982163916034217`, 
          0.00010715794458294932`, 0.00011498922249655545`, 
          0.00012334554678909753`, 0.00013225858591941076`, 
          0.00014176167236447577`, 0.0001518898741849291`, 
          0.00016268006872187726`, 0.0001741710184349006`, 
          0.0001864034488877638`, 0.00019942012888477675`, 
          0.00021326595275702594`, 0.0002279880247937307`, 
          0.00024363574580985321`, 0.0002602609018367575`, 
          0.00027791775491820236`, 0.0002966631359892311`, 
          0.0003165565397014412`, 0.0003376602218097139`, 
          0.00036003929748292055`, 0.0003837618426036676`, 
          0.00040889899644569683`, 0.0004355250662922246`, 
          0.0004637176338330363`, 0.0004935576632738137`, 
          0.0005251296110849773`, 0.000558521537310904`, 
          0.0005938252183539748`, 0.0006311362611411899`, 
          0.0006705542185744668`, 0.0007121827061589009`, 
          0.0007561295196963298`, 0.0008025067539246887`, 
          0.0008514309222315084`, 0.0009030230757883829`, 
          0.0009574089257385365`, 0.0010147189632937965`, 
          0.0010750885813071314`, 0.0011386581956806723`, 
          0.0012055733666848497`, 0.0012759849200127582`, 
          0.001350049067386818`, 0.001427927526528262`, 
          0.0015097876402929698`, 0.0015958024947709572`, 
          0.0016861510361402597`, 0.001781018186059747`, 
          0.0018805949553794634`, 0.001985078555941284`, 
          0.0020946725102370476`, 0.0022095867586861538`, 
          0.00233003776428943`, 0.00245624861441165`, 0.0025884491194402156`, 
          0.0027268759080641375`, 0.002871772518913027`, 
          0.00302338948829318`, 0.00318198443375446`, 0.003347822133219558`, 
          0.003521174599404858`, 0.0037023211492609844`, 
          0.003891548468159598`, 0.004089150668552762`, 
          0.004295429342830918`, 0.004510693610106016`, 0.00473526015664757`, 
          0.004969453269700345`, 0.005213604864415555`, 
          0.005468054503628788`, 0.005733149410222647`, 
          0.006009244471814606`, 0.006296702237546273`, 
          0.006595892906546648`, 0.006907194308265226`, 
          0.007230991873859488`, 0.007567678598834685`, 
          0.007917654996544758`, 0.008281329042367362`, 
          0.008659116108347902`, 0.009051438888116534`, 
          0.009458727311892073`, 0.009881418451398102`, 
          0.010319956414526496`, 0.010774792229597494`, 
          0.011246383719075681`, 0.011735195362615929`, 
          0.012241698149326087`, 0.01276636941914736`, 0.013309692693221532`, 
          0.013872157493456855`, 0.014454259150534018`, 
          0.015056498601255705`, 0.015679382174512122`, 
          0.016323421366139554`, 0.016989132602638922`, 
          0.017677036993783035`, 0.018387660074161285`, 
          0.019121531533727084`, 0.01987918493743249`, 0.02066115743405289`, 
          0.02146798945432236`, 0.022300224398520876`, 0.023158408313671386`, 
          0.0240430895605256`, 0.02495481847053464`, 0.025894146993021516`, 
          0.026861628332788955`, 0.027857816578417446`, 0.02888326632152478`, 
          0.029938532267278616`, 0.031024168836470606`, 
          0.032140729759488715`, 0.03328876766247566`, 0.034468833646178254`, 
          0.03568147685767552`, 0.036927244055525756`, 0.03820667916868513`, 
          0.03952032284963702`, 0.0408687120221723`, 0.04225237942427911`, 
          0.043671853146612906`, 0.04512765616702941`, 0.04662030588168036`, 
          0.048150313633176685`, 0.04971818423634296`, 0.05132441550209056`, 
          0.05296949775995063`, 0.05465391337981557`, 0.05637813629344494`, 
          0.05814263151630025`, 0.05994785467027839`, 0.0617942515079178`, 
          0.06368225743865946`, 0.06561229705774231`, 0.06758478367832195`, 
          0.06960011886739718`, 0.07165869198613282`, 0.07376087973516647`, 
          0.07590704570548405`, 0.0780975399354475`, 0.08033269847455597`, 
          0.08261284295451285`, 0.08493828016817345`, 0.08730930165693289`, 
          0.0897261833071126`, 0.09218918495589554`, 0.09469855000734434`, 
          0.0972545050590372`, 0.09985725953983599`, 0.102507005359291`, 
          0.10520391656918161`, 0.10794814903766509`, 0.11073984013650323`, 
          0.11357910844180154`, 0.11646605344877779`, 0.11940075530076336`, 
          0.12238327453312713`, 0.12541365183227948`, 0.12849190781021294`, 
          0.1316180427948989`, 0.13479203663687334`, 0.13801384853230098`, 
          0.14128341686281082`, 0.1446006590523519`, 0.14796547144131195`, 
          0.15137772917811118`, 0.15483728612846484`, 0.15834397480247878`, 
          0.16189760629972955`, 0.1654979702724437`, 0.16914483490688254`, 
          0.1728379469229957`, 0.17657703159240573`, 0.1803617927747391`, 
          0.18419191297235613`, 0.18806705340319435`, 0.19198685409233265`, 
          0.19595093398133526`, 0.19995889105593834`, 0.2040103024916977`, 
          0.20810472481750458`, 0.21224169409680635`, 0.21642072612634636`, 
          0.2206413166522167`, 0.22490294160299584`, 0.2292050573397182`, 
          0.23354710092240963`, 0.23792849039289124`, 0.24234862507354807`, 
          0.24680688588172392`, 0.25130263565940214`, 0.2558352195177974`, 
          0.2604039651964815`, 0.26500818343663635`, 0.2696471683680226`, 
          0.2743201979092244`, 0.2790265341807357`, 0.28376542393041215`, 
          0.28853609897083055`, 0.2933377766280571`, 0.29816966020134006`, 
          0.3030309394332061`, 0.307920790989455`, 0.3128383789485188`, 
          0.3177828552996199`, 0.3227533604493923`, 0.32774902373589737`, 
          0.33276896395018346`, 0.3378122898642961`, 0.3428781007653947`, 
          0.3479654869953726`, 0.35307353049541684`, 0.35820130535493255`, 
          0.3633478783642674`, 0.3685123095706695`, 0.3736936528369022`, 
          0.37889095640195947`, 0.38410326344331297`, 0.38932961264013166`, 
          0.39456903873691973`, 0.39982057310702085`, 0.405083244315475`, 
          0.4103560786804932`, 0.4156381008335205`, 0.42092833427666887`, 
          0.426225801937582`, 0.43152952672087397`, 0.43683853205586587`, 
          0.44215184243999484`, 0.44746848405224954`, 0.4527874849125917`, 
          0.45810787615775983`, 0.46342869181479296`, 0.46874896969014146`, 
          0.47406775180294086`, 0.47938408488571294`, 0.48469702087730043`, 
          0.49000561740765086`, 0.49530893827409345`, 0.5006060539087523`, 
          0.5058960418367667`, 0.5111779871250017`, 0.516450982820936`, 
          0.5217141303814515`, 0.5269665400912329`, 0.5322073314705424`, 
          0.5374356336721036`, 0.5426505858668845`, 0.5478513376185618`, 
          0.5530370492464686`, 0.5582068921768546`, 0.5633600492822802`, 
          0.5684957152090139`, 0.5736130966922817`, 0.5787114128592645`, 
          0.5837898955197327`, 0.5888477894442341`, 0.593884352629762`, 
          0.5988988565528445`, 0.6038905864100117`, 0.6088588413456169`, 
          0.6138029346669855`, 0.6187221940469062`, 0.6236159617134617`, 
          0.628483594627235`, 0.6333244646459286`, 0.638137958676442`, 
          0.642923478814481`, 0.6476804424717665`, 0.6524082824909354`, 
          0.6571064472482321`, 0.6617744007440972`, 0.6664116226817806`, 
          0.6710176085341042`, 0.6755918695985158`, 0.6801339330405922`, 
          0.6846433419261378`, 0.6891196552420594`, 0.693562447906188`, 
          0.6979713107662319`, 0.7023458505880568`, 0.7066856900334872`, 
          0.7109904676278462`, 0.7152598377174124`, 0.7194934704170841`, 
          0.7236910515483872`, 0.727852282568112`, 0.7319768804878014`, 
          0.7360645777843242`, 0.7401151223017703`, 0.744128277144934`, 
          0.7481038205646067`, 0.7520415458349559`, 0.7559412611232312`, 
          0.7598027893520565`, 0.7636259680545664`, 0.7674106492226604`, 
          0.7711566991485993`, 0.7748639982602559`, 0.7785324409502398`, 
          0.7821619353991821`, 0.7857524033934334`, 0.78930378013744`, 
          0.7928160140610547`, 0.7962890666220509`, 0.7997229121040885`, 
          0.8031175374103972`, 0.8064729418534239`, 0.80978913694071`, 
          0.8130661461572315`, 0.8163040047444703`, 0.8195027594764445`, 
          0.8226624684329538`, 0.8257832007702695`, 0.8288650364908715`, 
          0.8319080662042801`, 0.8349123908997287`, 0.83787812170347`, 
          0.840805379641562`, 0.8436942954000856`, 0.8465450090832873`, 
          0.8493576699764823`, 0.8521324362972285`, 0.8548694749574045`, 
          0.8575689613194328`, 0.860231078953664`, 0.8628560193959666`, 
          0.8654439819057032`, 0.8679951732242622`, 0.870509807334319`, 
          0.8729881052199943`, 0.8754302946280625`, 0.8778366098303721`, 
          0.8802072913876221`, 0.8825425859146439`, 0.8848427458473233`, 
          0.8871080292113009`, 0.8893386993925784`, 0.8915350249101494`, 
          0.8936972791907865`, 0.8958257403460835`, 0.897920690951869`, 
          0.8999824178300964`, 0.9020112118333034`, 0.9040073676317371`, 
          0.905971183503234`, 0.9079029611259386`, 0.9098030053739362`, 
          0.9116716241158775`, 0.9135091280166656`, 0.915315830342264`, 
          0.9170920467676932`, 0.9188380951882661`, 0.9205542955341186`, 
          0.9222409695880768`, 0.9238984408069081`, 0.9255270341459947`, 
          0.9271270758874604`, 0.9286988934717868`, 0.930242815332941`, 
          0.9317591707370402`, 0.9332482896245736`, 0.9347105024561938`, 
          0.936146140062093`, 0.9375555334949738`, 0.9389390138866145`, 
          0.9402969123080382`, 0.941629559633282`, 0.9429372864067582`, 
          0.944220422714211`, 0.9454792980572493`, 0.9467142412314455`, 
          0.947925580207994`, 0.9491136420188971`, 0.950278752645672`, 
          0.951421236911551`, 0.9525414183771476`, 0.9536396192395692`, 
          0.9547161602349428`, 0.9557713605443241`, 0.956805537702958`, 
          0.9578190075128583`, 0.9588120839586675`, 0.9597850791267611`, 
          0.9607383031275585`, 0.9616720640209988`, 0.9625866677451395`, 
          0.9634824180478383`, 0.9643596164214696`, 0.965218562040634`, 
          0.966059551702815`, 0.9668828797719322`, 0.9676888381247469`, 
          0.9684777161000713`, 0.9692498004507288`, 0.9700053752982185`, 
          0.9707447220900334`, 0.9714681195595788`, 0.9721758436886407`, 
          0.9728681676723558`, 0.9735453618866216`, 0.974207693857911`, 
          0.9748554282354112`, 0.9754888267654707`, 0.9761081482682661`, 
          0.97671364861666`, 0.9773055807171879`, 0.9778841944931181`, 
          0.9784497368695398`, 0.9790024517604222`, 0.9795425800575912`, 
          0.9800703596215743`, 0.9805860252742621`, 0.9810898087933307`, 
          0.981581938908379`, 0.9820626412987261`, 0.9825321385928203`, 
          0.982990650369209`, 0.9834383931590212`, 0.9838755804499097`, 
          0.9843024226914119`, 0.9847191273016708`, 0.98512589867548`, 
          0.9855229381935965`, 0.9859104442332812`, 0.9862886121800187`, 
          0.9866576344403712`, 0.9870177004559252`, 0.9873689967182837`, 
          0.9877117067850616`, 0.988046011296848`, 0.9883720879950822`, 
          0.988690111740815`, 0.9890002545343073`, 0.9893026855354305`, 
          0.9895975710848272`, 0.989885074725798`, 0.990165357226875`, 
          0.9904385766050463`, 0.9907048881495953`, 0.9909644444465225`, 
          0.9912173954035138`, 0.9914638882754216`, 0.9917040676902289`, 
          0.9919380756754629`, 0.9921660516850266`, 0.9923881326264222`, 
          0.9926044528883305`, 0.9928151443685259`, 0.993020336502091`, 
          0.9932201562899101`, 0.9934147283274131`, 0.9936041748335419`, 
          0.9937886156799205`, 0.9939681684201974`, 0.994142948319543`, 
          0.9943130683842765`, 0.9944786393916002`, 0.9946397699194229`, 
          0.9947965663762469`, 0.9949491330311042`, 0.9950975720435192`, 
          0.9952419834934804`, 0.9953824654114036`, 0.9955191138080695`, 
          0.9956520227045179`, 0.9957812841618848`, 0.9959069883111656`, 
          0.9960292233828876`, 0.9961480757366842`, 0.9962636298907499`, 
          0.9963759685511673`, 0.996485172641092`, 0.996591321329787`, 
          0.9966944920614881`, 0.9967947605840983`, 0.9968922009776937`, 
          0.9969868856828358`, 0.9970788855286772`, 0.9971682697608566`, 
          0.997255106069169`, 0.9973394606150084`, 0.9974213980585724`, 
          0.9975009815858226`, 0.9975782729351952`, 0.9976533324240531`, 
          0.9977262189748779`, 0.9977969901411912`, 0.997865702133204`, 
          0.9979324098431899`, 0.9979971668705737`, 0.9980600255467368`, 
          0.9981210369595307`, 0.9981802509775013`, 0.9982377162738134`, 
          0.9982934803498805`, 0.9983475895586925`, 0.9984000891278408`, 
          0.9984510231822392`, 0.99850043476654`, 0.9985483658672408`, 
          0.9985948574344854`, 0.9986399494035544`, 0.9986836807160472`, 
          0.9987260893407544`, 0.998767212294219`, 0.9988070856609907`, 
          0.9988457446135681`, 0.9988832234320336`, 0.9989195555233802`, 
          0.99895477344053`, 0.9989889089010477`, 0.9990219928055489`, 
          0.9990540552558032`, 0.9990851255725369`, 0.9991152323129349`, 
          0.999144403287842`, 0.9991726655786703`, 0.9992000455540079`, 
          0.9992265688859381`, 0.9992522605660664`, 0.9992771449212589`, 
          0.9993012456290954`, 0.999324585733039`, 0.9993471876573254`, 
          0.9993690732215723`, 0.9993902636551156`, 0.999410779611071`, 
          0.9994306411801275`, 0.9994498679040723`, 0.9994684787890541`, 
          0.9994864923185829`, 0.9995039264662745`, 0.9995207987083383`, 
          0.9995371260358156`, 0.999552924966567`, 0.999568211557018`, 
          0.9995830014136591`, 0.9995973097043108`, 0.9996111511691503`, 
          0.9996245401315086`, 0.9996374905084368`, 0.9996500158210487`, 
          0.9996621292046406`, 0.999673843418592`, 0.9996851708560518`, 
          0.9996961235534121`, 0.9997067131995729`, 0.9997169511450024`, 
          0.9997268484105936`, 0.9997364156963241`, 0.9997456633897196`, 
          0.9997546015741247`, 0.9997632400367855`, 0.999771588276747`, 
          0.999779655512567`, 0.9997874506898518`};

f1data  =  {};
normf1data  =  {};
numpoints  =  20000;
normf1  =  
        NormalDistribution[mu1, std1];
numf1belowmean  =  0;
numnormbelowmean  =  0;
For[j = 1,  
        j ≤ 
          numpoints, j++, 
{
i  =  
            1; 
value  =  
            Random[]; 
While[
            invCDFf1[[i]]  ≤  
                value   &&   i  ≤  numdo,  
            i  =  i + 1]; 
f1data  =  
            AppendTo[f1data,  
              start  +  (i -  .5)*step]; 
If[
            start  +  (i -  .5)*step  ≤  
              mu1,  numf1belowmean  =  
                numf1belowmean + 1;]; 
value  =  
            Random[normf1]; 
normf1data  =  
            AppendTo[normf1data, value]; 
If[
            value  ≤  
              mu1,  numnormbelowmean  =  
                numnormbelowmean + 
                  1;];
}];
 (*Histogram[f1data];*) 
Print["Mean of TW sim - mu1 = ", 
        Mean[f1data]  -  mu1];
Print["StDev of TW sim - std1 = ", 
        StandardDeviation[f1data]  -  std1];
Print["Median of TW sim = ",  
        Median[f1data]];
  
Print["Mean of Norm sim - mu1 = ", 
        Mean[f1data] - mu1];
Print["StDev of Norm sim - std1 = ", 
        StandardDeviation[normf1data] - std1];
Print["Median of Norm sim = ", 
        Median[normf1data]];
Print[" "];
perlefttw1  =   1.0 numf1belowmean/
            numpoints;
perleftnorm  =  
        1.0 numnormbelowmean/numpoints;
Print["Percent below mean of TW(1) theory = ",  
        F1[mu1]];
Print["Percent below mean for TW(1) sim: ",  
        perlefttw1];
Print["Percent below mean for Normal(mu1,std1) sim: ",  
        perleftnorm];
Print[" "];
perleftmeanf1  =  0.519652130983037 ;
zstatf1  =  (perlefttw1 - perleftmeanf1)/ 
          Sqrt[(perleftmeanf1*(1 - perleftmeanf1)/
                  numpoints)];
zstatnorm  =  (perleftnorm - 
              perleftmeanf1)/ 
          Sqrt[(perleftmeanf1*(1 - perleftmeanf1)/
                  numpoints)];
zstatnormnorm  =  (perleftnorm -  .5)/ Sqrt[ .25/numpoints];
Print["Z-test value for TW(1)  (with .519652) = ",  
        zstatf1];
Print["Z-test value for Normal (with .519652) = ",  
        zstatnorm];
Print["Z-test value for Normal (with .50) = ",  
        zstatnormnorm];

(* 
      DOING CHI - 
        SQUARE TESTS *) 
datainbin  =  {5, 5, 
          3, 20, 36, 40, 55, 85, 92, 86, 80, 92, 104, 99, 74, 49, 28, 22, 16, 
          9};

    numbins  =  Length[datainbin];

    Sum[datainbin[[i]],  {i, 1,  numbins}];

    bincenters  =  {-2.752284402, -2.484083949, -2.215883496, -1.947683043, -1.679482589, -1.411282136, -1.143081683, -0.87488123, -0.606680776, -0.338480323, -0.07027987, 
          0.197920583, 0.466121037, 0.73432149, 1.002521943, 1.270722397, 
          1.53892285, 1.807123303, 2.075323756, 
          2.34352421};

    binspace  =  
        SetAccuracy[2.075323756  -  1.807123303, 10];

    halfbinspace  =  binspace / 2;

    scale[x_]  :=  std1*x  +  mu1;

    num  =  1000;

    twinbin  =  {F1[
            scale[bincenters[[1]] + halfbinspace]]};

    For[i  =  2,  
        i  ≤  Length[bincenters] - 1,  i++,  
        twinbin  =  
          AppendTo[twinbin,  
            F1[scale[bincenters[[i]] + halfbinspace]]  -  
              F1[scale[
                  bincenters[[i]] - 
                    halfbinspace]]]];

    twinbin  =  
        AppendTo[twinbin,  
          1  -  F1[
              scale[bincenters[[Length[bincenters]]] - 
                  halfbinspace]]];

    For[i  =  1,   i  ≤  Length[twinbin],  i++,  
        twinbin[[i]]  =  num*twinbin[[i]]];

    chisquare  =  
        Sum[(datainbin[[i]]  -  twinbin[[i]])^2 / 
            twinbin[[i]],  {i, 1, numbins}];

    Print[chisquare]

    MultipleListPlot[datainbin, twinbin, PlotJoined -> True,  
        PlotStyle -> {RGBColor[1, 0, 0], 
            RGBColor[0, 0, 1] }];

bob  =  0;
For[i  =  1,  i  ≤  Length[twinbin],  i++,  
      bob  =  bob  + Sum[twinbin[[i]]]]
bob

twinbin

\(\(chitesterTW[data_, centers_]\  := \ 
        Module[{}, 
datainbin\  = \ 
            data; 
numbins\  = \ 
            Length[datainbin]; 
Sum[
            datainbin[\([i]\)], \ {i, 1, \ 
              numbins}]; 
bincenters\  = \ 
            centers; 
binspace\  = \ 
            SetAccuracy[centers[\([10]\)]\  - \ centers[\([9]\)], 
              10]; 
halfbinspace\  = \ 
            binspace\ /\ 2; 
scale[x_]\  := \ 
            std1*x\  + \ mu1; 
num\  = \ 
            1000; 
twinbin\  = \ {F1[
                scale[bincenters[\([1]\)] + 
                    halfbinspace]]}; 
For[i\  = \ 2, \ 
            i\  ≤ \ Length[bincenters] - 1, \ \(i++\), \ 
            twinbin\  = \ 
              AppendTo[twinbin, \ 
                F1[scale[bincenters[\([i]\)] + halfbinspace]]\  - \ 
                  F1[scale[
                      bincenters[\([i]\)] - 
                        halfbinspace]]]]; 
twinbin\  = \ 
            AppendTo[twinbin, \ 
              1\  - \ F1[
                  scale[bincenters[\([Length[bincenters]]\)] - 
                      halfbinspace]]]; 
For[
            i\  = \ 1, \ \ i\  ≤ \ Length[twinbin], \ \(i++\), \ 
            twinbin[\([i]\)]\  = \ 
              num*twinbin[\([i]\)]]; 
chisquare\  = \ 
            Sum[\((datainbin[\([i]\)]\  - \ twinbin[\([i]\)])\)^2\ /\ 
                twinbin[\([i]\)], \ {i, 1, 
                numbins}]; 
Print["Chisquare value = ", 
            chisquare, \ " with 19 d.f."]; 
Print["Critical values are 30.1435 at 5% and 36.1908 at 1%"]; 
MultipleListPlot[datainbin, twinbin, 
            PlotJoined -> True, \ 
            PlotStyle -> {RGBColor[1, 0, 0], 
                RGBColor[0, 0, 1]\ }];
];\)\)

(* about 10022 vertices,  
      d = 3 *) 
chitesterTW[{6, 5, 14, 33, 46, 76, 
        89, 100, 103, 111, 104, 83, 66, 58, 42, 28, 20, 5, 5, 
        6}, {-2.491904091, -2.210482159, -1.929060226, -1.647638294, -1.366216362, -1.08479443, -0.803372498, -0.521950566, -0.240528634, 0.040893298, 0.32231523, 0.603737163, 
        0.885159095, 1.166581027, 1.448002959, 1.729424891, 2.010846823, 
        2.292268755, 2.573690687, 2.855112619}]

testTWleftper[x_, num_]  :=  (x  -  0.519652130983037) / 
          Sqrt[0.519652130983037 *(1 - 0.519652130983037 )/
                num];
testnormleftper[x_, num_]  :=  (x  -  0.5) / 
          Sqrt[ .25/num];
compareboth[x_,  num_]  :=  
        Module[{}, 
Print["Z-value for TW(1) = ",  
            testTWleftper[x, 
              num]]; 
Print["Z-value for Norm = ",  
            testnormleftper[x, num]];
];

compareboth[ .48, 1000]

\(\(\(
\)\( (*\ 
      0.524\ 0.523\ 0.5\ 0.529\ 0.515\ 0.513\ 0.526\ *) \)\(
\)\)\)

Plot[{f1[s], f2[s], 
        f4[s]}, {s, -6, 5},  
      PlotStyle -> {RGBColor[1, 0, 0], RGBColor[0, 0, 1], 
          RGBColor[0, 1, 0] }]

Plot[{f1[s], f2[s], f4[s]}, {s, -6, 5}]

Plot[{s,  s^2,  s^3 - 2  s^2}, {s, -6, 5},  
      PlotStyle -> {RGBColor[1, 0, 0], RGBColor[0, 0, 1], 
          RGBColor[0, 1, 0] }]

stnormal[x_]  :=  (1/Sqrt[2.0 Pi]) * 
          Exp[-x^2/2];
Plot[{f1[std1*s + mu1]*std1, f2[std2*s + mu2]*std2, 
        f4[std4*s + mu4]*std4, stnormal[s]},  {s, -4, 4},  
      PlotStyle -> {RGBColor[1, 0, 0], RGBColor[0, 0, 1], 
          RGBColor[0, 1, 0], RGBColor[0, 0, 0] }]

stnormal[x_]  :=  (1/Sqrt[2.0 Pi]) * 
          Exp[-x^2/2];
Plot[{f1[std1*s + mu1]*std1, f2[std2*s + mu2]*std2, 
        f4[std4*s + mu4]*std4, stnormal[s]},  {s, -4, 4}]

(* 
      say p has mean mu and stddev sigma .  
          then p (x + 
            mu) has mean 0 and stddev sigma.*) 
 (* 
      then sigma * 
        p (sigma*x  +  
            mu) has mean 0 and stddev 1.  *)

F1[mu1]

    F2[mu2]

    F4[mu4]

Print[SetAccuracy[mu1, 5], " ", std1]
Print[SetAccuracy[mu2, 5], " ", std2]
Print[SetAccuracy[mu4, 5], " ", std4]

invCDFf4 =  {};
start  =  -5;  end  = 5;
numdo  = 1000;
step  =  (end  -  start) / 
          numdo;
For[i  =  0,  i  ≤ numdo + 1,  i++,  
        invCDFf4  =  
          AppendTo[invCDFf4,  
            F4[std4*(start + i*step) + 
                mu4]]];

invCDFf4

invCDFf4  = {4.183840669804252`*^-9, 4.524456589138986`*^-9, 
          4.891778126725496`*^-9, 5.2878147133439515`*^-9, 
          5.714720261117027`*^-9, 6.1748030368576965`*^-9, 
          6.6705361721487726`*^-9, 7.204568848538777`*^-9, 
          7.779738198362217`*^-9, 8.399081963938409`*^-9, 
          9.065851960249946`*^-9, 9.783528388670859`*^-9, 
          1.0555835051897145`*^-8, 1.1386755522959785`*^-8, 
          1.2280550324027727`*^-8, 1.3241775173708201`*^-8, 
          1.4275300364671108`*^-8, 1.538633133669518`*^-8, 
          1.6580430513668534`*^-8, 1.7863540476668237`*^-8, 
          1.924200854898786`*^-8, 2.072261287293232`*^-8, 
          2.2312590062290116`*^-8, 2.401966451870983`*^-8, 
          2.5852079504687566`*^-8, 2.781863007057568`*^-8, 
          2.99286979379207`*^-8, 3.219228844657054`*^-8, 
          3.462006967832004`*^-8, 3.722341387545952`*^-8, 
          4.001444127841426`*^-8, 4.300606651270179`*^-8, 
          4.6212047661812685`*^-8, 4.964703816917352`*^-8, 
          5.332664171924439`*^-8, 5.7267470254960825`*^-8, 
          6.148720529617055`*^-8, 6.600466273149443`*^-8, 
          7.08398612640955`*^-8, 7.601409470023236`*^-8, 
          8.155000827823726`*^-8, 8.747167924458064`*^-8, 
          9.380470189317256`*^-8, 1.0057627729379463`*^-7, 
          1.0781530794577199`*^-7, 1.1555249760351695`*^-7, 
          1.2382045653156656`*^-7, 1.3265381245806409`*^-7, 
          1.420893275074679`*^-7, 1.5216602140542984`*^-7, 
          1.6292530126150892`*^-7, 1.7441109824844268`*^-7, 
          1.8667001151031123`*^-7, 1.9975145964596148`*^-7, 
          2.1370784012865872`*^-7, 2.2859469703785001`*^-7, 
          2.4447089749465897`*^-7, 2.613988172086165`*^-7, 
          2.7944453555988836`*^-7, 2.9867804065833154`*^-7, 
          3.1917344483847825`*^-7, 3.4100921106773315`*^-7, 
          3.6426839076402594`*^-7, 3.8903887353857376`*^-7, 
          4.154136493993616`*^-7, 4.4349108397175343`*^-7, 
          4.733752073137574`*^-7, 5.051760169254658`*^-7, 
          5.390097955747077`*^-7, 5.749994445840922`*^-7, 
          6.132748332484726`*^-7, 6.539731650764122`*^-7, 
          6.97239361574275`*^-7, 7.432264643175512`*^-7, 
          7.920960560804793`*^-7, 8.440187018222338`*^-7, 
          8.991744103559365`*^-7, 9.577531175552303`*^-7, 
          1.0199551919826674`*^-6, 1.0859919638540818`*^-6, 
          1.156086278283599`*^-6, 1.230473073786157`*^-6, 
          1.3093999870454806`*^-6, 1.393127984989312`*^-6, 
          1.4819320252466898`*^-6, 1.5761017460965916`*^-6, 
          1.6759421870521516`*^-6, 1.7817745412604812`*^-6, 
          1.8939369409343982`*^-6, 2.01278527706948`*^-6, 
          2.1386940547377286`*^-6, 2.2720572852871554`*^-6, 
          2.4132894168165376`*^-6, 2.562826304333149`*^-6, 
          2.7211262210425065`*^-6, 2.8886709122603833`*^-6, 
          3.0659666934773075`*^-6, 3.253545594150304`*^-6, 
          3.451966548837346`*^-6, 3.6618166373337546`*^-6, 
          3.883712375514962`*^-6, 4.118301058631734`*^-6, 
          4.366262158850648`*^-6, 4.628308778877533`*^-6, 
          4.905189163546029`*^-6, 5.197688271299903`*^-6, 
          5.506629407545592`*^-6, 5.83287592189358`*^-6, 
          6.177332971359959`*^-6, 6.540949351640318`*^-6, 
          6.924719398620828`*^-6, 7.329684962333128`*^-6, 
          7.756937455612151`*^-6, 8.207619979758585`*^-6, 
          8.68292952955878`*^-6, 9.184119280058543`*^-6, 
          9.71250095753639`*^-6, 0.000010269447297169218`, 
          0.000010856394589924363`, 0.000011474845321267607`, 
          0.000012126370904311427`, 0.000012812614510079251`, 
          0.000013535293997607904`, 0.000014296204946644049`, 
          0.000015097223795746284`, 0.000015940311088637235`, 
          0.000016827514831693824`, 0.000017760973965505553`, 
          0.000018742921953469997`, 0.000019775690490425697`, 
          0.000020861713334370792`, 0.000022003530264340808`, 
          0.00002320379116755383`, 0.000024465260258972482`, 
          0.000025790820436446345`, 0.00002718347777464082`, 
          0.000028646366160979748`, 0.00003018275207684891`, 
          0.000031796039527336935`, 0.00003348977512280392`, 
          0.00003526765331559018`, 0.00003713352179518698`, 
          0.0000390913870452083`, 0.00004114542006550431`, 
          0.000043299962262776`, 0.0000455595315130373`, 
          0.0000479288283992822`, 0.00005041274262771148`, 
          0.000053016359625854515`, 0.00005574496732592488`, 
          0.000058604063136727756`, 0.00006159936110741286`, 
          0.00006473679928635752`, 0.00006802254727842803`, 
          0.0000714630140038305`, 0.00007506485566174836`, 
          0.00007883498390190091`, 0.00008278057420711688`, 
          0.00008690907448998806`, 0.00009122821390657351`, 
          0.00009574601189010872`, 0.00010047078740757104`, 
          0.0001054111684419103`, 0.00011057610170264853`, 
          0.000115974862567516`, 0.00012161706525763142`, 
          0.0001275126732487186`, 0.00013367200992069937`, 
          0.00014010576944790655`, 0.00014682502793206444`, 
          0.00015384125478004688`, 0.00016116632432830108`, 
          0.00016881252771571128`, 0.00017679258500649385`, 
          0.00018511965756462848`, 0.0001938073606811193`, 
          0.00020286977645526846`, 0.00021232146693093032`, 
          0.00022217748748859487`, 0.00023245340049390354`, 
          0.00024316528920308639`, 0.00025432977192551697`, 
          0.00026596401644350654`, 0.00027808575468910306`, 
          0.0002907132976775475`, 0.00030386555069680283`, 
          0.0003175620287522594`, 0.0003318228722655806`, 
          0.0003466688630263543`, 0.00036212144039491734`, 
          0.00037820271775457855`, 0.0003949354992110634`, 
          0.0004123432965367856`, 0.00043045034635730273`, 
          0.00044928162757693475`, 0.0004688628790402667`, 
          0.0004892206174260307`, 0.0005103821553693229`, 
          0.0005323756198081144`, 0.0005552299705493556`, 
          0.0005789750190498813`, 0.0006036414474068926`, 
          0.0006292608275524083`, 0.0006558656406457977`, 
          0.0006834892966581141`, 0.0007121661541415992`, 
          0.0007419315401772675`, 0.0007728217704933572`, 
          0.0008048741697466765`, 0.0008381270919587977`, 
          0.0008726199410986453`, 0.0009083931918023113`, 
          0.0009454884100410681`, 0.000983948274510235`, 
          0.0010238165974701021`, 0.0010651383458320925`, 
          0.0011079596624936718`, 0.0011523278876723762`, 
          0.0011982915803033557`, 0.0012459005394881949`, 
          0.001295205825982564`, 0.0013462597837095404`, 
          0.0013991160612851997`, 0.0014538296335426272`, 
          0.001510456823040189`, 0.0015690553215390165`, 
          0.001629684211435152`, 0.0016924039871304252`, 
          0.001757276576326147`, 0.0018243653612236928`, 
          0.0018937351996148035`, 0.0019654524458446662`, 
          0.0020395849716304676`, 0.0021162021867170175`, 
          0.0021953750593518197`, 0.0022771761365603226`, 
          0.002361679564202723`, 0.0024489611067929217`, 
          0.0025390981670595633`, 0.0026321698052295854`, 
          0.0027282567580134967`, 0.00282744145727175`, 
          0.0029298080483412888`, 0.0030354424080007774`, 
          0.003144432162052844`, 0.00325686670250171`, 0.003372837204303677`, 
          0.0034924366416681086`, 0.003615759803886625`, 
          0.0037429033106668873`, 0.003873965626948651`, 
          0.0040090470771783175`, 0.004148249859018459`, 
          0.00429167805646915`, 0.004439437652376898`, 0.004591636540307394`, 
          0.004748384535758178`, 0.004909793386687162`, 
          0.005075976783332625`, 0.005247050367300685`, 
          0.005423131739896065`, 0.0056043404696717435`, 
          0.005790798099173536`, 0.005982628150855073`, 
          0.006179956132139434`, 0.006382909539603278`, 
          0.0065916178622596544`, 0.006806212583915319`, 
          0.007026827184579429`, 0.0072535971409002885`, 0.007486659925606`, 
          0.0077261550059271565`, 0.00797222384097814`, 
          0.008225009878074736`, 0.00848465854796598`, 0.008751317258958167`, 
          0.009025135389910241`, 0.00930626428207848`, 0.009594857229790789`, 
          0.009891069469929807`, 0.010195058170205079`, 
          0.010506982416195798`, 0.010827003197536095`, 
          0.011155283390867986`, 0.011491987745453092`, 0.01183728286352874`, 
          0.01219133718132788`, 0.012554320948368997`, 0.012926406205396696`, 
          0.013307766760959357`, 0.013698578166610803`, 
          0.014099017690722405`, 0.014509264290893609`, 
          0.014929498584950221`, 0.015359902820519576`, 0.01580066084317328`, 
          0.016251958063128416`, 0.016713981420294406`, 0.01718691934891398`, 
          0.017670961738603524`, 0.018166299896103588`, 
          0.018673126504452905`, 0.019191635580913`, 0.01972202243341897`, 
          0.02026448361555348`, 0.02081921688004546`, 0.02138642113079469`, 
          0.021966296373424368`, 0.02255904366436599`, 0.023164865058480283`, 
          0.02378396355522066`, 0.024416543043347144`, 0.025062808244196544`, 
          0.025722964653520718`, 0.026397218481902827`, 
          0.027085776593763128`, 0.027788846444966195`, 
          0.028506636019046887`, 0.029239353762068068`, 0.02998720851612688`, 
          0.03075040945152877`, 0.03152916599764814`, 0.032323687772494954`, 
          0.03313418451101075`, 0.03396086599211483`, 0.03480394196452829`, 
          0.035663622071396665`, 0.03654011577374116`, 0.03743363227276679`, 
          0.03834438043105278`, 0.03927256869266009`, 0.040218405002183696`, 
          0.041182096722786034`, 0.04216385053868073`, 0.043163872429097`, 
          0.04418236749721525`, 0.045219539941582794`, 0.046275592955389584`, 
          0.047350728639127836`, 0.04844514791249161`, 0.0495590504255583`, 
          0.05069263446929493`, 0.051846096885433186`, 0.05301963297575678`, 
          0.054213436410848845`, 0.0554276991383438`, 0.05666261129073351`, 
          0.05791836109277223`, 0.05919513476853653`, 0.06049311644818111`, 
          0.061812488074451034`, 0.0631534293089925`, 0.064516117438523`, 
          0.0659007272809085`, 0.06730743109120203`, 0.06873639846769951`, 
          0.07018779625806866`, 0.07166178846560037`, 0.07315853617773234`, 
          0.07467819738459103`, 0.07622092701783602`, 0.07778687677028674`, 
          0.07937619502552479`, 0.08098902676609161`, 0.08262551348221463`, 
          0.08428579308111483`, 0.08596999979695756`, 0.08767826410150245`, 
          0.08941071261550886`, 0.09116746802096393`, 0.09294864897417882`, 
          0.09475437001982061`, 0.09658474150593649`, 0.09843986950002441`, 
          0.10031985570621045`, 0.10222479738359151`, 0.10415478726579658`, 
          0.10610991348182751`, 0.10809025947823149`, 0.11009590394266276`, 
          0.11212692072888995`, 0.114183378783302`, 0.11626534207296588`, 
          0.11837286951529134`, 0.12050601490935571`, 0.12266482686893744`, 
          0.12484934875731042`, 0.1270596186238558`, 0.1292956691425262`, 
          0.131557527552229`, 0.13384521559915735`, 0.13615874948113166`, 
          0.13849813979398506`, 0.14086339148004268`, 0.14325450377873877`, 
          0.14567147017940543`, 0.14811427837628688`, 0.15058291022580272`, 
          0.15307734170611526`, 0.15559754287902017`, 0.15814347785420965`, 
          0.16071510475593725`, 0.16331237569211146`, 0.16593523672585575`, 
          0.16858362784956812`, 0.17125748296149282`, 0.1739567298448467`, 
          0.17668129014951883`, 0.17943107937636263`, 0.18220600686410818`, 
          0.18500597577891303`, 0.18783088310656837`, 0.19068061964737357`, 
          0.19355507001370673`, 0.19645411263028761`, 0.19937761973715654`, 
          0.2023254573953749`, 0.20529748549545096`, 0.20829355776850775`, 
          0.2113135218001833`, 0.2143572190482861`, 0.2174244848581897`, 
          0.22051514849090517`, 0.22362903314402194`, 0.22676595598028845`, 
          0.22992572815794232`, 0.23310815486376202`, 0.23631303534882786`, 
          0.23954016296698283`, 0.24278932521597268`, 0.2460603037812582`, 
          0.24935287458248037`, 0.25266680782255063`, 0.2560018680393634`, 
          0.25935781416008946`, 0.2627343995580385`, 0.26613137211206134`, 
          0.2695484742684644`, 0.272985443105404`, 0.27644201039974015`, 
          0.2799179026963014`, 0.2834128413795449`, 0.28692654274756146`, 
          0.2904587180883954`, 0.2940090737586418`, 0.29757731126427933`, 
          0.3011631273436948`, 0.3047662140528601`, 0.3083862588526217`, 
          0.31202294469695013`, 0.3156759501286988`, 0.31934494936631097`, 
          0.3230296124035041`, 0.32672960510527177`, 0.33044458930681603`, 
          0.33417422291424465`, 0.3379181600069764`, 0.34167605094180364`, 
          0.3454475424585532`, 0.3492322777872905`, 0.3530298967570116`, 
          0.35684003590576024`, 0.3606623285921121`, 0.36449640510797066`, 
          0.36834189279260926`, 0.37219841614790034`, 0.37606559695466596`, 
          0.3799430543900972`, 0.38383040514616645`, 0.38772726354898057`, 
          0.39163324167900126`, 0.39554794949208166`, 0.3994709949412341`, 
          0.4034019840990908`, 0.4073405212809644`, 0.4112862091684696`, 
          0.4152386489336198`, 0.4191974403633409`, 0.4231621819843475`, 
          0.42713247118829195`, 0.4311079043571464`, 0.4350880769887351`, 
          0.4390725838223615`, 0.4430610189644568`, 0.447052976014196`, 
          0.4510480481890093`, 0.455045828449795`, 0.45904590962654873`, 
          0.4630478845424085`, 0.46705134613863897`, 0.4710558875985443`, 
          0.4750611024710341`, 0.47906658479364683`, 0.48307192921497183`, 
          0.48707673111640887`, 0.49108058673321003`, 0.49508309327473504`, 
          0.49908384904388375`, 0.5030824535556193`, 0.5070785076545534`, 
          0.5110716136315246`, 0.5150613753391178`, 0.5190473983060698`, 
          0.5230292898505201`, 0.527006659192038`, 0.53097911756239`, 
          0.5349462783149947`, 0.538907757033013`, 0.5428631716360348`, 
          0.5468121424853098`, 0.5507542924874776`, 0.5546892471967659`, 
          0.5586166349155954`, 0.562536086793566`, 0.5664472369247834`, 
          0.5703497224434757`, 0.5742431836178783`, 0.5781272639423458`, 
          0.5820016102276516`, 0.5858658726894469`, 0.5897197050348512`, 
          0.5935627645471367`, 0.5973947121684817`, 0.6012152125807672`, 
          0.6050239342843821`, 0.6088205496750281`, 0.6126047351184823`, 
          0.6163761710233108`, 0.620134541911503`, 0.623879536487015`, 
          0.6276108477021975`, 0.6313281728220927`, 0.6350312134865977`, 
          0.6387196757704582`, 0.6423932702411008`, 0.6460517120142828`, 
          0.6496947208075559`, 0.6533220209915241`, 0.6569333416389093`, 
          0.6605284165713998`, 0.6641069844042854`, 0.667668788588883`, 
          0.6712135774527391`, 0.6747411042376183`, 0.678251127135277`, 
          0.6817434093210176`, 0.6852177189850464`, 0.6886738293616158`, 
          0.6921115187559683`, 0.6955305705691073`, 0.698930773320362`, 
          0.7023119206678003`, 0.7056738114264732`, 0.7090162495845124`, 
          0.7123390443169951`, 0.7156420099981841`, 0.7189249662106622`, 
          0.7221877377533897`, 0.7254301546471826`, 0.7286520521382365`, 
          0.7318532706996235`, 0.7350336560307731`, 0.7381930590549665`, 
          0.7413313359148589`, 0.7444483479660569`, 0.7475439617687775`, 
          0.7506180490776106`, 0.7536704868294044`, 0.7567011571293178`, 
          0.7597099472350458`, 0.76269674953926`, 0.765661461550288`, 
          0.7686039858710616`, 0.7715242301763625`, 0.7744221071883957`, 
          0.7772975346507254`, 0.7801504353006007`, 0.7829807368397023`, 
          0.7857883719033476`, 0.7885732780281867`, 0.7913353976184133`, 
          0.7940746779105393`, 0.7967910709367552`, 0.7994845334869157`, 
          0.8021550270691861`, 0.8048025178693827`, 0.8074269767090421`, 
          0.8100283790022589`, 0.8126067047113221`, 0.8151619383011905`, 
          0.8176940686930347`, 0.8202030892157277`, 0.822688997558204`, 
          0.8251517957188798`, 0.8275914899550535`, 0.8300080907311681`, 
          0.8324016126661755`, 0.8347720744800158`, 0.8371194989392758`, 
          0.8394439128020452`, 0.8417453467620061`, 0.844023835391808`, 
          0.8462794170857483`, 0.8485121340017974`, 0.8507220320030159`, 
          0.8529091605983796`, 0.8550735728830707`, 0.8572153254782465`, 
          0.8593344784703414`, 0.8614310953499262`, 0.8635052429501555`, 
          0.8655569913848518`, 0.8675864139862424`, 0.8695935872423968`, 
          0.8715785907343894`, 0.8735415070732231`, 0.8754824218365472`, 
          0.8774014235051961`, 0.8792986033995921`, 0.8811740556160248`, 
          0.8830278769628596`, 0.8848601668966862`, 0.8866710274584496`, 
          0.8884605632095858`, 0.890228881168195`, 0.891976090745281`, 
          0.8937023036810755`, 0.8954076339814909`, 0.8970921978547144`, 
          0.8987561136479726`, 0.9003995017844988`, 0.9020224847007201`, 
          0.9036251867836935`, 0.9052077343088145`, 0.906770255377818`, 
          0.9083128798571019`, 0.9098357393163864`, 0.9113389669677416`, 
          0.9128226976049924`, 0.9142870675434338`, 0.9157322145604597`, 
          0.9171582778356487`, 0.9185653978923083`, 0.9199537165389947`, 
          0.9213233768116368`, 0.9226745229161742`, 0.9240073001717258`, 
          0.9253218549543124`, 0.9266183346411336`, 0.9278968875554342`, 
          0.9291576629119559`, 0.9304008107629942`, 0.9316264819450855`, 
          0.93283482802631`, 0.9340260012542554`, 0.9352001545046223`, 
          0.9363574412305035`, 0.9374980154123379`, 0.938622031508549`, 
          0.9397296444068808`, 0.9408210093764361`, 0.9418962820204282`, 
          0.9429556182296502`, 0.9439991741366731`, 0.9450271060707758`, 
          0.9460395705136135`, 0.9470367240557128`, 0.9480187233533102`, 
          0.9489857250867645`, 0.9499378859188984`, 0.9508753624545194`, 
          0.9517983112006049`, 0.9527068885273529`, 0.9536012506297954`, 
          0.9544815534903964`, 0.9553479528423126`, 0.956200604133452`, 
          0.9570396624913177`, 0.9578652826885565`, 0.9586776190227019`, 
          0.9594768256317178`, 0.9602630560205356`, 0.9610364630453223`, 
          0.9617971993009747`, 0.9625454167522527`, 0.9632812667899363`, 
          0.9640049002025758`, 0.9647164671490005`, 0.9654161171315868`, 
          0.9661039989702656`, 0.9667802607772873`, 0.9674450499327188`, 
          0.9680985130606813`, 0.9687407960063179`, 0.9693720438134897`, 
          0.9699924007031892`, 0.9706020100526681`, 0.9712010143752798`, 
          0.9717895553010152`, 0.9723677735577408`, 0.9729358089531253`, 
          0.9734938003572438`, 0.9740418856858627`, 0.9745802018843897`, 
          0.9751088849124823`, 0.975628069729313`, 0.9761378902794761`, 
          0.9766384794795322`, 0.9771299692051806`, 0.977612490279055`, 
          0.9780861724591273`, 0.9785511444277181`, 0.979007533781101`, 
          0.9794554670196914`, 0.9798950695388168`, 0.9803264656200522`, 
          0.9807497784231157`, 0.9811651299783162`, 0.9815726411795404`, 
          0.9819724317777726`, 0.9823646203751402`, 0.982749324419467`, 
          0.9831266601993371`, 0.9834967428396497`, 0.9838596862976603`, 
          0.9842156033594999`, 0.984564605637159`, 0.9849068035659286`, 
          0.9852423064022917`, 0.9855712222222497`, 0.9858936579200808`, 
          0.9862097192075161`, 0.986519510613327`, 0.9868231354833124`, 
          0.9871206959806775`, 0.9874122930867958`, 0.9876980266023431`, 
          0.9879779951487936`, 0.9882522961702738`, 0.9885210259357581`, 
          0.9887842795416022`, 0.989042150914404`, 0.9892947328141816`, 
          0.9895421168378605`, 0.9897843934230613`, 0.9900216518521802`, 
          0.9902539802567489`, 0.9904814656220737`, 0.9907041937921346`, 
          0.9909222494747469`, 0.9911357162469683`, 0.9913446765607464`, 
          0.9915492117488018`, 0.9917494020307313`, 0.9919453265193298`, 
          0.9921370632271203`, 0.9923246890730834`, 0.9925082798895809`, 
          0.9926879104294644`, 0.9928636543733588`, 0.9930355843371215`, 
          0.99320377187946`, 0.993368287509706`, 0.9935292006957416`, 
          0.9936865798720625`, 0.9938404924479803`, 0.9939910048159571`, 
          0.9941381823600279`, 0.99428208946441`, 0.9944227895221466`, 
          0.994560344943892`, 0.9946948171667853`, 0.9948262666634116`, 
          0.9949547529508516`, 0.9950803345998067`, 0.995203069243798`, 
          0.9953230135884332`, 0.9954402234207345`, 0.9955547536185217`, 
          0.9956666581598508`, 0.9957759901324923`, 0.9958828017434587`, 
          0.9959871443285584`, 0.9960890683619915`, 0.9961886234659647`, 
          0.9962858584203316`, 0.9963808211722509`, 0.9964735588458558`, 
          0.9965641177519431`, 0.9966525433976463`, 0.9967388804961319`, 
          0.996823172976282`, 0.9969054639923725`, 0.9969857959629734`, 
          0.9970642104344482`, 0.9971407483829019`, 0.9972154499314897`, 
          0.9972883545061648`, 0.9973595008160158`, 0.9974289268628047`, 
          0.9974966699504717`, 0.9975627666946046`, 0.997627253031871`, 
          0.9976901642294081`, 0.9977515348941706`, 0.9978113989822309`, 
          0.9978697898080336`, 0.9979267400535966`, 0.9979822817776614`, 
          0.9980364464247881`, 0.9980892648343938`, 0.9981407672497306`, 
          0.998190983326806`, 0.9982399421432376`, 0.998287672207047`, 
          0.9983342014653847`, 0.9983795573131901`, 0.9984237666017829`, 
          0.9984668556470978`, 0.998508850239279`, 0.9985497756493312`, 
          0.9985896566385779`, 0.9986285174665998`, 0.9986663818993867`, 
          0.9987032732174129`, 0.998739214223634`, 0.9987742272514067`, 
          0.9988083341723281`, 0.998841556404198`, 0.9988739149178754`, 
          0.9989054302461231`, 0.9989361224902827`, 0.9989660113279192`, 
          0.9989951160201722`, 0.9990234554190224`, 0.9990510479744749`, 
          0.9990779117416579`, 0.9991040643878393`, 0.9991295231993574`, 
          0.9991543050884673`, 0.9991784266001028`, 0.999201903918554`, 
          0.9992247528740601`, 0.9992469889493175`, 0.9992686272859032`, 
          0.9992896826906134`, 0.9993101696417194`, 0.9993301022951361`, 
          0.9993494944905098`, 0.9993683597572204`, 0.9993867113202995`, 
          0.9994045621062677`, 0.999421924748886`, 0.9994388115948261`, 
          0.9994552347092591`, 0.9994712058813606`, 0.9994867366297362`, 
          0.9995018382077645`, 0.9995165216088602`, 0.9995307975716576`, 
          0.9995446765851144`, 0.9995581688935351`, 0.9995712845015184`, 
          0.9995840331788254`, 0.999596424465169`, 0.9996084676749311`, 
          0.9996201719017976`, 0.9996315460233238`, 0.9996425987054205`, 
          0.9996533384067693`, 0.9996637733831614`, 0.9996739116917669`, 
          0.9996837611953293`, 0.9996933295662892`, 0.9997026242908383`, 
          0.9997116526729032`, 0.9997204218380578`, 0.9997289387373713`, 
          0.9997372101511847`, 0.9997452426928216`, 0.9997530428122333`, 
          0.9997606167995781`, 0.9997679707887347`, 0.9997751107607539`, 
          0.9997820425472443`, 0.9997887718336994`, 0.9997953041627579`, 
          0.999801644937408`, 0.9998077994241287`, 0.9998137727559732`, 
          0.9998195699355926`, 0.9998251958382027`, 0.9998306552144943`, 
          0.9998359526934854`, 0.9998410927853201`, 0.9998460798840118`, 
          0.9998509182701322`, 0.9998556121134491`, 0.999860165475509`, 
          0.9998645823121702`, 0.9998688664760853`, 0.999873021719132`, 
          0.9998770516947965`, 0.9998809599605067`, 0.9998847499799197`, 
          0.9998884251251601`, 0.9998919886790125`, 0.9998954438370707`, 
          0.99989879370984`, 0.9999020413247943`, 0.999905189628393`, 
          0.9999082414880536`, 0.9999111996940813`, 0.9999140669615602`, 
          0.9999168459322005`, 0.9999195391761496`, 0.9999221491937607`, 
          0.9999246784173252`, 0.9999271292127658`, 0.9999295038812942`, 
          0.9999318046610305`, 0.9999340337285877`, 0.9999361932006214`, 
          0.9999382851353442`, 0.999940311534006`, 0.9999422743423428`, 
          0.9999441754519902`, 0.9999460167018673`, 0.9999477998795273`, 
          0.999949526722478`, 0.9999511989194731`, 0.9999528181117711`, 
          0.999954385894368`, 0.9999559038171997`, 0.9999573733863164`, 
          0.9999587960650315`, 0.9999601732750396`, 0.9999615063975131`, 
          0.9999627967741692`, 0.9999640457083132`, 0.9999652544658556`, 
          0.9999664242763078`, 0.9999675563337507`, 0.999968651797781`, 
          0.9999697117944365`, 0.999970737417096`, 0.9999717297273593`, 
          0.9999726897559061`, 0.9999736185033317`, 0.999974516940964`, 
          0.9999753860116599`, 0.9999762266305825`, 0.9999770396859572`, 
          0.9999778260398118`, 0.999978586528695`, 0.9999793219643802`, 
          0.9999800331345482`, 0.9999807208034558`, 0.9999813857125854`, 
          0.9999820285812785`, 0.9999826501073547`, 0.9999832509677113`, 
          0.9999838318189123`, 0.999984393297758`, 0.9999849360218429`, 
          0.9999854605900967`, 0.9999859675833143`, 0.999986457564668`, 
          0.9999869310802105`, 0.9999873886593628`, 0.9999878308153879`, 
          0.9999882580458547`, 0.999988670833088`, 0.9999890696446075`, 
          0.9999894549335541`, 0.9999898271391057`, 0.9999901866868814`, 
          0.9999905339893359`, 0.9999908694461417`, 0.9999911934445618`, 
          0.999991506359813`, 0.9999918085554184`, 0.9999921003835507`, 
          0.9999923821853663`, 0.9999926542913296`, 0.9999929170215293`, 
          0.999993170685986`, 0.9999934155849504`, 0.9999936520091941`, 
          0.9999938802402925`, 0.9999941005508981`, 0.99999431320501`, 
          0.9999945184582312`, 0.9999947165580215`, 0.9999949077439441`, 
          0.9999950922479022`, 0.9999952702943716`, 0.9999954421006264`, 
          0.9999956078769561`, 0.9999957678268797`, 0.9999959221473513`, 
          0.9999960710289614`};

Length[invCDFf4]

invCDFf4[[401]]

Histogram[invCDFf4]

Plot[f4[std4 (s) + (mu4)]*std4,  {s, -3, 3}]

normf4[s_]  :=  f4[std4*s  +  mu4] * std4

normf4[0]
normf4[1]
normf4[-1]