i am coding on a dataset [23,25,28,28,32,33,35]
according to wiki and scipy doc
IQR = Q3 − Q1 = 33 - 25 = 8
when I run IQR on a dataset, the result (6) is not as expected (8).
I tried another method in https://stackoverflow.com/a/23229224, and the result is 6.
here is my code
import numpy as np
from scipy.stats import iqr
x = np.array([23,25,28,28,32,33,35])
print(iqr(x, axis=0))
what leads to the problem?