这只是分子∑(xi-X)(yi-Y)可以化简成:∑(xiyi)-nXY 如下:
∑(xi-X)(yi-Y)
=∑(xiyi-xiY-Xyi+XY)
=∑(xiyi)-Y∑xi-X∑yi+∑XY
=∑(xiyi)-Y*nX-X*nY+nXY
=∑(xiyi)-nXY
这只是分子∑(xi-X)(yi-Y)可以化简成:∑(xiyi)-nXY 如下:
∑(xi-X)(yi-Y)
=∑(xiyi-xiY-Xyi+XY)
=∑(xiyi)-Y∑xi-X∑yi+∑XY
=∑(xiyi)-Y*nX-X*nY+nXY
=∑(xiyi)-nXY