1. Introduction to Data Analytics
Lecture: Inferential Statistics –Confidence Intervals
NPTEL MOOC
By
Prof. Nandan Sudarsanam, DoMS, IIT-M and
Prof. B. Ravindran, CS&E, IIT-M
2. Introduction
• Statistical Inference is of two types: a) Hypothesis testing and
b)Estimation
• Estimation is point and interval (but we are mainly talking about interval)
• Difference in terms of the explicit hypothesis
• It is the same underlying math. when H0:𝜇0 = 4.8 ;
• Different ways of conceptualizing:
• If we were to repeatedly take identical samples (same size) and build similar
CI bounds for each sample then 95% of such CI bounds will cover the true
mean.
• We are 95% confident/certain that the true mean is within our confidence
Interval.
z=
𝑥−𝜇
(𝜎
𝑛
)
𝑥 ± 𝑧𝛼
𝜎
𝑛
3. Examples and formulas
Single Sample Tests What are you testing Example
z-test mean Phosphate in blood
t-test mean Phosphate in blood
Chi-Square test standard deviation Equal treatment
Proportion z-test proportion/likelihood Defective products
𝑡 =
𝑥−𝜇
(𝑠
𝑛
)
; df = n-1
z=
𝑥−𝜇
(𝜎
𝑛
)
χ2=(𝑛 − 1)
𝑠2
𝜎0
2; df = n-1
𝑧 =
𝑝 − 𝑝0
𝑝(1 − 𝑝)
𝑛
𝑥 ± 𝑧𝛼
𝜎
𝑛
𝑥 ± 𝑡𝛼,𝑛−1
𝜎
𝑛
𝑝 ± 𝑧𝛼
𝑝(1 − 𝑝)
𝑛
4. Examples and Formulas
Two Sample
Tests
What are you
testing Example
z-test mean Calcium and placebo
t-test mean Call centre
Paired t-test mean Before-after, Left-right
Proportion z-test
proportion/likeli
hood Defective products
F-test
Standard
deviation Manufacturing process
z=
(𝑥1−𝑥2)−𝑑0
𝜎1
2
𝑛1
+
𝜎2
2
𝑛2
𝐹 =
𝑠1
2
𝑠2
2 ; df= 𝑛1−1; 𝑛2 − 1
(𝑥1 − 𝑥2) ± 𝑧𝛼
𝜎1
2
𝑛1
+
𝜎2
2
𝑛2