aboutsummaryrefslogtreecommitdiffstats
path: root/stats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-20 09:54:03 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-20 09:54:03 -0800
commitf4d806c77abf112a9fc6f87549e9e2346396e3f1 (patch)
treeadec857fb85184a5533d178172b0a45dbe554f7b /stats
parent29060feaa80ba85c7337a6661a7cacc929b1b934 (diff)
parent625fa139a919a52e4ad3fc61d5aa625bef37e2f2 (diff)
downloadsubsurface-f4d806c77abf112a9fc6f87549e9e2346396e3f1.tar.gz
Merge branch 'tvalue'
Diffstat (limited to 'stats')
-rw-r--r--stats/regressionitem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/stats/regressionitem.cpp b/stats/regressionitem.cpp
index 362bf1fe1..9f176c6ae 100644
--- a/stats/regressionitem.cpp
+++ b/stats/regressionitem.cpp
@@ -45,12 +45,12 @@ void RegressionItem::updatePosition()
for (int i = 0; i < num_samples; ++i) {
double x = (maxX - minX) / (num_samples - 1) * static_cast<double>(i) + minX;
poly << QPointF(xAxis->toScreen(x),
- yAxis->toScreen(reg.a * x + reg.b + 2.0 * sqrt(reg.res2 / (reg.n - 2) * (1.0 / reg.n + (x - reg.xavg) * (x - reg.xavg) / (reg.n - 1) * (reg.n -2) / reg.sx2))));
+ yAxis->toScreen(reg.a * x + reg.b + 1.960 * sqrt(reg.res2 / (reg.n - 2) * (1.0 / reg.n + (x - reg.xavg) * (x - reg.xavg) / (reg.n - 1) * (reg.n -2) / reg.sx2))));
}
for (int i = num_samples - 1; i >= 0; --i) {
double x = (maxX - minX) / (num_samples - 1) * static_cast<double>(i) + minX;
poly << QPointF(xAxis->toScreen(x),
- yAxis->toScreen(reg.a * x + reg.b - 2.0 * sqrt(reg.res2 / (reg.n - 2) * (1.0 / reg.n + (x - reg.xavg) * (x - reg.xavg) / (reg.n - 1) * (reg.n -2) / reg.sx2))));
+ yAxis->toScreen(reg.a * x + reg.b - 1.960 * sqrt(reg.res2 / (reg.n - 2) * (1.0 / reg.n + (x - reg.xavg) * (x - reg.xavg) / (reg.n - 1) * (reg.n -2) / reg.sx2))));
}
QPolygonF linePolygon;
linePolygon.reserve(2);