org.statcato.statistics.inferential
Class SampleSizeDetermination
- java.lang.Object
-
- org.statcato.statistics.inferential.SampleSizeDetermination
-
public class SampleSizeDetermination extends java.lang.ObjectFunctions for determining the sample size estimating a population statistic.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor and Description SampleSizeDetermination()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static intmean(double alpha, double stdev, double error)Returns the sample size for estimating a population mean given the significance level, standard deviation, and margin of error.static intproportion(double alpha, double estimate, double error)Returns the sample size for estimating a population proportion given the significance level, proportion estimate, and margin of error.
-
-
-
Method Detail
-
proportion
public static int proportion(double alpha, double estimate, double error)Returns the sample size for estimating a population proportion given the significance level, proportion estimate, and margin of error. n = z^2 * p * q / E^2 if proportion estimate p is known (z is the critical value based on the significance level, E is the margin of error, and q is 1 - p.) n = z^2 * 0.25 / E^2 if proportion estimate is unknown- Parameters:
alpha- significance levelestimate- proportiion estimate (-1 if unknown)error- margin of error- Returns:
- sample size
-
mean
public static int mean(double alpha, double stdev, double error)Returns the sample size for estimating a population mean given the significance level, standard deviation, and margin of error. n = [z * sigma / E]^2 where z is the critical value given the significance level, sigma is the population standard deviation, and E is the margin of error.- Parameters:
alpha- significance levelstdev- population standard deviationerror- margin of error- Returns:
- sample size
-
-
DMelt 3.0 © DataMelt by jWork.ORG