org.statcato.statistics.inferential
Class HypothesisTest1Var
- java.lang.Object
-
- org.statcato.statistics.inferential.HypothesisTest1Var
-
public class HypothesisTest1Var extends java.lang.ObjectA hypothesis test for 1 population variance- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor and Description HypothesisTest1Var(int n, double sigma2, double confidenceLevel, int testType)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringcriticalValue()Returns the critical value corresponding to the given confidence level and type of test.doublepValue(double s2)Returns the p-value corresponding to s2 in a chi-square distribution.doubletestStatistics(double s2)Returns the test statistics for the given sample variance s2.
-
-
-
Constructor Detail
-
HypothesisTest1Var
public HypothesisTest1Var(int n, double sigma2, double confidenceLevel, int testType)Constructor.- Parameters:
n- sample sizesigma2- hypothesized varianceconfidenceLevel- confidence leveltestType- (as defined inHypothesisTest)
-
-
Method Detail
-
testStatistics
public double testStatistics(double s2)
Returns the test statistics for the given sample variance s2.X2 = (n-1)^2 * s2 / sigma2
- Parameters:
s2- hypothesized population variance- Returns:
- test statistic X2 (chi-square)
-
criticalValue
public java.lang.String criticalValue()
Returns the critical value corresponding to the given confidence level and type of test. Uses the chi-square distribution.- Returns:
- critical value
- See Also:
HypothesisTest
-
pValue
public double pValue(double s2)
Returns the p-value corresponding to s2 in a chi-square distribution.- Parameters:
s2- variance- Returns:
- p-value
-
-
DMelt 3.0 © DataMelt by jWork.ORG