You are viewing a single comment's thread. Return to all comments →
S = sorted([v for v,f in zip(values,freqs) for _ in range(f)]) L = len(S) Q1 = (S[(L//4)-1] + S[(L//4)]) /2 if L%4 == 0 else S[L//4] Q3 = (S[3*(L//4)-1] + S[3*(L//4)]) /2 if 3*L%4 == 0 else S[3*L//4] print( f"{Q3 - Q1:.1f}")
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Interquartile Range
You are viewing a single comment's thread. Return to all comments →