Python ile Anket Verilerini Analiz Etme
EbunOluwa Andrew
Data Scientist

Çıktı değişkeniyle ilgili girdileri seçin
Değişkenlerin popülasyon üzerindeki etkisini anlayın
Farklar tesadüfi mi yoksa istatistiksel olarak anlamlı mı, kontrol edin

| pet_type | current_pets | time_spent | reduces_stress |
|---|---|---|---|
| dog | 1 | 420 | yes |
| dog | 1 | 180 | yes |
| dog | 4 | 30 | yes |
| dog | 1 | 30 | yes |
| dog | 1 | 60 | yes |
pet_typereduces_stressimport pandas as pd import scipy.stats as st data = pd.read_csv('pet_survey.csv')cross_table = pd.crosstab(data.reduces_stress, data.pet_type)chi_analysis = st.chi2_contingency(cross_table)print(chi_analysis)
|--------------------------|
| (67.7, |
| 1.9e-16, |
| 1, |
| array([[1767.0, 1825.0], |
| [2251.0, 2325.0]])) |
Frekanslar >= 5
p-değeri < 0.05
pet_owned ile reduces_stress ilişkilidirSahip olunan hayvan türü, stres azalması algısını etkiler

Python ile Anket Verilerini Analiz Etme