Accord.Statistics.Testing.Power.ZTestPowerAnalysis.GetEffectSize C# (CSharp) 메소드

GetEffectSize() 공개 정적인 메소드

Estimates the number of samples necessary to attain the required power level for the given effect size.
public static GetEffectSize ( int sampleSize, double power = 0.8, double alpha = 0.05, OneSampleHypothesis hypothesis = OneSampleHypothesis.ValueIsDifferentFromHypothesis ) : ZTestPowerAnalysis
sampleSize int The number of observations in the sample.
power double The desired power level. Default is 0.8.
alpha double The desired significance level. Default is 0.05.
hypothesis OneSampleHypothesis The alternative hypothesis (research hypothesis) to be tested.
리턴 ZTestPowerAnalysis
        public static ZTestPowerAnalysis GetEffectSize(int sampleSize, double power = 0.8, double alpha = 0.05,
            OneSampleHypothesis hypothesis = OneSampleHypothesis.ValueIsDifferentFromHypothesis)
        {
            var analysis = new ZTestPowerAnalysis(hypothesis)
            {
                Samples = sampleSize,
                Size = alpha,
                Power = power,
            };

            analysis.ComputeEffect();

            return analysis;
        }
    }