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

संतान और अभिभावक डेटा का Pearson correlation

Pearson correlation coefficient यह मापने का अच्छा तरीका लगता है कि चोंच की गहराई (beak depth) माता-पिता से संतान में कितनी मज़बूती से विरासत में जाती है. G. scandens के लिए अभिभावक और संतान की beak depth के बीच Pearson correlation coefficient निकालें. यही काम G. fortis के लिए भी करें. फिर, पिछले अभ्यास में लिखे गए फंक्शन का उपयोग करके pairs bootstrap से 95% confidence interval निकालें.

ध्यान रखें, डेटा bd_parent_scandens, bd_offspring_scandens, bd_parent_fortis, और bd_offspring_fortis में संग्रहीत है.

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

Statistical Thinking in Python (Part 2)

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

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

  • G. scandens और G. fortis के लिए Pearson correlation coefficient निकालने हेतु pearson_r() फंक्शन का उपयोग करें जो आपने इस कोर्स के प्रीक्वेल में लिखा था.
  • G. scandens और G. fortis दोनों के लिए, पिछले अभ्यास में लिखे draw_bs_pairs() फंक्शन का उपयोग करके Pearson correlation coefficient के 1000 pairs bootstrap replicates हासिल करें.
  • अपने bootstrap replicates का उपयोग करके दोनों के 95% confidence interval की गणना करें.

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

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

# Compute the Pearson correlation coefficients
r_scandens = ____
r_fortis = ____

# Acquire 1000 bootstrap replicates of Pearson r
bs_replicates_scandens = ____

bs_replicates_fortis = ____


# Compute 95% confidence intervals
conf_int_scandens = ____
conf_int_fortis = ____

# Print results
print('G. scandens:', r_scandens, conf_int_scandens)
print('G. fortis:', r_fortis, conf_int_fortis)
कोड संपादित करें और चलाएँ