File:DriftedWienerProcess1D.svg

From Vigyanwiki

Original file(SVG file, nominally 720 × 540 pixels, file size: 7.83 MB)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: Wiener Process with drift mu = 1
Date
Source Own work
Author Shiyu Ji

Python/Matplotlib Code

# A simulation of 1D drifted Wiener process with time step dt = .0001
import matplotlib.pyplot as pl
import numpy as np

t0 = 0.0
dt = 0.0001
t_final = 2
T = np.arange(t0, t_final, dt)
ax = pl.figure().add_subplot(111)
ax.set_xlabel('t')
ax.set_ylabel('X')

x = 0.0
mu = 1
sigma = 100.0
# Drifted
np.random.seed(2)
for t in T:
    new_x = x + mu*dt + sigma * np.random.normal(0, dt)
    ax.plot([t, t+dt], [x, new_x], 'b-', linewidth=0.5)
    x = new_x

# sigma * dW process
x = 0.0
np.random.seed(2)
for t in T:
    new_x = x + sigma * np.random.normal(0, dt)
    ax.plot([t, t+dt], [x, new_x], 'r-', linewidth=0.5)
    x = new_x

pl.show()

Licensing

I, the copyright holder of this work, hereby publish it under the following licence:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International licence.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the licence, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible licence as the original.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

11 November 2016

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current08:36, 12 November 2016Thumbnail for version as of 08:36, 12 November 2016720 × 540 (7.83 MB)wikimediacommons>Shiyu Jixy labels fixed

Metadata