请问怎么在js里面实现求一个矩阵的数学期望值?

请问怎么在js里面实现求一个矩阵的数学期望值?

梦里花落0921
浏览 544回答 2
2回答

蝴蝶不菲

var variance = function(numbers) {var mean = 0;var sum = 0;for(var i=0;i<numbers.length;i++){sum += numbers[i];}mean = sum / numbers.length;sum = 0;for(var i=0;i<numbers.length;i++){sum += Math.pow(numbers[i] - mean , 2);}return sum / numbers.length;};

MMMHUHU

var mean = 0;var sum = 0;for(var i=0;i<numbers.length;i++){sum += numbers[i];
打开App,查看更多内容
随时随地看视频慕课网APP