Statistics
CumulativeSum
compute cumulative sums for a data sample
CumulativeProduct
compute cumulative products for a data sample
Calling Sequence
Parameters
Description
Examples
CumulativeSum(X)
CumulativeProduct(X)
X
-
data sample
The CumulativeSum is a utility routine for computing cumulative sums of data.
The CumulativeProduct is a utility routine for computing cumulative products of data.
The first parameter X is a data sample - given as e.g. a Vector.
with⁡Statistics:
N≔10
h≔1.N−1
h≔0.1111111111
σ≔0.2;r≔0.1
σ≔0.2
r≔0.1
U≔RandomVariable⁡Normal⁡0,σ⁢sqrt⁡h
U≔_R
R≔Sample⁡exp⁡r⁢h−σ2⁢h2⁢exp⁡U,N
R≔0.9393134401987530.9902445167661441.050430382232010.9812204754063140.9640748543418081.020452459420571.037825460041080.9711267732897370.9949683153457090.994468626738408
S≔CumulativeSum⁡R
S≔0.9393134401987531.929557956964902.979988339196913.961208814603224.925283668945035.945736128365606.983561588406687.954688361696428.949656677042139.94412530378054
P≔CumulativeProduct⁡R
P≔0.9393134401987530.9301499836815590.9770578028917180.9587091218528600.9242673570064580.9431708976193900.9788467707192060.9505843059936220.9458012655285440.940569685697619
LineChart⁡S,P,legend=Cumulative Sum,Cumulative Product
See Also
Statistics[Computation]
Statistics[DataManipulation]
Download Help Document