Clear
*!*
计算:基于样本估算标准偏差 STDEVP() 和 估算样本的标准偏差 STDEV() 函数
*!*
游标里包含的数据是 Excel Help 中的 STDEV 和 STDEVP 示例数据
Set Decimals To 8
Create Cursor Mytable (Id Int , columnx N(5,2) Null)
Insert Into Mytable Values (1, 1345)
Insert Into Mytable Values (1, 1301)
Insert Into Mytable Values (1, 1368)
Insert Into Mytable Values (1, 1322)
Insert Into Mytable Values (1, 1310)
Insert Into Mytable Values (1, 1370)
Insert Into Mytable Values (1, 1318)
Insert Into Mytable Values (1, 1350)
Insert Into Mytable Values (1, 1303)
Insert Into Mytable Values (1, 1299)
Calculate Std(columnx) To nstd
? nstd
*!*
参阅:http://office.
*!*
说明(结果):假定只生产了 10 件工具,其断裂强度的标准偏差 (26.05455814)
*!*
基于样本估算标准偏差 STDEVP()
Select Id, Sqrt(Avg(columnX^2)-Avg(columnX)^2) As Std, Count(*) , Count(columnx) As Cnt, Avg(columnx) ;
From MyTable Group By Id Into Cursor Q1
Browse Nowait
*!*
估算样本的标准偏差 STDEV()
Select Id, Sqrt((Count(columnx)*Sum(Columnx^2)- Sum(Columnx)^2)/ ;
((Count(columnx)*(Count(columnx)-(1-0.00000001)))));
From MyTable Group By Id Into Cursor Q2
Browse Last Nowait