Beispiel #1
0
 static public SampleValues StandardizeToRange(SampleValues sampVals)
 {
     if (sampVals.maxRngVal > 1)
     {
         double range = sampVals.maxRngVal - sampVals.minRngVal;
         sampVals.s = sampVals.s / range;
         sampVals.e = sampVals.e / range;
     }
     return(sampVals);
 }
Beispiel #2
0
 static public SampleValues UnstandardizeFromRange(SampleValues sampVals)
 {
     if (sampVals.maxRngVal > 1)
     {
         double range = sampVals.maxRngVal - sampVals.minRngVal;
         sampVals.s = sampVals.s * range;
         sampVals.e = sampVals.e * range;
     }
     return(sampVals);
 }
Beispiel #3
0
        static public SampleValues ErrorSize(SampleValues sampVals)
        {
            if (sampVals.maxRngVal > 1)
            {
                StandardizeToRange(sampVals);
            }

            sampVals.e = Math.Round(sampVals.s * z.GetZ(sampVals.c) * Math.Sqrt((sampVals.N - 1 - sampVals.n) / (sampVals.n * (sampVals.N - 1))), 5);

            if (sampVals.maxRngVal > 1)
            {
                UnstandardizeFromRange(sampVals);
            }

            return(sampVals);
        }
Beispiel #4
0
        static public SampleValues SampleSize(SampleValues sampVals)
        {
            if (sampVals.maxRngVal > 1)
            {
                StandardizeToRange(sampVals);
            }

            sampVals.n = Math.Round((sampVals.N * Math.Pow(sampVals.s * z.GetZ(sampVals.c) / sampVals.e, 2)) / ((sampVals.N - 1)
                                                                                                                + Math.Pow(sampVals.s * z.GetZ(sampVals.c) / sampVals.e, 2)));

            if (sampVals.maxRngVal > 1)
            {
                UnstandardizeFromRange(sampVals);
            }

            return(sampVals);
        }