05 Impact on median & mean - increasing an outlier#

%%html
<iframe width="700" height="400" src="https://www.youtube.com/embed/K1y6Tz_E7oA/" frameborder="0" allowfullscreen></iframe>
import numpy as np
import pandas as pd
from pandas import Series, DataFrame
import matplotlib.pyplot as plt

khanacademy

Impact on median & mean - increasing an outlier fig 1

x = np.array([180, 220, 250]) # - ? missing 
y = np.array([180, 220, 290]) # - ? missing
x = np.append(x, [200])
y = np.append(y, [200])
print(f'median of x: {np.median(x)}')
print(f'median of y: {np.median(y)}')
median of x: 210.0
median of y: 210.0