<jupyter_start><jupyter_text>Define the DataSet<jupyter_code>dataset=[11,10,12,14,12,15,14,13,15,102,12,14,17,19,107,10,13,12,14,12,108,12,11,14,13,15,10,15,12,10,14,13,15,10]
plt.hist(dataset)
# Z-Score
outliers=[]
def detect_outliers(data):
    threshold=3## s std deviation
    mean=np.mean(data)
    std=np.std(data)
    
    for i in data:
        z_score=(i-mean)/std
        if np.abs(z_score)>threshold:
            outliers.append(i)
    return outliers
    
detect_outliers(dataset)<jupyter_output><empty_output><jupyter_text>IQR1. Short the data2. Calculate q1 and q33. IQR(q3-q1)4. Find the lower fence(q1-1.5(IQR))5. Find the upper fence(q3+1.5(IQR))<jupyter_code>dataset=sorted(dataset)
dataset
q1,q3=np.percentile(dataset,[25,75])
print(q1,q3)
iqr=q3-q1
# find the lower fence and higher fence
lower_fence=q1-(1.5*iqr)
higher_fence=q3+(1.5*iqr)
print(lower_fence, higher_fence)
import seaborn as sns
sns.boxplot(dataset)
for i in dataset:
    if i <7.5 and i >19.5:<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15247524752475247, 'fraction_numerical': 0.10693069306930693, 'mean_word_length': 5.31875, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '646273', 'license': 'MIT', 'n_tokens_mistral': 502, 'n_tokens_neox': 439, 'n_words': 71, 'path': 'Finding the outliers.ipynb', 'repo_name': 'TUCchkul/Stastistics', 'size': '1010'}