CumulativeProduct - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Statistics

  

CumulativeSum

  

compute cumulative sums for a data sample

  

CumulativeProduct

  

compute cumulative products for a data sample

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

CumulativeSum(X)

CumulativeProduct(X)

Parameters

X

-

data sample

Description

• 

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.

Examples

> 

with⁡Statistics:

> 

N≔10

N≔10

(1)
> 

h≔1.N−1

h≔0.1111111111

(2)
> 

σ≔0.2;r≔0.1

σ≔0.2

r≔0.1

(3)
> 

U≔RandomVariable⁡Normal⁡0,σ⁢sqrt⁡h

U≔_R

(4)
> 

R≔Sample⁡exp⁡r⁢h−σ2⁢h2⁢exp⁡U,N

R≔0.9393134401987530.9902445167661441.050430382232010.9812204754063140.9640748543418081.020452459420571.037825460041080.9711267732897370.9949683153457090.994468626738408

(5)
> 

S≔CumulativeSum⁡R

S≔0.9393134401987531.929557956964902.979988339196913.961208814603224.925283668945035.945736128365606.983561588406687.954688361696428.949656677042139.94412530378054

(6)
> 

P≔CumulativeProduct⁡R

P≔0.9393134401987530.9301499836815590.9770578028917180.9587091218528600.9242673570064580.9431708976193900.9788467707192060.9505843059936220.9458012655285440.940569685697619

(7)
> 

LineChart⁡S,P,legend=Cumulative Sum,Cumulative Product

See Also

Statistics

Statistics[Computation]

Statistics[DataManipulation]