4.9.22 · D1 · HinglishProbability Theory & Statistics

FoundationsLinear regression — least squares, inference on coefficients

2,751 words13 min read↑ Read in English

4.9.22 · D1 · Maths › Probability Theory & Statistics › Linear regression — least squares, inference on coefficients

Parent note padhne se pehle, tumhe har ek squiggle ko apna banana hoga jo woh likhti hai. Neeche, har symbol ko teen cheezein milti hain: seedhe alfaaz, ek picture, aur kyun is topic ko iska zaroorat hai. Yeh is order mein hain ki har ek sirf upar waalon par rely karta hai.


1. Kacche ingredients: paper par dots

Picture: har pair graph paper par pina hua ek single dot hai. neeche se padhein, side se.

Topic ko kyun chahiye: poora kaam "dots ke cloud mein se line dhoondho" hai. Dots nahi, toh fit karne ko kuch nahi.

Picture: socho jaise ek-ek karke dots ke saath chal rahe ho, aur har dot ki value ek running total mein daal rahe ho.

Kyun: topic ka har formula sabhi dots par liya gaya ek total hai — yeh sign sirf hamein "" likhne se bachata hai.

Figure — Linear regression — least squares, inference on coefficients

2. Cloud kahaan baitha hai: means

Picture: dots ka horizontal balance-point hai (heights ignore karo); vertical balance-point hai. Pair centre of mass mark karta hai — woh jagah jahan cloud ek pin par balance hoga.

Kyun: best-fit line ko se guzarna zaroor hai. Pehle centre jaanna baad ke har formula ko simpler banata hai, kyunki hum sab kuch is centre ke relative mein measure karte hain.

Picture: apna graph slide karo taaki centre of mass origin par aa jaaye. Ab har dot ke coordinates uske centred values hain — upper-right mein ek dot ke dono positive hain, lower-left mein dono negative.

Figure — Linear regression — least squares, inference on coefficients

Kyun: in centred values ka sign slope ka engine hai (agla section). Jo dots right-and-high ya left-and-low hain woh line ko upar kheenchenge.


3. Spread aur co-movement: aur

Picture: har dot ke liye centre line se dot ki -position tak ek horizontal stick kheencho; un squared stick lengths ka total hai. Door left/right ke dots ise bada karte hain; beech mein ikatte dots ise chhota karte hain.

Kyun: wide horizontal spread ek lamba lever hai — yeh tumhe line ki tilt ko precisely aim karne deta hai. Yahi quantity baad mein slope ki precision ke neeche baithti hai.

Picture (zaroori): har product ka sign ek kahani batata hai.

Kyun: yeh tally slope ka numerator hai. Yeh Covariance (jo hai) aur Correlation coefficient (jo ise mein rescale karta hai) ka close cousin hai.

Figure — Linear regression — least squares, inference on coefficients

4. Line aur uske parts: , hats, aur residuals

Picture: par khade ho; line height par hai. Ek step daayein chalo; line se upar jaati hai.

Picture: true line invisible hai; hatted line woh hai jo hum actually cloud mein se kheenchte hain.

Picture: dot se neeche (ya upar) fitted line tak vertical segment ki length hai — "miss." same idea hai par invisible true line ke against measure ki gayi.

Figure — Linear regression — least squares, inference on coefficients

5. Woh quantity jo hum minimise karte hain, aur us se nikalna slope formula

Picture: figure s04 ke har residual stick ko ek square mein badlo (side = miss); un saare squares ka total area hai. Behtar aimed line squares ko chhota karti hai, toh girta hai.

Kyun: least squares define hota hai "woh choose karo jo ko jitna possible ho utna chhota kare." Toh target hai — woh cheez hi jisko har derivation neeche dhakelta rehta hai. "Minimise the total squared residuals" aur symbol bilkul ek hi cheez matlab rakhte hain.

Picture: plane ke upar ek bowl-shaped surface hai; minimum bowl ka sabse neecha point hai, jahan har direction mein zameen flat ho.

