Normality की जाँच
हाइपोथेसिस टेस्ट सहित सांख्यिकीय टूल्स का एक शक्तिशाली सेट इस धारणा पर निर्भर करता है कि आधारभूत डेटा नॉर्मली डिस्ट्रीब्यूटेड है. हिस्टोग्राम यह संकेत दे सकता है कि डेटा लगभग नॉर्मल है या नहीं, लेकिन अलग-अलग हाइपोथेसिस टेस्ट हमें इस धारणा को सीधे परखने देते हैं. साथ ही, जब सैंपल साइज छोटा हो, तो हिस्टोग्राम बिन्स की संख्या के प्रति बहुत संवेदनशील हो सकते हैं.
इस अभ्यास में आप City of Austin के कर्मचारियों के वेतन डेटा salary_df के साथ काम करेंगे. खासतौर पर आप Hispanic फायरफाइटर्स पर ध्यान देंगे. आप Anderson-Darling हाइपोथेसिस टेस्ट का उपयोग करके जाँचेंगे कि उनकी रोजगार अवधि (years of employment) लगभग नॉर्मली डिस्ट्रीब्यूटेड है या नहीं.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Python में अनुमान का आधार
अभ्यास निर्देश
- कर्मचारियों के
Years of Employmentको दिखाने वाला एक हिस्टोग्राम प्लॉट करें. - यह देखने के लिए normality के लिए Anderson-Darling टेस्ट चलाएँ कि
Years of Employmentलगभग नॉर्मली डिस्ट्रीब्यूटेड है या नहीं. - पता करें कि टेस्ट
statisticकिनcritical_valuesसे बड़ा है. - वे
significance_levelप्रिंट करें जिन पर null hypothesis खारिज की जाएगी.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Plot a histogram of the employees' "Years of Employment"
____.plot(kind="____")
plt.show()
# Conduct an Anderson-Darling test using the years of employment from salary_df
result = stats.____(____)
# Print which critical values the test statistic is greater than the critical values
print(result.____ > result.____)
# Print the significance levels at which the null hypothesis is rejected
print(result.____[result.____ > result.____])