<jupyter_start><jupyter_text>Mean Median Mode<jupyter_code>import numpy as np
from scipy import stats
age = [20, 23, 25, 25, 27, 27, 27, 29, 30, 32, 121]
np.mean(age)
np.median(age)
stats.mode(age)
stats.mode(age)[0]
stats.mode(age)[0][0]
age = [20, 23, 25, 25, 27, 27, 27, 29, 30, 32]
np.mean(age)
np.median(age)
age_2=[18,19,17,20,21,22]
stats.mode(age_2)
type(age)<jupyter_output><empty_output><jupyter_text>Mean in Arrays<jupyter_code>age_new=np.array(age)
type(age_new)
np.mean(age)
age_new.mean()  # array oluşturduğunuzda böyle de kullanabilirsiniz
a = np.array([[6, 8, 3, 0],
              [3, 2, 1, 7],
              [8, 1, 8, 4],
              [4, 2, 0, 2],
              [4, 7, 5, 9]])

stats.mode(a)
stats.mode(a, axis=None)
stats.mode(a, axis=1)<jupyter_output><empty_output><jupyter_text>Range, SD, Variance<jupyter_code>age = [20, 23, 25, 25, 27, 27, 27, 29, 30, 32, 121]
range = np.max(age)-np.min(age)
print(range)
var = np.var(age)
print(var)
std = np.std(age)
print(std)
age = [20, 23, 25, 25, 27, 27, 27, 29, 30, 32]
std = np.std(age)
print(std)<jupyter_output>3.2939338184001206<jupyter_text>IQR<jupyter_code>x=[8, 10, 5, 24, 8, 3, 11, 3, 40, 7, 6, 12, 4]
q75, q25 = np.percentile(x, [75, 25])
q75
q25
sorted(x)
len(x)
q50=np.percentile(x, 50)
q50
iqr = q75-q25
iqr
from scipy.stats import iqr
iqr(x)
import matplotlib.pyplot as plt
mu, sigma = 100, 40
s = np.random.normal(mu,sigma, 100000)
plt.hist(s, 100)
plt.xlim(0,200);
mu, sigma = 100, 10
s = np.random.normal(mu,sigma, 100000)
plt.hist(s, 100)
plt.xlim(0,200);
import numpy as np
from scipy.stats import kurtosis, skew
kurtosis(s)
s_new=s*10
kurtosis(s_new)<jupyter_output><empty_output><jupyter_text>Additional<jupyter_code>x=[7,9,9,10,10,10,11,12,12,14]
q75, q25 = np.percentile(x, [75, 25])
q75
q25
iqr = q75-q25
iqr
from scipy.stats import iqr
iqr(x)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.178743961352657, 'fraction_numerical': 0.13526570048309178, 'mean_word_length': 4.955271565495208, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '471675', 'license': 'MIT', 'n_tokens_mistral': 1095, 'n_tokens_neox': 882, 'n_words': 198, 'path': 'Data Science and Machine Learning/Machine-Learning-In-Python-THOROUGH/CLARUSWAY/STATISTICS/Statistics_Session_3.ipynb', 'repo_name': 'okara83/Becoming-a-Data-Scientist', 'size': '1863'}