if (numberList.Any())
{
exEntity.MinValue = numberList.First().NumberValue.ToString();
exEntity.MaxValue = numberList.Last().NumberValue.ToString();
exEntity.AvgValue = Math.Round((decimal)numberList.Average(p => p.NumberValue), ).ToString();
//标准差
if (numberList.Count > )
{
double sumOfSquare = ; //平方总和
foreach (var item in numberList)
{
double numberValue = double.Parse(item.NumberValue.ToString());
sumOfSquare += Math.Pow((numberValue - double.Parse(exEntity.AvgValue)), );
}
double stdDeviation = Math.Sqrt(sumOfSquare / (numberList.Count - ));
stdDeviation = Math.Round(stdDeviation, );
exEntity.StdDeviation = stdDeviation.ToString();
}
}

最新文章

  1. ABP理论学习之领域服务
  2. stunnel-client
  3. JS的基础知识
  4. meclipse中project facet问题
  5. Java栈与堆一篇好文
  6. springMVC配置freemarker
  7. Combox控件初始化项的技巧
  8. hbm2ddl
  9. Sumsets(3sum问题,枚举d,c二分a+b)
  10. win10安装sqlserver2016准备
  11. 2018-2019-2 20165221 【网络对抗技术】-- Exp6 信息搜集与漏洞扫描
  12. zabbix3.0监控Windows服务器
  13. IEEE754浮点数的表示方法
  14. Mac中selenium使用出现错误
  15. PHP中$_POST和$_GET的用法
  16. Chrome disable cache & clear memory cache
  17. 序列操作bzoj2962(未完成)
  18. php算法,冒泡排序
  19. java学习笔记17(Calendarl类)
  20. SharePoint BDC(Business Data Connectivity)服务-PowerShell

热门文章

  1. AMBA
  2. U盘容量变小的处理方式
  3. 安装zabbix,make的时候报错
  4. HTML JavaScripts
  5. VR内容定制请找北京动软VR团队,长年承接VR/AR应用、游戏内容定制
  6. JAVA多态的定义
  7. javascript 要点
  8. HUD 4007 [扫描线][序]
  9. poj 1806 Manhattan 2025
  10. python学习笔记(三)