Confidence intervals की गणना
आपने confidence intervals निकालने के दो तरीकों के बारे में सीखा है: quantile method और standard error method. Standard error method में normal distribution के inverse cumulative distribution function (inverse CDF) का उपयोग करके confidence intervals निकाले जाते हैं. इस अभ्यास में, आप Spotify डेटा पर ये दोनों तरीके लागू करेंगे.
spotify_population, spotify_sample, और bootstrap_distribution उपलब्ध हैं; pandas और numpy अपने सामान्य उपनामों के साथ लोड हैं, और scipy.stats से norm लोड किया गया है.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Python में Sampling
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Generate a 95% confidence interval using the quantile method
lower_quant = ____
upper_quant = ____
# Print quantile method confidence interval
print((lower_quant, upper_quant))