org.statcato.statistics.inferential
Class HypothesisTest1MeanSigmaUnknown
- java.lang.Object
-
- org.statcato.statistics.inferential.HypothesisTest1MeanSigmaUnknown
-
public class HypothesisTest1MeanSigmaUnknown extends java.lang.ObjectA hypothesis test for 1 population mean, population standard deviation unknown.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor and Description HypothesisTest1MeanSigmaUnknown(int n, double mu, double s, 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 xBar)Returns the p-value corresponding to xBar in a t distribution.doubletestStatistics(double xBar)Returns the test statistics for the given sample mean xBar.
-
-
-
Constructor Detail
-
HypothesisTest1MeanSigmaUnknown
public HypothesisTest1MeanSigmaUnknown(int n, double mu, double s, double confidenceLevel, int testType)Constructor.- Parameters:
n- sample sizemu- hypothesized means- sample standard deviationconfidenceLevel- confidence leveltestType- (as defined inHypothesisTest)
-
-
Method Detail
-
testStatistics
public double testStatistics(double xBar)
Returns the test statistics for the given sample mean xBar.t = (xBar - mu) / (s / sqrt(n))
- Parameters:
xBar- sample mean- Returns:
- test statistic z score
-
criticalValue
public java.lang.String criticalValue()
Returns the critical value corresponding to the given confidence level and type of test. Uses the t distribution.- Returns:
- critical value
- See Also:
HypothesisTest
-
pValue
public double pValue(double xBar)
Returns the p-value corresponding to xBar in a t distribution.- Parameters:
xBar- x bar- Returns:
- p-value p-Value corresponding to xBar
-
-
DMelt 3.0 © DataMelt by jWork.ORG