1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2025-07-04 13:47:06 +01:00

empirical p-value function

This commit is contained in:
2025-07-01 17:07:37 +01:00
parent b0782552d1
commit e72d8669b1
3 changed files with 18 additions and 1 deletions

View File

@ -32,9 +32,10 @@ int main(void)
for (double s = 1.; s < 5.; ++s)
{
auto ci = h.confidenceInterval(s);
cout << static_cast<int>(s) << " sigma(s) interval= [";
cout << ci.first << ", " << ci.second << "]" << endl;
cout << "P(X > " << s << ") = " << h.pValue(s) + 1. - h.pValue(-s) << endl;
}
p << PlotHistogram(h);
p << PlotFunction(compile("return exp(-x_0^2/2)/sqrt(2*pi);", 1), -5., 5.);