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

किसी सांख्यिकीय मान में परिवर्तन का विज़ुअलाइज़ेशन

पहले, आपने sample statistics के variation की गणना की थी. अब आप उस variation को visualize करेंगे.

हम एक preloaded population और पहले से परिभाषित फंक्शन get_sample_statistics() से शुरू करेंगे, जो samples खींचता है और sample statistics के arrays लौटाता है.

यहाँ हम पहले से परिभाषित plot_hist() फंक्शन का उपयोग करेंगे जो matplotlib की मेथड axis.hist() को wrap करता है, जो पास किए गए array को bin भी करता है और plot भी करता है. इस तरह आप देख पाएँगे कि sample statistics के मानों का एक distribution होता है, केवल एक single value नहीं.

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

Python में Linear Modeling परिचय

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

अभ्यास निर्देश

  • sample statistic distributions प्राप्त करने के लिए population को get_sample_statistics() में पास करें.
  • प्रत्येक statistic array के लिए histogram bin edges परिभाषित करने के लिए np.linspace() का उपयोग करें.
  • पहले से परिभाषित plot_hist() का दो बार उपयोग करें, ताकि means और deviations की statistic distributions को दो अलग-अलग histograms के रूप में plot किया जा सके.

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

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

# Generate sample distribution and associated statistics
means, stdevs = get_sample_statistics(____, num_samples=100, num_pts=1000)

# Define the binning for the histograms
mean_bins = np.____(97.5, 102.5, 51)
std_bins = np.____(7.5, 12.5, 51)

# Plot the distribution of means, and the distribution of stdevs
fig = plot_hist(data=____, bins=____, data_name="Means", color='green')
fig = plot_hist(data=____, bins=____, data_name="Stdevs", color='red')
कोड संपादित करें और चलाएँ