|
TwoSampleZTestPowerAnalysisGetSampleSize Method
|
Estimates the number of samples necessary to attain the
required power level for the given effect size.
Namespace:
Accord.Statistics.Testing.Power
Assembly:
Accord.Statistics (in Accord.Statistics.dll) Version: 3.8.0
Syntax public static TwoSampleZTestPowerAnalysis GetSampleSize(
double delta,
double standardDeviation = 1,
double proportion = 1,
double power = 0.8,
double alpha = 0.05,
TwoSampleHypothesis hypothesis = TwoSampleHypothesis.ValuesAreDifferent
)
Public Shared Function GetSampleSize (
delta As Double,
Optional standardDeviation As Double = 1,
Optional proportion As Double = 1,
Optional power As Double = 0.8,
Optional alpha As Double = 0.05,
Optional hypothesis As TwoSampleHypothesis = TwoSampleHypothesis.ValuesAreDifferent
) As TwoSampleZTestPowerAnalysis
Request Example
View SourceParameters
- delta
- Type: SystemDouble
The minimum detectable difference. - standardDeviation (Optional)
- Type: SystemDouble
The difference standard deviation. - proportion (Optional)
- Type: SystemDouble
The proportion of observations in the second group
when compared to the first group. A proportion of 2:1 results in twice more
samples in the second group than in the first. Default is 1. - power (Optional)
- Type: SystemDouble
The desired power level. Default is 0.8. - alpha (Optional)
- Type: SystemDouble
The desired significance level. Default is 0.05. - hypothesis (Optional)
- Type: Accord.Statistics.TestingTwoSampleHypothesis
The alternative hypothesis (research hypothesis) to be tested.
Return Value
Type:
TwoSampleZTestPowerAnalysisThe required number of samples.
See Also