0% found this document useful (0 votes)
3 views50 pages

Unit4 Sampling Estimation

Unit 4 covers Sampling Distributions, Descriptive Statistics, and Estimation, focusing on key concepts such as the Central Limit Theorem, methods of estimation, and confidence intervals. It explains the importance of sampling distributions and descriptive statistics in data analysis, including graphical representations and numerical summaries. The document also discusses various statistical measures and their applications in understanding data distributions.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views50 pages

Unit4 Sampling Estimation

Unit 4 covers Sampling Distributions, Descriptive Statistics, and Estimation, focusing on key concepts such as the Central Limit Theorem, methods of estimation, and confidence intervals. It explains the importance of sampling distributions and descriptive statistics in data analysis, including graphical representations and numerical summaries. The document also discusses various statistical measures and their applications in understanding data distributions.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Unit 4: Sampling Distributions,

Descriptive Statistics, and Estimation

Dr. Yeshwant Singh

[Link]@[Link]

Department of CSE, DTU

Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [1 / 50]
Unit 4: Overview

The Central Limit Theorem

Descriptive Statistics

Estimation Methods

Confidence Intervals

Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [2 / 50]
Section 1
The Central Limit Theorem

Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [3 / 50]
Sampling and Sampling Distributions

Random Sample
A random sample of size n from a population with distribution
F is a collection of n independent and identically distributed
(i.i.d.) random variables X1 , X2 , . . . , Xn , each with distribution
F.

Key Concepts:
• Population: The entire collection of interest
• Sample: A subset drawn from the population
• Statistic: A function of the sample, e.g., X̄ = n1 ni=1 Xi
P

• Sampling distribution: The probability distribution of a


statistic
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [4 / 50]
The Sample Mean and Its Distribution

Definition: The sample mean of X1 , . . . , Xn i.i.d. with mean


µ and variance σ 2 :
n
1X
X̄ = Xi
n i=1
Properties:
• E [X̄ ] = µ (unbiased for the population mean)
2
• Var(X̄ ) = σn (decreases with sample size)
σ
• SD(X̄ ) = √n (standard error)

Key Insight: As n increases, X̄ becomes more tightly


concentrated around µ.

Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [5 / 50]
Law of Large Numbers
Weak Law of Large Numbers (WLLN)
If X1 , X2 , . . . are i.i.d. with mean µ, then for any ϵ > 0:

lim P |X̄n − µ| > ϵ = 0
n→∞

Strong Law of Large Numbers (SLLN)


 
P lim X̄n = µ = 1
n→∞
Interpretation:
• Sample averages converge to the population mean
• Foundation for frequency interpretation of probability
• Does not specify the distribution of X̄n — that is the role of
the CLT
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [6 / 50]
The Central Limit Theorem: Statement
Central Limit Theorem (CLT)
Let X1 , X2 , . . . , Xn be i.i.d. random variables with E [Xi ] = µ
and Var(Xi ) = σ 2 < ∞. Then as n → ∞:

X̄n − µ d
Zn = √ → − N (0, 1)
σ/ n

Equivalently:
σ2
 
approx
X̄n ∼ N µ, for large n
n

Remarkable: The result holds regardless of the original


distribution of the Xi ’s!
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [7 / 50]
CLT: Visual Intuition

Effect of increasing n on the distribution of X̄ :

f (z)

n = 30
n=5
n=1

z
µ

As n increases: distribution becomes more bell-shaped and


concentrated around µ.

Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [8 / 50]
Importance and Implications of the CLT
Why is the CLT so important?
1 Universality: Applies to sums/averages from any
distribution (with finite variance)
2 Approximation: Justifies using normal distribution for
sample means
3 Inference: Foundation for confidence intervals and
hypothesis tests
4 Practical rule: n ≥ 30 is often sufficient for a good
approximation
Applications:
• Quality control and manufacturing
• Polling and survey sampling
• Financial risk modeling
• Error analysis in experiments
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [9 / 50]
CLT: Worked Example
Problem: A factory produces bolts with mean length µ = 5
cm, σ = 0.2 cm. A sample of n = 64 bolts is taken. Find
P(X̄ > 5.05).
approx
Solution: By CLT, X̄ ∼ N (5, 0.22 /64)
X̄ − 5 X̄ − 5
√ =
Z=
0.2/ 64 0.025
 
5.05 − 5
P(X̄ > 5.05) = P Z > = P(Z > 2)
0.025

