1.3.21 · D3 · HinglishProbability & Statistics

Worked examplesConfidence intervals

3,870 words18 min read↑ Read in English

1.3.21 · D3 · AI-ML › Probability & Statistics › Confidence intervals

Yeh Confidence intervals ka ek worked-examples deep dive hai. Parent note ne formulas build kiye the; yahaan hum unhe har tarah ke inputs ke khilaf hammer karte hain jo ek confidence-interval problem mein aa sakti hain — bade samples, chhote samples, proportions, proportions ka difference, means ka difference, one-sided questions, aur woh degenerate edges jahan formula almost break karta hai.

Figure s01 (pehle yeh padhein): black curve sampling distribution of the mean hai; red bar woh confidence-interval "net" hai jiska half-width hai, jo observed (black dot) ke around throw kiya gaya hai. True (black cross) fixed hai — net woh hai jo sample se sample tak move karta hai. Neeche ka har example bas is red bar ko resize karta hai.


Scenario matrix

Kuch bhi work karne se pehle, aao har case class enumerate karte hain jo ek CI problem mein ho sakti hai. Ek dense grid ki jagah, neeche ka decision tree padhein — usme wahi content visual-first form mein hai, aur har leaf us example ka naam bataati hai jo use fill karta hai.

Figure s02 (is poore page ka map): apne case par land karne ke liye arrows follow karein. Red leaf ("small ⇒ use ") woh hai jise beginners aksar galat karte hain. Har leaf apne example number ke saath tagged hai.

What are you estimating?

a mean

a proportion

a difference

sigma known

Cell A - use z - Ex 1

sigma unknown

n at least 30

Cell B - use z - Ex 2

n under 30

Cell C - use t - Ex 3

normal ok

Cell D - binomial SE - Ex 4

extreme or tiny n

Cell D-edge - Wilson - Ex 4b

two proportions

Cell E - add variances - Ex 5

two means

Cell E2 - add variances - Ex 5b

only a lower bound

Cell F - all alpha one tail - Ex 6

n equals 1 or zero spread

Cell G - degenerate - Ex 7

choose n first

Cell H - invert - Ex 8

raise confidence

Cell I - scaling - Ex 9

Har cell ke liye dials:

  • Confidence dial: (95%), (99%), (90% two-sided ya 95% one-sided).
  • Spread dial: agar known ho, warna (sample std, Confidence intervals wala ke saath).
  • Shrink dial: .

Worked Examples

Cell A — mean, σ known

Cell B — mean, σ unknown, large n

Cell C — mean, σ unknown, small n

Figure s03 (kyun small ko chahiye): black curve standard normal hai; red curve ke saath -distribution hai. Red curve ki fatter tails notice karein — isliye uska 90% cutoff (red dashed, 2.132 par) normal ke cutoff (black dashed, 1.96 par) se aage baithta hai. Fatter tails = wider net = tiny samples ke liye honest extra caution. Yeh Example 3, Step 4 ke peeche ki picture hai.

Cell D — ek proportion

Cell E — do proportions ka difference

Cell E2 — do means ka difference

Cell F — one-sided bound

Cell G — degenerate inputs

Cell H — sample-size planning

Cell I — exam twist: confidence badhao


Recall

Recall Kaun sa cell: 400 latency samples, σ unknown?

Cell B — σ unknown lekin , isliye aur hum use karte hain. ::: use karo kyunki large banata hai.

Recall Do 95% CIs overlap karte hain. Kya estimates significantly different hain?

Not necessarily — overlap ek weak test hai. Difference ka CI compute karo (Ex 5). ::: Agar woh interval 0 exclude karta hai, toh woh significantly differ karte hain.

Recall Aapki test accuracy 10-for-10 hai. [1.0, 1.0] kyun report nahi karte?

Kyunki normal banata hai, jo ek artifact hai. Wilson interval use karo, roughly deta hai. ::: Extreme proportions normal approximation tod dete hain.

Recall Margin of error half karne ke liye,

ko ___ se multiply karo? 4 — kyunki , isliye precision improvement factor ka square khareedti hai.