Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 442 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 442 Bytes

Brownian Motion (Random walk)

Description

Statistically independent successive steps with following transition probability.

#[allow(non_snake_case)]
fn W(i: i64, j: i64) -> f64 {
    if (i - j).abs() == 1 {
        0.5
    } else {
        0.0
    }
}

It can be simply implemented via Bernoulli distribution.

Build process

# Just run
cargo run --release

# Plot
python nc_plot.py

Result