= 1 − Φ(2) ≈ 1 − 0.9772 = 0.0228

Interpretation: Only about 2.28% chance the sample mean


exceeds 5.05 cm.
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [10 / 50]
CLT for Sums
Pn
The CLT also applies to sums. Let Sn = i=1 Xi :
Sn − nµ d
√ →
− N (0, 1)
σ n
Example: Total weight of 100 packages, each with mean 10
kg, σ = 1 kg.
approx
S100 ∼ N (1000, 100)

 
1020 − 1000
P(S100 > 1020) = P Z > = P(Z > 2) ≈ 0.0228
10
Normal Approximation to Binomial:
If X ∼ Bin(n, p), then for large n:
X − np approx
p ∼ N (0, 1)
np(1 − p)
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [11 / 50]
Important Sampling Distributions
Chi-Squared Distribution:
If Z1 , . . . , Zk are i.i.d. N (0, 1), then:
k
X
χ2k = Zi2 ∼ χ2 (k), E [χ2k ] = k, Var(χ2k ) = 2k
i=1
Student’s t-Distribution:
If Z ∼ N (0, 1) and V ∼ χ2 (k) are independent:
Z
T =p ∼ t(k)
V /k
F -Distribution:
If U ∼ χ2 (m) and V ∼ χ2 (n) are independent:
U/m
F = ∼ F (m, n)
V /n
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [12 / 50]
Sampling from a Normal Population
i.i.d.
Theorem: Let X1 , . . . , Xn ∼ N (µ, σ 2 ). Define:
n n
1X 1 X
X̄ = Xi , S2 = (Xi − X̄ )2
n i=1 n − 1 i=1

Then:  
σ2
1 X̄ ∼ N µ,
n
(n−1)S 2
2
σ2
∼ χ2 (n − 1)
3 X̄ and S 2 are independent
X̄ −µ
4 √
S/ n
∼ t(n − 1) (when σ is unknown)

Key Point: Result (4) is the basis for t-intervals and t-tests.
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [13 / 50]
Section 2
Descriptive Statistics

Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [14 / 50]
What are Descriptive Statistics?
Definition
Descriptive statistics are methods for summarizing and
presenting data in a meaningful way using numerical measures
and graphical displays.

Two Main Aspects:


1 Graphical Representation: Visualizing data distributions

2 Numerical Summaries: Measures of location and


variability

Purpose:
• Understand the shape and spread of data
• Identify patterns, outliers, and anomalies
• Communicate key features of the dataset concisely
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [15 / 50]
Graphical Representation: Histogram
Histogram: Divides data range into bins and counts
frequencies.
Frequency

Key Features:
• Shows the shape of the distribution (symmetric, skewed,
bimodal)
• Bin width choice affects appearance — too few or too many
bins can obscure patterns
• Area of bars ∝ frequency (or relative frequency)
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [16 / 50]
Graphical Representation: Box Plot

Box Plot (Box-and-Whisker Plot): Summarizes data using


five-number summary.

IQR

Min Q1 Median Q3 Max

Five-Number Summary: Minimum, Q1 , Median, Q3 , Maximum


IQR = Q3 − Q1 ; Outliers: points beyond Q1 − 1.5 · IQR or
Q3 + 1.5 · IQR

Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [17 / 50]
Other Graphical Methods
Stem-and-Leaf Plot:
• Retains original data values while showing distribution
shape
• Each data point split into a “stem” (leading digits) and
“leaf” (trailing digit)
Scatter Plot:
• Displays relationship between two variables
• Reveals correlation, clusters, and outliers
Pie Chart and Bar Chart:
• Pie chart: Proportions of categorical data
• Bar chart: Frequencies or values across categories
Ogive (Cumulative Frequency Curve):
• Plots cumulative frequencies; useful for finding percentiles
and median
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [18 / 50]
Measures of Location: Mean
Sample Mean:
n
1X
x̄ = xi
n i=1

Properties:
• Sum of deviations from the mean is zero: (xi − x̄) = 0
P

• Minimizes the sum of squared deviations: minc (xi − c)2


P

• Sensitive to outliers (not a robust measure)

Example: Data: 2, 4, 4, 4, 5, 5, 7, 9
2+4+4+4+5+5+7+9 40
x̄ = = =5
8 8

Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [19 / 50]
Measures of Location: Median and Mode

Median: The middle value when data is sorted.


