-
Pandas Basics 5
-
Lecture1.1
-
Lecture1.2
-
Lecture1.3
-
Lecture1.4
-
Lecture1.5
-
-
Data Transformations 6
-
Lecture2.1
-
Lecture2.2
-
Lecture2.3
-
Lecture2.4
-
Lecture2.5
-
Lecture2.6
-
-
Statistics 4
-
Lecture3.1
-
Lecture3.2
-
Lecture3.3
-
Lecture3.4
-
-
Reading and Writing Data 3
-
Lecture4.1
-
Lecture4.2
-
Lecture4.3
-
-
Joins 5
-
Lecture5.1
-
Lecture5.2
-
Lecture5.3
-
Lecture5.4
-
Lecture5.5
-
-
Grouping 4
-
Lecture6.1
-
Lecture6.2
-
Lecture6.3
-
Lecture6.4
-
-
Introduction to Numpy 4
-
Lecture7.1
-
Lecture7.2
-
Lecture7.3
-
Lecture7.4
-
-
Randomness 2
-
Lecture8.1
-
Lecture8.2
-
-
Numpy Data Functionality 1
-
Lecture9.1
-
Introduction
Statistics¶
We are going to explore a few things in terms of statistics for this lesson, and specifically work a bit with bollinger bands as an example of using some statistics. First, the code below just creates data but can be ignored. It will be a random stock price that we can think about analyzing.
In [1]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(1)
base = np.array([100] * 200)
random_error = np.random.normal(0, .01, 200) * 100
random_error = np.cumsum(random_error)
trend = np.array([0] * 60+[-.5]*20+[.5]*20+[0]*60+[-.5]*20+[.5]*20)
trend = np.cumsum(trend)
df = pd.Series(base + random_error+trend)
plt.plot(df)
plt.show()
Prev
Window Functions