1.3.20 · D3 · HinglishProbability & Statistics

Worked examplesHypothesis testing and p-values

3,216 words15 min read↑ Read in English

1.3.20 · D3 · AI-ML › Probability & Statistics › Hypothesis testing aur p-values

Yeh page ek worked-example gauntlet hai. Parent note ne tumhe machinery ek baar dikhaayi. Yahan hum use har us shape ke through run karte hain jo ek problem le sakti hai: one tail, two tails, woh boundary jahan p-value exactly ke barabar hoti hai, ek degenerate "zero difference" input, ek limiting "huge sample" case, ek real-world word problem, aur ek exam-style trap. Agar tum yahan koi case dekh lete ho, toh tumne use pehle se hi dekh liya hai.

Shuru karne se pehle, ek promise: neeche use kiya gaya har symbol ya toh parent mein define hai ya yahan re-earn kiya gaya hai. Jab bhi koi number nikalti hai, use verify block mein check kiya jaata hai.


The scenario matrix

Hypothesis test ko ek machine ki tarah socho jisme knobs hain. Knobs hain: hum kaun sa tail(s) dekhte hain, observed effect ka sign, aur input kitna extreme hai. Neeche ki table mein har knob-setting list ki gayi hai taaki baad mein kuch bhi surprise na kare.

Cell Case class Kyun tricky hai Covered by
A Two-tailed, positive effect tail double karni padti hai; direction matter nahi karta Ex 1
B Two-tailed, negative effect negative hai — kya hum sign flip karte hain? Ex 2
C One-tailed, right side sirf "bigger" count hota hai; double mat karo Ex 3
D One-tailed, wrong direction effect us taraf jaata hai jo tumne umeed ki thi uske opposite Ex 4
E Boundary case: p-value reject karein ya nahi? " vs " ka edge Ex 5
F Zero / degenerate input observed = null exactly, Ex 6
G Limiting case: huge tiny effect "significant" ban jaata hai Ex 7
H Real-world word problem tumhe khud banane padte hain Ex 8
I Exam twist: given a target p-value, find the cutoff machine ko ulta chalao Ex 9

Teen definitions jinpar hum poori tarah rely karte hain, plain words mein re-stated:

Neeche ki picture poora game hai: ek bell curve ( ke under random variable ki distribution), tumhara ek observed value uspar mark kiya hua, aur shaded tail area = the p-value.

Figure — Hypothesis testing and p-values

Yahan se sab kuch hai: dhundo, sahi region shade karo, area padho. Yeh dekhne ke liye ki bell-shaped kyun hai, 1.3.15-Central-limit-theorem dekho, aur "random variable" aur "distribution" ka matlab jaanne ke liye 1.3.1-Random-variables-and-distributions dekho.


Cell A — Two-tailed, positive effect


Cell B — Two-tailed, negative effect


Cell C — One-tailed, right side


Cell D — One-tailed, effect GALAT direction mein


Cell E — Exact boundary: p-value


Cell F — Degenerate input: observation null ke barabar hai


Cell G — Limiting case: huge sample size


Cell H — Real-world word problem (tum hypotheses banate ho)


Cell I — Exam twist: machine ko ulta chalao


Matrix wrap karna

Scenario matrix ka har cell ab ek solved example hai. Nau ke neeche ek single skill:

Sirf do judgement calls hain: kitne tails ( ki wording se) aur kaun sa side (effect ke sign se). Yeh do sahi karo aur arithmetic har baar identical hai.

Recall Quick self-test

Two-tailed : p-value kya hai? ::: — sign mein fold ho jaata hai. One-tailed right test, lekin effect galat way gaya (): kya tum kabhi reject kar sakte ho? ::: Nahi — right-tail p-value se exceed kar jaayega; wrong-direction effect kabhi ka evidence nahi hota. Observation exactly null ke barabar hai: aur p-value kya hai? ::: , p-value (two-tailed) — maximally boring. effect par reject kyun karta hai lekin par nahi? ::: SE ki tarah shrink karta hai, isliye ke saath grow karta hai chahe effect fixed ho. , , aur mein kya difference hai? ::: true unknown proportion hai; woh value hai jo claim karta hai; woh hai jo sample ne dikhaya. Capital aur lowercase mein kya difference hai? ::: random variable hai (poori bell); woh single observed number hai jo hamare data ne produce kiya.

Yeh bhi dekho 1.3.21-Type-I-and-Type-II-errors ("reject" ka kya cost hai jab true tha) aur 2.5.7-Statistical-significance-in-experiments (yeh tests real A/B decisions ko kaise power karte hain).