• If n is odd: median = x(n+1)/2
• If n is even: median = xn/2 +x2 n/2+1
• Robust to outliers — preferable for skewed data

Mode: The most frequently occurring value.


• Can be used for categorical data
• A distribution can be unimodal, bimodal, or multimodal

Example: Data: 2, 4, 4, 4, 5, 5, 7, 9
• Median = 4+5
2
= 4.5
• Mode = 4 (appears 3 times)

Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [20 / 50]
Percentiles and Quartiles
p-th Percentile (Pp ): Value below which p% of data falls.
Important Percentiles:
• Q1 = P25 : First quartile (25th percentile)
• Q2 = P50 : Median (50th percentile)
• Q3 = P75 : Third quartile (75th percentile)

Interquartile Range (IQR):

IQR = Q3 − Q1

Interpretation:
• Contains the middle 50% of the data
• Robust measure of spread
• Used for outlier detection in box plots
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [21 / 50]
Measures of Variability: Variance and Standard
Deviation
Sample Variance:
n
2 1 X
s = (xi − x̄)2
n − 1 i=1
Sample Standard Deviation:

s= s2
Why divide by n − 1?
• Bessel’s correction: Makes s 2 an unbiased estimator of σ 2
• E [S 2 ] = σ 2 (with n − 1 in denominator)
• Dividing by n would systematically underestimate σ 2
Example: Data: 2, 4, 4, 4, 5, 5, 7, 9 (x̄ = 5)
(2 − 5)2 + 3(4 − 5)2 + 2(5 − 5)2 + (7 − 5)2 + (9 − 5)2 32
s2 = = ≈ 4.5
7 4: Sampling Distributions, Descriptive Statistics, and 7Estimation
Dr. Yeshwant Singh ([Link]@[Link]) Unit
Department of CSE, DTU 19, Feb, 2026 [22 / 50]
Other Measures of Variability
Range:
R = xmax − xmin

• Simplest measure but highly sensitive to outliers

Coefficient of Variation (CV):


s
CV = × 100%

• Dimensionless measure of relative variability


• Useful for comparing variability across different scales

Mean Absolute Deviation (MAD):


n
1X
MAD = |xi − x̄|
n i=1
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [23 / 50]
Shape Measures: Skewness and Kurtosis
Sample Skewness:
1
Pn
n i=1 (xi − x̄)3
g1 =
s3

• g1 = 0: Symmetric; g1 > 0: Right-skewed; g1 < 0:


Left-skewed
Sample Kurtosis:
1
Pn
(xi − x̄)4
g2 = n i=1 4
s

• Normal distribution: g2 = 3 (mesokurtic)


• g2 > 3: Heavy tails (leptokurtic)
• g2 < 3: Light tails (platykurtic)
• Excess kurtosis = g2 − 3
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [24 / 50]
Section 3
Estimation Methods

Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [25 / 50]
Point Estimation: Introduction
Problem
Given a random sample X1 , . . . , Xn from a distribution with
unknown parameter θ, find a good estimate θ̂ of θ.

Terminology:
• Parameter: Unknown quantity of interest (θ)
• Estimator: A function of the data, θ̂ = g (X1 , . . . , Xn )
(random variable)
• Estimate: The realized value of the estimator for
observed data

Examples:
• Estimating population mean µ using µ̂ = X̄
• Estimating population variance σ 2 using σ̂ 2 = S 2
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [26 / 50]
Properties of Estimators: Unbiasedness
Unbiasedness
An estimator θ̂ is unbiased for θ if:

E [θ̂] = θ for all θ

Bias: Bias(θ̂) = E [θ̂] − θ


Examples:
• X̄ is unbiased for µ: E [X̄ ] = µ ✓
• S 2 = n−11
(Xi − X̄ )2 is unbiased for σ 2 ✓
P

• σ̂ 2 = n1 (Xi − X̄ )2 is biased: E [σ̂ 2 ] = n−1 σ 2 ̸= σ 2 ×


P
n

Note: Unbiasedness alone is not sufficient — we also need low


variance.
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [27 / 50]
Properties of Estimators: Consistency
Consistency
An estimator θ̂n is consistent for θ if:
P
θ̂n −
→θ as n → ∞

i.e., for every ϵ > 0: limn→∞ P(|θ̂n − θ| > ϵ) = 0

Sufficient Condition: If Bias(θ̂n ) → 0 and Var(θ̂n ) → 0 as


