4.9.19 · D3 · Maths › Probability Theory & Statistics › Confidence intervals — derivation for mean, proportion
Intuition Yeh page kya karti hai
Parent note ne tumhe teen formulas diye. Yeh page unhe har tarah ke situation mein run karti hai jo tum face kar sakte ho — bade samples, chhote samples, known aur unknown spread, proportions jo middle ke paas hain aur edge ke paas hain, one-sided bounds, aur woh traps jo exam set karta hai. Hum forecast karte hain, step by step solve karte hain, aur har answer ko verify bhi karte hain.
Shuru karne se pehle, poori toolkit ki ek reminder ek jagah:
Upar har symbol parent mein define hai — agar koi unfamiliar lage, pehle parent note padho, phir wapas aao.
Har confidence-interval problem is grid ka ek cell hai. Is page ka point yeh hai ki koi bhi cell khaali na rahe .
#
Cell class
Kya khaas hai
Example
1
Mean, σ known, large n
textbook z case
(a)
2
Mean, σ unknown, small n
t use karna zaroori hai, fatter tails
(b)
3
Mean, σ unknown, large n
t ≈ z , dono agree karte hain
(c)
4
One-sided bound
sirf ek tail mein α , α /2 nahi
(d)
5
Proportion, p ^ near 0.5
widest SE, easy
(e)
6
Proportion, p ^ near an edge
small p ^ , validity check karo
(f)
7
Degenerate proportion p ^ = 0
Wald formula break ho jaati hai
(g)
8
Limiting behaviour: n → ∞
interval ek point pe collapse ho jaata hai
(h)
9
Word problem / exam twist
disguise mein sahi recipe choose karo
(i)
Ab hum har cell chalte hain. Confidence level 95% hai jab tak kuch aur nahi kaha, toh z 0.025 = 1.96 .
Ek soda machine ka known fill standard deviation σ = 4 ml hai. n = 64 bottles ka sample average X ˉ = 500 ml hai. True mean fill μ ke liye 95% CI banao.
Forecast: Computing se pehle half-width ka guess karo — kya yeh 1 ml ke karib hoga ya 10 ml ke?
Standard error = n σ = 64 4 = 8 4 = 0.5 ml.
Yeh step kyun? Interval mean ki spread ko bound karta hai, jo σ / n hai — dekho Standard Error — single-bottle spread σ nahi.
Critical value z 0.025 = 1.96 .
Yeh step kyun? σ known hai aur n large hai, toh X ˉ Central Limit Theorem se normal hai; 95% har tail mein 2.5% chhodta hai.
Margin E = 1.96 × 0.5 = 0.98 ml.
Yeh step kyun? Margin = how-sure-number × how-wobbly.
CI = 500 ± 0.98 = [ 499.02 , 500.98 ] ml.
Verify: Units ml hain (sahi). Half-width 0.98 ml chhota hai kyunki n kaafi large hai — forecast "closer to 1 ml" se match karta hai. ✓
Ek rod ki length ke das measurements X ˉ = 25.0 cm aur sample SD s = 0.5 cm dete hain. 95% CI nikalo. (n = 10 .)
Forecast: Kya yeh interval wider hoga ya narrower, agar hum (galat tarike se) z = 1.96 use karte?
t use karo, z nahi. σ unknown hai aur n small hai, toh s extra uncertainty carry karta hai → Student's t-distribution with n − 1 = 9 degrees of freedom.
Yeh step kyun? Ek random s plug karna tails ko mota karta hai; t 9 isko honour karta hai.
Critical value t 0.025 , 9 = 2.262 .
Yeh step kyun? Two-tailed 95% at df = 9 .
Standard error = n s = 10 0.5 = 0.15811 cm.
Margin E = 2.262 × 0.15811 = 0.35765 cm.
CI = 25.0 ± 0.358 = [ 24.642 , 25.358 ] cm.
Verify: Kyunki t 0.025 , 9 = 2.262 > 1.96 , toh t interval naive z wale se wider hai — forecast se match karta hai. Units cm. ✓
n = 400 commute times ka ek survey X ˉ = 34 min, s = 10 min deta hai. 95% CI.
Forecast: Kya answer z = 1.96 use karne se zyada differ karega?
Standard error = 400 10 = 20 10 = 0.5 min.
Critical value t 0.025 , 399 ≈ 1.966 .
Yeh step kyun? Technically σ unknown hai toh t exact hai; lekin df = 399 ke saath yeh almost z = 1.96 hai.
Margin E = 1.966 × 0.5 = 0.983 min.
CI = 34 ± 0.983 = [ 33.017 , 34.983 ] min.
Verify: z = 1.96 use karne par margin 0.98 aata hai — 0.003 min ka fark, practice mein bilkul dikhai nahi deta. Yeh "t → z as n → ∞ " claim ko concrete banata hai. ✓
Ek safety engineer sirf mean impurity ka upper bound chahta hai. Known σ = 2 ppm, n = 25 , X ˉ = 10 ppm. 95% one-sided upper confidence bound do.
Forecast: Critical value 1.96 hona chahiye ya 1.645 ?
Sirf ek tail. Hum chahte hain P ( μ ≤ bound ) = 0.95 , toh poora 5% ek tail mein hai.
Yeh step kyun? One-sided bound α ko split nahi karta; woh halving sirf two-sided band ke liye thi.
Critical value z 0.05 = 1.645 (1.96 nahi).
Standard error = 25 2 = 5 2 = 0.4 ppm.
Upper bound = X ˉ + z 0.05 ⋅ SE = 10 + 1.645 × 0.4 = 10 + 0.658 = 10.658 ppm.
CI = ( − ∞ , 10.658 ] ppm.
Verify: One-sided critical value 1.645 < 1.96 , toh ek one-sided bound apni single side par tighter hai — exactly isliye parent ki "α ko half karna bhoolna" wali galti ulta matter karti hai. Yeh Hypothesis Testing se connect hota hai (ek one-sided test at α = 0.05 ). ✓
Ek poll mein 800 voters mein se 480 approve karte hain. True proportion p ke liye 95% CI.
Forecast: p ^ = 0.5 par SE maximum hota hai. Kya margin lagbhag ± 0.03 hoga?
Point estimate p ^ = 800 480 = 0.6 .
Validity check n p ^ = 800 ( 0.6 ) = 480 ≥ 5 aur n ( 1 − p ^ ) = 800 ( 0.4 ) = 320 ≥ 5 . ✓
Yeh step kyun? Binomial ka normal approximation dono successes aur failures mein kaafi hone chahiye.
Standard error = n p ^ ( 1 − p ^ ) = 800 0.6 × 0.4 = 800 0.24 = 0.017321 .
Margin E = 1.96 × 0.017321 = 0.033949 .
CI = 0.6 ± 0.0339 = [ 0.5661 , 0.6339 ] .
Verify: Figure mein red curve p ^ = 0.5 par peak karti hai jahan p ^ ( 1 − p ^ ) sabse bada hota hai; 0.6 par hum slope se thoda neeche hain, toh margin ≈ 0.034 apne worst-case size ke karib hai — forecast se match karta hai. ✓
Ek defect test mein n = 300 items mein 9 defects milte hain. Defect rate p ke liye 95% CI.
Forecast: Sirf 9 successes ke saath, kya validity rule barely satisfy hoti hai?
Point estimate p ^ = 300 9 = 0.03 .
Validity check n p ^ = 300 ( 0.03 ) = 9 ≥ 5 ✓ aur n ( 1 − p ^ ) = 300 ( 0.97 ) = 291 ≥ 5 ✓ — successes side par barely.
Standard error = 300 0.03 × 0.97 = 300 0.0291 = 0.0098489 .
Margin E = 1.96 × 0.0098489 = 0.019304 .
CI = 0.03 ± 0.0193 = [ 0.0107 , 0.0493 ] .
Verify: Interval [ 0 , 1 ] ke andar rehta hai (accha hai) lekin meaning mein asymmetric hai — edge ke paas Wald interval ka true coverage shaky hota hai; agar successes aur kam hote toh hum cell 7 mein hote. ✓
Ek drug trial mein n = 50 patients mein 0 severe side-effects dikhte hain. p ke liye Wald 95% CI kya hai?
Forecast: Formula width zero dega. Kya yeh believable hai?
Point estimate p ^ = 50 0 = 0 .
Validity check FAILS: n p ^ = 0 < 5 . Normal approximation invalid hai.
Wald margin E = 1.96 50 0 × 1 = 1.96 × 0 = 0 .
Yeh step kyun? Hum ise sirf breakdown expose karne ke liye compute karte hain: formula useless interval [ 0 , 0 ] return karta hai.
Honest fix — "rule of three": n trials mein 0 events ke saath, approximate 95% upper bound hai n 3 = 50 3 = 0.06 , jo [ 0 , 0.06 ] deta hai.
Yeh step kyun? Zero observed ka matlab zero risk nahi hai — matlab hai "small," aur 3/ n standard patch hai.
Verify: Wald width 0 deta hai (bakwaas — Wald ki boundary par failure se link hai). Rule-of-three upper bound 3/50 = 0.06 positive aur sensible hai. ✓
Common mistake "Zero successes matlab
p = 0 pakka hai."
Kyun sahi lagta hai: humne koi events nahi dekhe, toh rate zero hona chahiye.
Fix: 50 mein 0 dekhna kisi bhi p ke saath compatible hai jo lagbhag 0.06 tak ho. Wald formula ki jagah, jo ek fake point pe collapse hoti hai, rule of three (3/ n ) use karo.
σ = 5 fixed aur X ˉ = 100 ke saath, n = 25 , 100 , 400 , 10000 ke liye 95% half-width E = 1.96 σ / n compute karo. lim n → ∞ E kya hai?
Forecast: n ko chaar guna karne par width roughly aadhi honi chahiye. Kyun?
n = 25 : E = 1.96 ⋅ 5 5 = 1.96 .
n = 100 : E = 1.96 ⋅ 10 5 = 0.98 .
n = 400 : E = 1.96 ⋅ 20 5 = 0.49 .
n = 10000 : E = 1.96 ⋅ 100 5 = 0.098 .
Yeh step kyun? E ∝ 1/ n : n ko 4 se multiply karo → n ko 2 se divide karo → E aadha ho jaata hai.
Limit n → ∞ lim n 1.96 ⋅ 5 = 0 .
Verify: 1.96 → 0.98 → 0.49 → 0.098 har drop n mein × 4 par ≈ 2 ka factor hai (aakhri × 25 hai, toh ÷ 5 : 0.49/5 = 0.098 ✓). Interval μ point par collapse ho jaata hai — exactly "infinite data = certainty" intuition, aur Sample Size Determination ka basis. ✓
Worked example Cell 9 (disguised recipe choice)
"Ek quality lab report karta hai ki ek batch ki mean tensile strength X ˉ = 220 MPa hai, sample SD s = 12 MPa n = 9 specimens se, aur poochha jaata hai: kya hum 95% sure hain ki mean 210 MPa se zyada hai? "
Forecast: Kaunsa recipe — z ya t ? One-sided ya two-sided?
Tool choose karo. σ unknown, n = 9 small → t with df = 8 . Sawaal "exceeds 210 " one-sided hai.
Yeh step kyun? Small n + estimated spread t force karta hai; "exceeds" matlab lower bound, ek tail.
Critical value t 0.05 , 8 = 1.860 (one tail at 5% ).
Standard error = 9 12 = 3 12 = 4 MPa.
Lower bound = X ˉ − t 0.05 , 8 ⋅ SE = 220 − 1.860 × 4 = 220 − 7.44 = 212.56 MPa.
Actual sawaal ka jawab: kyunki 95% lower bound 212.56 > 210 hai, haan — hum 95% confident hain ki mean 210 MPa se zyada hai.
Verify: Lower bound 212.56 MPa target 210 se upar hai, toh "exceeds" ka conclusion hold karta hai. Units MPa. Yeh CI ↔ test duality in action hai (Hypothesis Testing ). ✓
Recall Kaunsa cell, kaunsa tool?
Har clue ko uski recipe se match karo.
σ known, big n ::: z , two-sided z α /2
σ unknown, small n ::: t n − 1
"at least / at most / exceeds" ::: one-sided, use karo z α ya t α , n − 1 (halving nahi)
0 successes observed ::: Wald fail; rule of three 3/ n
Narrower interval chahiye ::: n badhao (width ∝ 1/ n )
Mnemonic Poora page ek line mein
Tail count chunno, z-or-t chunno, phir Estimate ± crit × SE — aur hamesha n check karo.