MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / pValue

Method pValue

JSAT/src/jsat/testing/onesample/ZTest.java:100–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98 }
99
100 public double pValue()
101 {
102 double se = sampleDev/Math.sqrt(sampleSize);
103
104 double zScore = (sampleMean-hypoMean)/se;
105
106 if(h1 == H1.NOT_EQUAL)
107 return norm.cdf(-Math.abs(zScore))*2;
108 else if(h1 == H1.LESS_THAN)
109 return norm.cdf(zScore);
110 else
111 return 1-norm.cdf(zScore);
112 }
113
114 public void setAltHypothesis(H1 h1)
115 {

Callers

nothing calls this directly

Calls 1

cdfMethod · 0.45

Tested by

no test coverage detected