n → ∞, then θ̂n is consistent.
Examples:
• X̄ is consistent for µ: Var(X̄ ) = σ 2 /n → 0
• S 2 is consistent for σ 2
• Even the biased estimator n1 (Xi − X̄ )2 is consistent for
P
σ2
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [28 / 50]
Mean Squared Error (MSE)
Definition:
MSE(θ̂) = E [(θ̂ − θ)2 ]
Bias-Variance Decomposition:

MSE(θ̂) = Var(θ̂) + [Bias(θ̂)]2


Interpretation:
• MSE captures both accuracy (bias) and precision
(variance)
• An unbiased estimator has MSE = Variance
• Sometimes a slightly biased estimator with lower variance
gives smaller MSE
Efficiency: Among unbiased estimators, the one with the
smallest variance is called the minimum variance unbiased
estimator (MVUE).
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [29 / 50]
Method of Moments (MoM)
Idea
Equate population moments to sample moments and solve for
the unknown parameters.

Population moments: µ′k =PE [X k ]


Sample moments: mk = n1 ni=1 Xik
Procedure:
1 If there are p unknown parameters, set up p equations:

mk = µ′k (θ1 , . . . , θp ), k = 1, 2, . . . , p

2 Solve the system for θ̂1 , . . . , θ̂p


Advantages: Simple, always yields a solution
Disadvantages: May not be the most efficient estimator
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [30 / 50]
Method of Moments: Examples
Example 1: Normal Distribution N (µ, σ 2 )
Two parameters ⇒ use first two moments:

m1 = µ′1 =⇒ X̄ = µ =⇒ µ̂ = X̄
1X 2
m2 = µ′2 =⇒ Xi = σ 2 + µ2
n
1X 2 1X
σ̂ 2 = Xi − X̄ 2 = (Xi − X̄ )2
n n

Example 2: Exponential(λ)
One parameter ⇒ first moment:
1 1
m1 = µ′1 =⇒ X̄ = =⇒ λ̂MoM =
λ X̄
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [31 / 50]
Maximum Likelihood Estimation (MLE): Concept
Principle
Choose the parameter value that makes the observed data
most probable.
Likelihood Function:
n
Y
L(θ) = L(θ | x1 , . . . , xn ) = f (xi ; θ)
i=1
Log-Likelihood: (easier to work with)
n
X
ℓ(θ) = ln L(θ) = ln f (xi ; θ)
i=1
MLE:
θ̂MLE = arg max ℓ(θ)
θ
dℓ
Typically found by solving dθ
= 0 (score equation).
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [32 / 50]
MLE: Step-by-Step Procedure

Steps to find the MLE:


1 Write the likelihood function L(θ)

2 Take the log to get the log-likelihood ℓ(θ)


dℓ
3 Differentiate: =0

4 Solve for θ̂
d 2ℓ
5 Verify it is a maximum: dθ2
<0
θ̂

For multiple parameters θ = (θ1 , . . . , θp ):


∂ℓ
• Solve the system: ∂θ
j
= 0, j = 1, . . . , p
• Check that the Hessian matrix is negative definite at the
solution
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [33 / 50]
MLE: Example — Normal Distribution
i.i.d.
Data: X1 , . . . , Xn ∼ N (µ, σ 2 )
Log-Likelihood:
n
2n n 2 1 X
ℓ(µ, σ ) = − ln(2π) − ln(σ ) − 2 (xi − µ)2
2 2 2σ i=1
Taking partial derivatives and setting to zero:
∂ℓ
= 0 =⇒ µ̂MLE = X̄
∂µ
n
∂ℓ 2 1X
= 0 =⇒ σ̂MLE = (Xi − X̄ )2
∂σ 2 n i=1

2
Note: σ̂MLE divides by n (biased!), but is consistent and
asymptotically efficient.
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [34 / 50]
MLE: Example — Exponential Distribution
i.i.d.
Data: X1 , . . . , Xn ∼ Exp(λ), f (x; λ) = λe −λx , x ≥ 0
Log-Likelihood:
n
X n
X
ℓ(λ) = ln(λe −λxi ) = n ln λ − λ xi
i=1 i=1
Differentiate and solve:
n
dℓ n X
= − xi = 0
dλ λ i=1
n 1
λ̂MLE = Pn =
i=1 xi X̄
d 2ℓ
Verify: dλ2
= − λn2 < 0 ✓ (maximum confirmed)
Observation: MoM and MLE give the same estimator here!
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [35 / 50]
Properties of Maximum Likelihood Estimators
Key Properties:
P
1 Consistency: θ̂MLE −→ θ as n → ∞
2 Asymptotic normality:


 
d 1
n(θ̂MLE − θ) →
− N 0,
I (θ)
where I (θ) is the Fisher information
3 Asymptotic efficiency: Achieves the Cramér–Rao lower
bound
4 Invariance: If θ̂ is the MLE of θ, then g (θ̂) is the MLE of
g (θ)
Fisher Information:
"  #
 2  2
