org.statcato.statistics.inferential
Class HypothesisTestMatchedPairs
- java.lang.Object
-
- org.statcato.statistics.inferential.HypothesisTestMatchedPairs
-
public class HypothesisTestMatchedPairs extends java.lang.ObjectA hypothesis test for matched pairs,- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor and Description HypothesisTestMatchedPairs(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 dBar)Returns the p-value corresponding to dBar in a t distribution.doubletestStatistics(double dBar)Returns the test statistics for the given sample mean of differences between matched pairs, dBar.
-
-
-
Constructor Detail
-
HypothesisTestMatchedPairs
public HypothesisTestMatchedPairs(int n, double mu, double s, double confidenceLevel, int testType)Constructor.- Parameters:
n- sample size of differences between matched pairsmu- hypothesized mean of differences between matched pairss- sample standard deviation of differences between matched pairsconfidenceLevel- confidence leveltestType- (as defined inHypothesisTest)
-
-
Method Detail
-
testStatistics
public double testStatistics(double dBar)
Returns the test statistics for the given sample mean of differences between matched pairs, dBar.t = (dBar - mu) / (s / sqrt(n))
- Parameters:
dBar- sample mean- Returns:
- test statistic t
-
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 dBar)
Returns the p-value corresponding to dBar in a t distribution.- Parameters:
dBar-- Returns:
- p-value
-
-
DMelt 3.0 © DataMelt by jWork.ORG