|
|
@@ -58,6 +58,7 @@ public class PrecisionEP15Item {
|
|
|
private final int df;
|
|
|
|
|
|
private final double p;//0.01 or 0.05
|
|
|
+ private double cr;
|
|
|
|
|
|
public PrecisionEP15Item(int index, double[][] data, InspectionConfigVO configVO) {
|
|
|
this.name = configVO.getSpecimensName()[index];
|
|
|
@@ -82,6 +83,26 @@ public class PrecisionEP15Item {
|
|
|
this.df = configVO.getDays() * (configVO.getRepeatNum() - 1);
|
|
|
}
|
|
|
|
|
|
+ public String getName() {
|
|
|
+ return name;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setName(String name) {
|
|
|
+ this.name = name;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int getLevel() {
|
|
|
+ return level;
|
|
|
+ }
|
|
|
+
|
|
|
+ public int getDf() {
|
|
|
+ return df;
|
|
|
+ }
|
|
|
+
|
|
|
+ public double getP() {
|
|
|
+ return p;
|
|
|
+ }
|
|
|
+
|
|
|
public double getN() {
|
|
|
return n;
|
|
|
}
|
|
|
@@ -98,6 +119,14 @@ public class PrecisionEP15Item {
|
|
|
this.vr = vr;
|
|
|
}
|
|
|
|
|
|
+ public double getCr() {
|
|
|
+ return cr;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCr(double cr) {
|
|
|
+ this.cr = cr;
|
|
|
+ }
|
|
|
+
|
|
|
public double getSdb() {
|
|
|
return sdb;
|
|
|
}
|
|
|
@@ -221,9 +250,6 @@ public class PrecisionEP15Item {
|
|
|
|
|
|
public void calculate() {
|
|
|
//批内标准差
|
|
|
-// xValue[] vrs = Arrays.stream(data).map(SpecimensCalcVO::getVariance).toArray(xValue[]::new);
|
|
|
-// double withinVr = xAverage.eval(vrs).getDoub();
|
|
|
-// sr = Math.sqrt(withinVr);
|
|
|
double[] vrs = new double[data.length];
|
|
|
for (int i = 0; i < data.length; i++) {
|
|
|
vrs[i] = StatUtils.variance(data[i]);
|
|
|
@@ -231,7 +257,6 @@ public class PrecisionEP15Item {
|
|
|
vr = StatUtils.mean(vrs);
|
|
|
sdr = Math.sqrt(vr);//SDr 为批内标准差
|
|
|
//总均值
|
|
|
-// xValue[] means = Arrays.stream(data).map(SpecimensCalcVO::getMean).toArray(xValue[]::new);
|
|
|
double[] means = new double[data.length];
|
|
|
for (int i = 0; i < data.length; i++) {
|
|
|
means[i] = StatUtils.mean(data[i]);
|
|
|
@@ -259,8 +284,8 @@ public class PrecisionEP15Item {
|
|
|
}
|
|
|
double d = data.length;
|
|
|
|
|
|
-// double cr = PVModel.getCValue(df, level, 0.05);
|
|
|
- verR = allowableSDr * Math.sqrt(PVModel.getCValue(df, level, p) / df);
|
|
|
+ cr = PVModel.getCValue(df, level, p);
|
|
|
+ verR = allowableSDr * Math.sqrt(cr / df);
|
|
|
|
|
|
//t=((((C14-1)*(C16^2))+(C14*M11))^2)/(((C14-1)/C13*(C16^4))+(((C14^2)*(M11^2))/(C13-1)))
|
|
|
t = (Math.pow((((n - 1) * (Math.pow(sdr, 2))) + (n * vb)), 2)) / (((n - 1) / d * (Math.pow(sdr, 4))) + (((Math.pow(n, 2)) * (Math.pow(vb, 2))) / (d - 1)));
|