∂ ℓ ∂ℓ
I (θ) = −E = E
∂θ2 ∂θ
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [36 / 50]
Method of Moments vs. Maximum Likelihood
Estimators

MoM MLE
Simple to compute May require optimization
Always yields solution May not have closed form
Generally consistent Consistent
May be inefficient Asymptotically efficient
No invariance property Invariance property
Not necessarily unique Unique under regularity conditions
In practice:
• MLE is generally preferred for its superior theoretical
properties
• MoM is useful as a starting point or when MLE is
computationally difficult
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [37 / 50]
Section 4
Confidence Intervals

Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [38 / 50]
Confidence Intervals: Introduction
Idea
A confidence interval (CI) provides a range of plausible values
for a parameter, rather than a single point estimate.

Definition: A 100(1 − α)% confidence interval for θ is an


interval (L, U) such that:

P(L ≤ θ ≤ U) = 1 − α

Interpretation:
• If we repeat the experiment many times and compute a
CI each time, then 100(1 − α)% of those intervals will
contain the true θ
• Common choices: α = 0.05 (95% CI), α = 0.01 (99% CI)
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [39 / 50]
CI for a Mean: σ Known
Setup: X1 , . . . , Xn i.i.d. with mean µ (unknown), variance σ 2
(known).
X̄ −µ
√ ∼ N (0, 1) (exactly, if population is normal;
By CLT: Z = σ/ n
approximately, for large n).
100(1 − α)% Confidence Interval:

σ
X̄ ± zα/2 · √
n

where zα/2 is the upper α/2 quantile of N (0, 1).


Important values:
• 90% CI: z0.05 = 1.645
• 95% CI: z0.025 = 1.96
• 99% CI: z0.005 = 2.576
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [40 / 50]
CI for a Mean: σ Unknown
Setup: σ 2 unknown ⇒ replace σ with sample standard
deviation S.
The pivotal quantity:
X̄ − µ
T = √ ∼ t(n − 1)
S/ n
100(1 − α)% Confidence Interval:
S
X̄ ± tα/2, n−1 · √
n
Key Points:
• Uses t-distribution with n − 1 degrees of freedom
• t-interval is wider than z-interval (accounts for additional
uncertainty)
• As n → ∞, t(n − 1) → N (0, 1)
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [41 / 50]
CI for a Mean: Worked Example

Problem: A sample of n = 25 batteries has x̄ = 48.5 months


and s = 4.2 months. Construct a 95% CI for the mean battery
life.
Solution: σ unknown, use t-interval. t0.025,24 = 2.064
4.2
48.5 ± 2.064 × √ = 48.5 ± 2.064 × 0.84
25
= 48.5 ± 1.734

95% CI: (46.77, 50.23) months


Interpretation: We are 95% confident that the true mean
battery life is between 46.77 and 50.23 months.
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [42 / 50]
CI for a Variance
i.i.d.
Setup: X1 , . . . , Xn ∼ N (µ, σ 2 )
The pivotal quantity:
(n − 1)S 2
∼ χ2 (n − 1)
σ2
100(1 − α)% CI for σ 2 :
!
(n − 1)S 2 (n − 1)S 2
, 2
χ2α/2,n−1 χ1−α/2,n−1

Notes:
• The χ2 distribution is not symmetric, so the CI is not
symmetric around S 2
• Requires normality assumption (more sensitive than mean CI)
• CI for σ: take square roots of the endpoints
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [43 / 50]
Two-Sample CI: Difference of Means
Setup: Independent samples from two populations:
• Sample 1: n1 observations, X̄1 , S12
• Sample 2: n2 observations, X̄2 , S22

Case 1: Variances known


s
σ12 σ22
(X̄1 − X̄2 ) ± zα/2 +
n1 n2

Case 2: Variances unknown but equal (σ12 = σ22 = σ 2 )


