p=0.0026<0.05=α → Reject H0. Conclusion: Strong evidence the coin is biased.
What the p-value means: If the coin were fair, there's only a 0.26% chance we'd see a result this extreme (or more). That's rare enough to doubt the "fair coin" assumption.
Recall Feynman Explanation (Explain to a 12-year-old)
Okay, imagine your friend says, "I have a magic coin that always lands on heads!" You're skeptical, so you say, "Prove it." They flip it 10 times, and it lands on heads 7 times.
Now, here's the question: Is the coin really magic, or did they just get lucky?
Hypothesis testing is like being a detective. You start by assuming the coin is normal (the "null hypothesis"). Then you ask, "If the coin were normal, how often would I see 7 or more heads out of 10?" You calculate the chance—turns out it's about 17% (roughly 1 in 6 times). That's the p-value.
Is 17% rare enough to say the coin is magic? Most scientists say you need less than 5% (really rare) to be convinced. So in this case, you'd say, "Nah, 7 out of 10 could easily just be luck. Show me more flips!"
The p-value is like a "weirdness score" for your data. The smaller it is, the more you doubt the boring explanation and start believing something special is happening.
1.3.21-Type-I-and-Type-II-errors – The error rates controlled by hypothesis tests
2.5.7-Statistical-significance-in-experiments – Applying hypothesis testing to A/B tests in ML systems
3.2.12-Multiple-testing-correction – When testing many hypotheses, adjust for inflated false positives (Bonferroni, FDR)
#flashcards/ai-ml
What is a p-value? :: The probability of observing data at least as extreme as what we got, assuming the null hypothesis H0 is true. It measures how "unusual" our data is under H0.
What does "statistically significant at α=0.05" mean?
The p-value is less than 0.05, so we reject the null hypothesis. Under H0, data this extreme would occur less than 5% of the time.
What is the null hypothesis H0?
The default "no effect" assumption we test against. We assume it's true unless data provides strong evidence to reject it. Example: "The coin is fair," "The two groups have equal means."
What is the alternative hypothesis H1?
The claim we want evidence for, stating there IS an effect or difference. Example: "The coin is biased," "Treatment group has higher mean than control."
What does "fail to reject H0" mean?
The p-value is ≥ α, so we don't have strong enough evidence to reject the null. This does NOT prove H0 is true—just that data is consistent with it.
In a two-tailed test, why do we multiply by 2 when computing the p-value?
Because we care about deviations in both directions (too high or too low). We count the probability of being extreme in either tail.
What is the test statistic in hypothesis testing?
A number computed from the data that summarizes how far the observation is from what H0 predicts. Example: z-score Z=σ/nXˉ−μ0.
What is the difference between Type I and Type II errors?
Type I (false positive): Rejecting H0 when it's true, probability = α. Type II (false negative): Failing to reject H0 when it's false, probability = β.
When do you use a one-tailed vs two-tailed test?
One-tailed: You only care about deviations in one direction (e.g., "new model is better"). Two-tailed: You care about any difference (e.g., "new model is different").
What is the significance level α?
The threshold for rejecting H0. If p<α, we reject. Common choice: 0.05, meaning we tolerate a 5% false positive rate.
Why is "p < 0.05 means H0 is false" a wrong interpretation?
The p-value is P(data∣H0), not P(H0∣data). It measures data extremeness under H0, not the probability that H0 is false.
What is the relationship between confidence intervals and hypothesis tests?
If a value μ0 is outside the 95% confidence interval for μ, you'd reject H0:μ=μ0 at α=0.05. They're dual methods.
Chalo ise ek simple example se samajhte hain. Socho tumhare paas ek coin hai aur tum 100 baar flip karke 65 heads paate ho. Ab sawaal ye hai — kya coin fair hai ya rigged? Hypothesis testing basically ek framework hai jo poochta hai: "Agar coin sach mein fair hoti, toh itna weird result aane ke kitne chances hote?" Yahi weirdness ko measure karta hai p-value. Hum shuru mein maan lete hain ki coin fair hai (isko bolte hain null hypothesis, H0), phir dekhte hain ki hamara actual data isse kitna dur hai. Iske liye ek test statistic nikalte hain (jaise Z score) jo batata hai ki hamara result mean se kitne standard deviations door hai. Coin wale case mein Z=3 nikla, aur p-value aaya 0.0026 — matlab agar coin fair hoti toh sirf 0.26% chance tha itna extreme result aane ka. Ye itna rare hai ki hum H0 ko reject kar dete hain aur bolte hain coin biased hai.
Yahaan core intuition ye samajhna hai ki p-value tumhe seedha ye nahi batata ki coin biased hai ya nahi — ye batata hai ki agar default assumption sach hoti toh tumhara data kitna surprising hota. Chota p-value (usually 0.05 se kam) matlab data itna weird hai ki default belief pe shaq karna banta hai. Ek important cheez — two-tailed vs one-tailed. Agar tumhe dono direction ka bias check karna hai (zyada heads ya zyada tails), toh two-tailed test lagega aur p-value ko 2 se multiply karte hain. Lekin agar tumhe sirf ek direction check karni hai (jaise "kya new model behtar hai"), toh one-tailed test kaafi hai.
Ye concept AI-ML mein bahut kaam aata hai, isliye ise dil se samajh lo. Jab bhi tum A/B testing karte ho — jaise purana model 82% accuracy de raha tha aur naya 87% de raha hai — tumhe decide karna padta hai ki ye improvement genuine hai ya bas luck ya noise. Hypothesis testing tumhe ye confidently keh paane ki power deta hai ki "haan, ye result significant hai, sirf randomness nahi." Bina iske tum kisi bhi model improvement ya feature ke bare mein sahi decision nahi le paoge. Basically ye p-value ek bridge hai jo tumhare observed data aur uncertainty ke beech decisions lene mein madad karta hai — aur real-world ML mein har jagah yahi use hota hai.