29 Cumulative geometric probability (less than a value)
29 Cumulative geometric probability (less than a value)#
%%html
<iframe width="700" height="400" src="https://www.youtube.com/embed/nxUP4lJ_hbU/" frameborder="0" allowfullscreen></iframe>
import numpy as np
import pandas as pd
from pandas import Series, DataFrame
import matplotlib.pyplot as plt
import seaborn as sns
from scipy import stats, special
p = 0.1
np.sum([(1 - p)**i* p for i in range(4)])
0.34390000000000004
1 - 0.9 ** 4
0.3439