(n −1)S12 +(n2 −1)S22
Pooled variance: Sp2 = 1 n1 +n 2 −2
r
1 1
(X̄1 − X̄2 ) ± tα/2, n1 +n2 −2 · Sp +
n1 n2
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [44 / 50]
Two-Sample CI: Unequal Variances (Welch)
Case 3: Variances unknown and unequal
s
S12 S22
(X̄1 − X̄2 ) ± tα/2, ν +
n1 n2
Welch–Satterthwaite degrees of freedom:
 2 2
S1 S22
n1
+ n2
ν = (S 2 /n )2 (S 2 /n )2
1
1
n1 −1
+ n22 −12
Note:
• ν is generally not an integer; round down to the nearest
integer
• More conservative (wider CI) than the pooled case
• The Welch approach is recommended by default when
equal variances cannot be assumed
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [45 / 50]
CI for a Proportion
Setup: X ∼ Bin(n, p), sample proportion p̂ = X /n.
By CLT for large n:
p̂ − p approx
Z=p ∼ N (0, 1)
p(1 − p)/n

Wald (Standard) 100(1 − α)% CI:


r
p̂(1 − p̂)
p̂ ± zα/2
n

Rule of thumb: Valid when np̂ ≥ 5 and n(1 − p̂) ≥ 5.


Example: In a poll of n = 400, p̂ = 0.55.
95% CI: q
0.55 ± 1.96 0.55×0.45
400
= 0.55 ± 0.049 = (0.501, 0.599)
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [46 / 50]
Two-Sample CI: Difference of Proportions
Setup: Independent samples from two populations:
• Sample 1: n1 trials, p̂1 = X1 /n1
• Sample 2: n2 trials, p̂2 = X2 /n2
100(1 − α)% CI for p1 − p2 :
s
p̂1 (1 − p̂1 ) p̂2 (1 − p̂2 )
(p̂1 − p̂2 ) ± zα/2 +
n1 n2

Example: Drug trial: p̂1 = 120/200 = 0.60,


p̂2 = 90/200 = 0.45
r
0.60 × 0.40 0.45 × 0.55
0.15 ± 1.96 + = 0.15 ± 0.096
200 200
95% CI: (0.054, 0.246) — the difference is significant (does
not contain 0).
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [47 / 50]
Sample Size Determination
How large a sample do we need?
For estimating a mean with margin of error E :
zα/2 · σ 2
 
n=
E
For estimating a proportion with margin of error E :
& 2 '
zα/2 · p̂(1 − p̂)
n=
E2
If no prior estimate of p is available, use p̂ = 0.5 (maximizes
sample size).
Example: 95% CI for p with margin of error E = 0.03:
1.962 × 0.25 0.9604
n= 2
= ≈ 1068
0.03 0.0009
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [48 / 50]
Confidence Intervals: Summary
Parameter CI Formula

µ (σ known) X̄ ± zα/2 · σ/ n

µ (σ unknown) X̄ ± tα/2,n−1 · S/ n
 
(n−1)S 2 (n−1)S 2
σ 2 (normal) χ2
, χ2
α/2 1−α/2

µ1 − µ 2 (X̄1 − X̄2 ) ± tα/2 · SE


p
p p̂ ± zα/2 p̂(1 − p̂)/n
p1 − p2 (p̂1 − p̂2 ) ± zα/2 · SE
Width of CI depends on:
• Confidence level (1 − α): higher ⇒ wider
• Sample size (n): larger ⇒ narrower
• Variability (σ or S): larger ⇒ wider
Dr. Yeshwant Singh ([Link]@[Link]) Unit 4: Sampling Distributions, Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [49 / 50]
Summary: Unit 4
Central Limit Theorem:
approx
• X̄ ∼ N (µ, σ 2 /n) for large n, regardless of population
• Foundation for inference; related sampling distributions (χ2 ,
t, F )
Descriptive Statistics:
• Graphical tools: histograms, box plots, scatter plots
• Location: mean, median, mode, percentiles
• Variability: variance, SD, range, IQR, CV
Estimation:
• Properties: unbiasedness, consistency, MSE
• Methods: Method of Moments and Maximum Likelihood
Estimation
Confidence Intervals:
• One-sample (mean, variance, proportion) and two-sample
problems
• Yeshwant
Dr. Sample size
Singh determinationUnit
([Link]@[Link]) for4: Sampling
desiredDistributions,
precision Descriptive Statistics, and Estimation
Department of CSE, DTU 19, Feb, 2026 [50 / 50]

You might also like