This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.stats import t | |
def t_test(sample_mean, population_mean, std_dev, n): | |
# t değerini hesaplama | |
t_score = (sample_mean - population_mean) / (std_dev / (n ** 0.5)) | |
# p-değeri hesaplamak için t'nin iki taraflı testini kullanma | |
p_value = t.sf(abs(t_score), df=n - 1) * 2 # df = serbestlik derecesi | |
# Sonuçları yazdırma | |
print(f"t skoru: {t_score}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.stats import norm | |
# Verilen değerler | |
n = 100 # örneklem büyüklüğü | |
x_bar = 36 # örneklem ortalaması | |
s = 8 # örneklem standart sapması | |
confidence_level = 0.95 | |
# %95 güven düzeyi için Z skoru | |
z_critical = norm.ppf((1 + confidence_level) / 2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.stats import t | |
# Verilen değerler | |
n = 19 # örneklem büyüklüğü | |
x_bar = 64 # örneklem ortalaması | |
s = 12 # örneklem standart sapması | |
confidence_level = 0.95 | |
# Serbestlik derecesi | |
df = n - 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kütüphaneleri import ediyoruz. | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy.stats import norm | |
# Veri setimizi okutuyoruz ve sütun başlığını "boy-uzunluklari" olarak belirliyoruz. | |
data = pd.read_csv('boy-uzunluklari.csv', header=None, names=['boy-uzunluklari']) | |
# Veriyi standartize ediyoruz. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kütüphaneleri import ediyoruz. | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
# boy-uzunluklari.csv dosyasını okutuyoruz ve sütun adını "boy-uzunluklari" yapıyoruz. | |
data = pd.read_csv('boy-uzunluklari.csv', header=None, names=['boy-uzunluklari']) | |
# Histogram grafiğinin stilini belirliyoruz. | |
sns.set(style="whitegrid") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sayilar_1 = {2, 4, 5, 7, 8, 10} | |
sayilar_2 = {3, 5, 7, 9, 11, 13} | |
sayilar_3 = sayilar_1.intersection(sayilar_2) | |
print(sayilar_3) | |
#ya da | |
sayilar_3 = sayilar_1 & sayilar_2 | |
print(sayilar_3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sayilar_1 = {2, 4, 5, 7, 8, 10} | |
sayilar_2 = {3, 5, 7, 9, 11, 13} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
degiskenler = ('ad','soyad','yaş','şehir','e-posta') | |
print(len(degiskenler)) | |
print(type(degiskenler)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
degiskenler = ('ad','soyad','yaş','şehir','e-posta') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sozluk = { | |
'anahtar1' : 'deger1', | |
'anahtar2' : 'deger0', | |
'anahtar3' : 'deger3' | |
} | |
sozluk.update({'anahtar2':'deger2'}) | |
print(sozluk) |
NewerOlder