Dono partials ko zero set karke solve karna estimates ko un pieces ke terms mein pin down karta hai jo hum pehle se bana chuke hain:

Yeh abhi kyun important hai: parent topic in boxed formulas ko calculus se derive karta hai, par tumhe derivation se pehle unme har symbol pehchaan lena chahiye — aur woh ek input configuration () jaanni chahiye jo unhe tod deti hai.


6. Trust language: variance, , standard error, aur

Picture: true line ke around scatter ka mota vertical band bada matlab hai; patla band chhota matlab hai.

Picture: kai repeats se jo bahut saari lines milenge unhe overlay karo; woh ek fan banati hain. Narrow fan = chhota SE = trustworthy slope; wide fan = bada SE.

Kyun: summed squared residuals ( phir se!) ko se divide karna (na ki se) ka unbiased estimate deta hai.

Kyun: kyunki humein usi chhote sample se estimate karna pada, bell curve ke tails mote ho jaate hain — woh moti curve -distribution hai.

Yeh claim ki yeh fit best possible unbiased linear hai Gauss–Markov Theorem se aata hai; ek input se kai tak extend karna Multiple Regression ka kaam hai.


Prerequisite map

Data points x_i y_i

Means x-bar y-bar

Centred values

Sxx spread

Sxy co-movement

S sum of squared residuals

Slope beta1-hat

Fitted line and residuals

Estimate sigma-squared

Standard error

t-statistic and trust

Partial derivatives

Variance idea

Baayein sab kuch line banata hai; daayein sab kuch us line par trust banata hai. Saath mein yeh bilkul wahi do sawaal hain jo parent topic ka jawaab deta hai.


Equipment checklist

Daayein side cover karo aur khud ko test karo.

mein subscript ka kya matlab hai?
Kaun sa dot hai uska name tag — dot 1 ka input hai, dot ka.
tumhe kya karne ka instruction deta hai?
Jo expression baad mein hai use har dot ke liye add karo, pehle se aakhiri tak.
kya hai aur geometrically kya mark karta hai?
Inputs ka average; ke saath mila ke cloud ka centre of mass mark karta hai.
Positive tumhe kya batata hai?
Ki woh dot ek upward-sloping line ke liye vote karta hai (woh centre ke upper-right ya lower-left mein hai).
Alfazon mein, kya hai?
Inputs ka apne mean ke around total squared horizontal spread.
Symbol kya hai aur hum usse kya karte hain?
Sum of squared residuals — ek line ki total badness; least squares ise jitna ho sake chhota karta hai.
Pieces se slope aur intercept formulas likho.
aur .
Agar ho toh kya hota hai, aur yeh kab hota hai?
Slope undefined ho jaata hai (zero se divide); yeh tab hota hai jab saare equal hoon, toh koi horizontal spread nahi hoti tilt fix karne ke liye.
aur mein fark?
Nature ka sach-mein-sach anjaan slope hai; data se hamara estimate hai (hat = "estimated").
kya hai?
Woh specific slope value jo hum test karne ke liye choose karte hain (hypothesised value), usually 0 matlab "koi relationship nahi."
Error aur residual mein fark?
invisible true noise hai; dot se hamare fitted line tak dikhne wala gap hai.
kya measure karta hai?
Har noise term ka true line ke around variance (typical squared wobble).
Ek sentence mein, standard error kya hai?
Agar hum experiment fresh noise ke saath dobara karein toh hamara estimated slope typically kitna jump karega.
ki jagah se kyun divide karte hain?
Do coefficients estimate karne se do constraints free residuals (degrees of freedom) chhodte hain; yeh ko unbiased banata hai.
-statistic kya count karta hai?
Estimated slope tested value se kitne standard errors door baitha hai.
Partial derivative kyun aata hai?
Do-variable error bowl ka bottom dhoondne ke liye, aur mein alag-alag zero slope demand karke.