शुरू करेंमुफ़्त में शुरू करें

Relative errors की गणना

आप जितना बड़ा सैंपल लेते हैं, आपके point estimates उतनी ही सटीकता से संबंधित population parameter को दर्शाते हैं। उदाहरण के लिए, जब आप sample mean निकालते हैं, तो आप चाहते हैं कि वह population mean के क़रीब हो। लेकिन अगर आपका सैंपल बहुत छोटा है, तो ऐसा ज़रूरी नहीं।

सटीकता मापने के लिए सबसे आम metric है relative error। यह population parameter और point estimate के बीच का absolute अंतर होता है, जिसे population parameter से विभाजित किया जाता है। कई बार इसे प्रतिशत में व्यक्त किया जाता है।

attrition_pop और mean_attrition_pop (attrition_pop की Attrition कॉलम का mean) उपलब्ध हैं; pandas pd नाम से लोड है।

यह अभ्यास पाठ्यक्रम का हिस्सा है

Python में Sampling

पाठ्यक्रम देखें

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Generate a simple random sample of 50 rows, with seed 2022
attrition_srs50 = ____

# Calculate the mean employee attrition in the sample
mean_attrition_srs50 = ____

# Calculate the relative error percentage
rel_error_pct50 = ____

# Print rel_error_pct50
print(rel_error_pct50)
कोड संपादित करें और चलाएँ