# Brownian Motion Solution

## Exercise #1

In the Brownian motion example,

Dynamic( 0, Self[Time-1] + Normal(0,1) )

The @Time=1 value is always 0. Your exercise is to alter the expression to make the @Time=1 value random as well.

### Solution

Dynamic( Normal(0,1), Self[Time-1] + Normal(0,1) )

## Exercise #2

In the Brownian motion example,

Cumulate( Normal(0,1,over:Time), Time )

The @Time=1 value is random. Modify the example so that the @Time=1 value is always 0, and such that the @Time=1 value is a single random step from the start.

### Solution

Cumulate( (@Time>1) * Normal(0,1,over:Time), Time)

or equivalently

Cumulate( If @Time=1 Then 0 Else Normal(0,1,over:Time), Time)