लिनीयर रिग्रेशन और पेयर्स बूटस्ट्रैप

Statistical Thinking के केस स्टडीज़

Justin Bois

Lecturer, Caltech

बैक्टीरियल ग्रोथ

1 Images courtesy of Jin Park and Michael Elowitz, Caltech
Statistical Thinking के केस स्टडीज़

बैक्टीरियल ग्रोथ

Statistical Thinking के केस स्टडीज़
_ = plt.semilogy(t, bac_area, marker='.', linestyle='none')
_ = plt.xlabel('time (hr)')
_ = plt.ylabel('area (sq. µm)')
plt.show()

Statistical Thinking के केस स्टडीज़

np.polyfit() से लिनीयर रिग्रेशन

slope, intercept = np.polyfit(t, bac_area, 1)

t_theor = np.array([0, 14])
bac_area_theor = slope * t_theor + intercept

_ = plt.plot(t, bac_area, marker='.', linestyle='none')
_ = plt.plot(t_theor, bac_area_theor)
_ = plt.xlabel('time (hr)')
_ = plt.ylabel('area (sq. µm)')
plt.show()
Statistical Thinking के केस स्टडीज़

बैक्टीरियल ग्रोथ का रिग्रेशन

Statistical Thinking के केस स्टडीज़

np.polyfit() से सेमीलॉग-लिनीयर रिग्रेशन

slope, intercept = np.polyfit(t, np.log(bac_area), 1)

t_theor = np.array([0, 14])
bac_area_theor = np.exp(slope * t_theor + intercept)

_ = plt.semilogy(t, bac_area, marker='.', linestyle='none')
_ = plt.semilogy(t_theor, bac_area_theor)
_ = plt.xlabel('time (hr)')
_ = plt.ylabel('area (sq. µm)')
plt.show()
Statistical Thinking के केस स्टडीज़

बैक्टीरियल ग्रोथ का रिग्रेशन

Statistical Thinking के केस स्टडीज़

पेयर्स बूटस्ट्रैप

  • डेटा को पेयर्स में रिसैंपल करें
  • रिसैंपल्ड डेटा से slope और intercept निकालें
  • हर slope और intercept एक बूटस्ट्रैप रेप्लिकेट है
  • बूटस्ट्रैप रेप्लिकेट्स के परसेंटाइल से कॉन्फिडेंस इंटरवल निकालें
Statistical Thinking के केस स्टडीज़

पेयर्स बूटस्ट्रैप

# Draw 10000 pairs bootstrap reps
slope_reps, int_reps = dcst.draw_bs_pairs_linreg(
  x_data, y_data, size=10000
)

# Compute 95% confidence interval of slope slope_conf_int = np.percentile(slope_reps, [2.5, 97.5])
Statistical Thinking के केस स्टडीज़

अभ्यास करते हैं!

Statistical Thinking के केस स्टडीज़

Preparing Video For Download...