Inferential Statistics 📊

Sample data se population ke baare mein conclusions nikaalein

1. Population aur Sampling

Population = sare elements ka set. Sample = population ka ek subset. Inferential statistics mein sample se population ke baare mein conclusions nikalte hain.

Parameter: Population ka measure (μ, σ, p) Statistic: Sample ka measure (x̄, s, p̂) Sampling Error: x̄ − μ (sample aur population ka difference)

1.1 Sampling Methods

MethodDescriptionUse Case
Simple RandomHar element equal chanceHomogeneous population
StratifiedGroups/strata se proportionalNon-homogeneous population
SystematicHar kth element choose karoSequential data
ClusterRandom groups choose karoGeographically spread data

2. Confidence Intervals

Population parameter (like μ) ka interval estimate jo confidence level ke saath diya jaata hai.

CI for Mean (known σ): x̄ ± z_(α/2) × (σ/√n) CI for Mean (unknown σ): x̄ ± t_(α/2,n-1) × (s/√n) CI for Proportion: p̂ ± z_(α/2) × √(p̂q̂/n) Common z values: 90% CI → z = 1.645 95% CI → z = 1.96 99% CI → z = 2.576

Udaharan: 95% Confidence Interval

Sample: n=100, x̄=75, σ=10. 95% CI for μ?
Margin of error = z × σ/√n = 1.96 × 10/√100 = 1.96 × 1 = 1.96
CI = (75−1.96, 75+1.96) = (73.04, 76.96)
Matlab: 95% confident hai ki population mean 73.04 aur 76.96 ke beech hai

3. Hypothesis Testing

Statistical claims test karna with evidence from sample data.

H₀ (Null Hypothesis): Koi effect nahi / status quo H₁ (Alternative Hypothesis): Kuch change hai / claim α (Significance Level): Usually 0.05 ya 0.01 p-value: Probability of observed result IF H₀ is true Decision: If p-value < α → Reject H₀

3.1 Types of Errors

H₀ TrueH₀ False
Reject H₀Type I Error (α) ❌Correct ✅
Accept H₀Correct ✅Type II Error (β) ❌

3.2 One-Sample z-Test

Test Statistic: z = (x̄ − μ₀) / (σ/√n) Two-tailed: Reject H₀ if |z| > z_(α/2) = 1.96 (at α=0.05) One-tailed: Reject H₀ if z > 1.645 (right) or z < −1.645 (left)

Udaharan: z-Test

Claim: μ = 500g. Sample: n=36, x̄=492g, σ=24g. Test at α=0.05 (two-tailed).
H₀: μ=500, H₁: μ≠500
z = (492−500)/(24/√36) = −8/4 = −2
|z|=2 > 1.96 → Reject H₀
Conclusion: Significant evidence hai ki μ ≠ 500g

4. Correlation aur Regression

4.1 Pearson Correlation Coefficient

r = Σ[(xᵢ−x̄)(yᵢ−ȳ)] / √[Σ(xᵢ−x̄)² × Σ(yᵢ−ȳ)²] −1 ≤ r ≤ 1 r = +1: Perfect positive correlation r = −1: Perfect negative correlation r = 0: No linear correlation

4.2 Linear Regression — Least Squares

Regression line: ŷ = a + bx Slope: b = Σ[(xᵢ−x̄)(yᵢ−ȳ)] / Σ(xᵢ−x̄)² = [nΣxy − ΣxΣy] / [nΣx² − (Σx)²] Intercept: a = ȳ − b·x̄

Udaharan: Regression

Data: (1,3), (2,5), (3,4), (4,7), (5,9)
n=5, Σx=15, Σy=28, Σx²=55, Σxy=96
b = (5×96 − 15×28)/(5×55 − 15²) = (480−420)/(275−225) = 60/50 = 1.2
a = 28/5 − 1.2×15/5 = 5.6 − 3.6 = 2
Regression line: ŷ = 2 + 1.2x
Predict y at x=6: ŷ = 2 + 1.2×6 = 9.2

🎮 Interactive Lab Kholein →