我在这里很新,目前我正在尝试用Java计算标准偏差(我已经用谷歌搜索了哈哈)但是我在让它工作时遇到了很多问题
我有十个由用户输入的值,然后我必须计算到目前为止我理解的标准偏差,这要感谢那些回答的人我找到数组的平均值然后完成计算
double two = total[2];
double three = total[3];
double four = total[3];
double five = total[4];
double six = total[6];
double seven = total[7];
double eight = total[8];
double nine = total[9];
double ten = total[10];
double eleven = average_total;
mean = one + two + three + four + five + six + seven + eight + nine + ten + eleven;
mean = mean/11;
//one = one - mean;
//System.out.println("I really hope this prints out a value:" +one);
*/
//eleven = average_total - mean;
//eleven = Math.pow(average_total,average_total);
//stand_dev = (one + two + three + four + five + six + seven + eight + nine + ten + eleven);
//stand_dev = stand_dev - mean;
// stand_dev = (stand_dev - mean) * (stand_dev - mean);
// stand_dev = (stand_dev/11);
// stand_dev = Math.sqrt(stand_dev);
我已经将数据存储在 10 个值的数组中,但我不太确定如何从数组中打印数据然后进行计算,而不必将输入代码存储在我操作过的其他地方
谢谢你的时间,非常感谢:)