:

## Speed of Statistics computation

Maple
Hello, I would like to use Maple in Statistics, but I have a problem with a speed of base functions, like generation, Mean, Range and Standard deviation. Maple computes slowly than MathCad. I have 4 test functions: Test of generation speed > restart: > > Digits :=10: > > test3:=proc(N,n) > local i,a,X; > use Statistics in > X := RandomVariable(Normal(0,1)): > for i from 1 to N do > a:=Sample(X,n): > end do: > end use; > end proc: > time(test3(30000,100)); Test of Mean speed > restart: > Digits :=10; > > test4:=proc(N,n) > local i,a,b,X; > use Statistics in > X := RandomVariable(Normal(0,1)): > a:=Sample(X,n): > for i from 1 to N do > b:=Mean(a) > end do: > end use; > end proc: > time(test4(30000,100)); Test of StandardDeviation speed > restart: > Digits :=10; > > test5:=proc(N,n) > local i,a,b,X; > use Statistics in > X := RandomVariable(Normal(0,1)): > a:=Sample(X,n): > for i from 1 to N do > b:=StandardDeviation(a) > end do: > end use; > end proc: > time(test5(30000,100)); Test of Range speed > restart: > Digits :=10; > > test6:=proc(N,n) > local i,a,b,X; > use Statistics in > X := RandomVariable(Normal(0,1)): > a:=Sample(X,n): > for i from 1 to N do > b:=Range(a) > end do: > end use; > end proc: > time(test6(30000,100)); Times for N=30,000 , n=100 Maple - Mathcad 63,2 - 3,20 13,3 - 0,03 13,9 - 0,33 19,5 - 0,14 I think, that I do something bad. Could you help me please? Thank you Vladimir Download 551_test3456.mws
View file details

﻿