- UID
- 47001
沙弥
- 主题
- 帖子
- 精华
- 积分
- 33
- 存在感
-
- 宅魂
-
- 合奏豆
-
- 注册时间
- 2014-9-1
- 最后登录
- 1970-1-1
- 在线时间
- 小时
|
Function themean(datarange)
Dim item As Variant
Dim i As Integer, y As Integer
i = 0
y = 0
For Each item In datarange
i = i + 1
y = y + item
Next
themean = y / i
End Function
Function thestv(datarange)
Dim item As Variant
Dim i As Integer, y As Integer
i = 0
y = 0
For Each item In datarange
i = i + 1
y = y + item
Next
Dim mean As Double
mean = y / i
Dim sum As Double
For Each item In datarange
sum = sum + (item - mean) ^ 2
Next
thestv = (sum / i) ^ (1 / 2)
End Function
|
|