बूटस्ट्रैप हाइपोथिसिस टेस्ट

Statistical Thinking in Python (Part 2)

Justin Bois

Lecturer at the California Institute of Technology

हाइपोथिसिस टेस्टिंग की पाइपलाइन

  • शून्य परिकल्पना साफ़-साफ़ बताइए
  • अपना टेस्ट स्टैटिस्टिक परिभाषित कीजिए
  • मान लीजिए शून्य परिकल्पना सही है और कई simulated डेटा सेट बनाइए
  • हर simulated डेटा सेट के लिए टेस्ट स्टैटिस्टिक निकालिए
  • p-value वह भाग है जहाँ simulated डेटा सेट का टेस्ट स्टैटिस्टिक वास्तविक डेटा जितना या उससे अधिक extreme हो
Statistical Thinking in Python (Part 2)

Michelson और Newcomb: प्रकाश की गति के पुरोधा

ch3-3.008.png

1 Michelson image: public domain, Smithsonian 2 Newcomb image: US Library of Congress
Statistical Thinking in Python (Part 2)

Michelson और Newcomb: प्रकाश की गति के पुरोधा

ch3-3.010.png

1 Michelson image: public domain, Smithsonian 2 Newcomb image: US Library of Congress
Statistical Thinking in Python (Part 2)

हमारे पास उपलब्ध डेटा

ch3-3.011.png

1 Data: Michelson, 1880
Statistical Thinking in Python (Part 2)

शून्य परिकल्पना

  • Michelson के प्रयोगों में वास्तविक औसत प्रकाश-गति वास्तव में Newcomb का रिपोर्ट किया मान था
Statistical Thinking in Python (Part 2)

Michelson डेटा को शिफ्ट करना

newcomb_value = 299860  # km/s
michelson_shifted = michelson_speed_of_light \\
           - np.mean(michelson_speed_of_light) + newcomb_value

ch3-3.019.png

Statistical Thinking in Python (Part 2)

टेस्ट स्टैटिस्टिक की गणना

def diff_from_newcomb(data, newcomb_value=299860):
    return np.mean(data) - newcomb_value
diff_obs = diff_from_newcomb(michelson_speed_of_light)

diff_obs
-7.5999999999767169
Statistical Thinking in Python (Part 2)

p-value निकालना

bs_replicates = draw_bs_reps(michelson_shifted,
                             diff_from_newcomb, 10000)

p_value = np.sum(bs_replicates <= diff_observed) / 10000
p_value
0.16039999999999999
Statistical Thinking in Python (Part 2)

 

One sample test

- एक डेटा सेट की तुलना एक संख्या से करें

 

Two sample test

- दो डेटा सेट की तुलना करें
Statistical Thinking in Python (Part 2)

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

Statistical Thinking in Python (Part 2)

Preparing Video For Download...