Bazı verileri işlemek ve bu kısa python komut dosyalarını yazdım. Ancak, bunları çalıştırmayı denediğimde, bu hatayı alıyorum: SyntaxError: operatöre atanamaz. İşte chi kare testi ve t testi için kod.Python'da Chi kare ve t testi hatası
ki kare testi:
import scipy.stats as stats
a = [5851, 72007]
b = [6927, 70802]
c = [5915, 71729]
d = [5660, 71491]
obs = [a, b, c, d]
chi2, p-value, dof, expected = stats.chi2_contingency(obs)
print 'p-value =', p-value
t testi:
import scipy.stats as stats
a = [625, 480, 621, 633]
b = [647, 503, 559, 586]
t-statistic, p-value = stats.ttest_ind(a,b)
print 'p-value =', p-value
Vahşi tahmin: değişken isimde '-' kaçının mı? –