Professional Documents
Culture Documents
Chap 5
Chap 5
CONFIDENCE INTERVAL
Reference
Book [1] Chapter 8, pp.382 - 424.
Book [2] Chapter 11
Book [4] Chapter 8
September 5, 2023 1 / 21
5.1. Concepts
Confidence width
w = UL LL
September 5, 2023 2 / 21
5.2. C.I. for mean of normal populations - known
1-
·
e
ums ! -
or ✓ ◆
P X z↵/2 p
n
< µ < X + z↵/2 p
n
=1 ↵ I
✓ ◆
Remark that (LL, UL), which is X z↵/2 p , X + z↵/2 p , is a
n n
random interval
September 5, 2023 3 / 21
C.I.
Observing X1 = x1 , X2 = x2 , . . . , Xn = xn
Two-sided C.I.
The (1 ↵)% two-sided confidence interval for µ is
✓ ◆
x z↵/2 p , x + z↵/2 p ,
n n
✓ ◆
or we can write x z↵/2 p < µ < x + z↵/2 p with N
95% confidence
n n
One-sided C.I.
The (1 ✓↵)%Might
fight tail (lower
◆ bounded)
✓ and left tail
◆ (upper bounded)
C.I.s are x z↵ p , 1 and 1, x + z↵ p , respectively
n n
September 5, 2023 4 / 21
Interpretation of a Confidence Level
phair.
✓
It is incorrect to write P x ·e
z↵/2 p < µ < x + z↵/2 p
n n
◆
=1 ↵
!
P(A) = 1 ↵
In the long run, (1 ↵)% of our computed C.I.s will contain µ
*
Armutat x4=
&4 z4
C
e -
-
w =
4L -L = 2 .
2 x
/ I
&
a
=>
WT- Dwe want to vicreare
the confidence in terval
21 -
2) +feen the accuration (measured by us must
September 5, 2023 5 / 21
Confidence Level, Precision, and Sample Size
September 5, 2023 6 / 21
Example
Example 5.1
Weight of product (g) is normally distributed with variance of 25g2 .
Random survey 16 products then total weight is 800g.
(a) Find the 95% two-sided C.I. for the mean -> 1 x
-
= 0 98
.
+
2 =
0 . 85
(b) Find the 90% lower bounded C.I. for the mean
(c) To reduce C.I. width to 3g, confidence level 95%, how many product
-
should be survey?
(d) Total weight of 24 other products is 1248g. Find 95% C.I. for the
mean
September 5, 2023 7 / 21
C.I: Random or Non-random
Which is correct?
✓ ◆
s
P X z↵/2 p < µ < X + z↵/2 p =1 ↵
n n
✓ ◆
P X 1.96 p < µ < X + 1.96 p = 0.95 W
n n
✓ ◆ W
5 5
P X 1.96 · < µ < X + 1.96 · = 0.95
4 4
✓ ◆
5 5
P 50 1.96 · < µ < 50 + 1.96 · = 0.95 ↓
4 4
P(50 2.45 < µ < 50 + 2.45) = 0.95 I
September 5, 2023 8 / 21
Confidence Interval: random or non-random
95%
X
| |
September 5, 2023 9 / 21
5.3. C.I. for mean of normal population - unknown
September 5, 2023 10 / 21
A Prediction Interval for a Single Future Value
Assume we wishes to predict a single value of a variable to be
observed at some future time
A random sample X1 , X2 , . . . , Xn from a normal population
distribution, then we wish to predict the value of Xn+1 , a single future
observation
A unbiased point estimator is X . One has V (X Xn+1 ) = 2 (1 + n1 ),
(X Xn+1 ) 0
and Z = q has a standard normal distribution
2 (1+ 1 )
n
I V
Example 5.2 -
Assumed that wage per hour ($) of financial expert is normal distributed.
Data of 16 randomly surveyed experts is below
Wage (x) 20 22 24 26
5
Freq. 1 6 5 4
=
13 .
.
Zini
-
P P 2
And xi = 376; i xi = 8888
I
16 888 3564
--
i M
-
7 15
(b) Find the 95% confidence interval of mean (population mean) Il
(c) Find the 90% prediction interval 1 861
.
September 5, 2023 12 / 21
n
-
1
b I -
th Y M(x+ *
2
15
55,
.
,
-
in excel
(s/in)
*
x= +
⑨
5.4. C.I. for the variance of normal populations
X1 , . . . , Xn is a random sample from a normal distribution with
parameters µ and 2
(n 1)S 2 2 (n
Recall 2 ⇠ 1)
!
(n 1)s 2 (n 1)s 2
The two-sided C.I. 2
, 2
. The right-sided and
(n 1)↵/2 (n
! 1)1 ↵/2 !
(n 1)s 2 (n 1)s 2
left-sided C.I.s are 2
,1 and 1, 2
(n 1)↵ (n 1)1 ↵
Example 5.3
Wage survey of 16 experts shows the mean of $23.5 and the variance of
$3.467. Assume that the wage is normally distributed.
(a) Find the 95% confidence interval of variance
(b) Find the 90% upper confidence of standard deviation
September 5, 2023 13 / 21
5.5. C.I. FOR PROPORTION
✓ ◆
p(1 p)
n large enough, p̂ ⇠ N p,
n
r r !
p(1 p) p(1 p)
P p z↵/2 < p̂ < p + z↵/2 =1 ↵
n n
Two-sided C.I.
q
2 /2n p̂(1 2 /(4n2 )
p̂)/n + z↵/2
p̂ + z↵/2
2 /n
± z↵/2 2 /n
1 + z↵/2 1 + z↵/2
One-sided C.I.
September 5, 2023 14 / 21
C.I. for Proportion - Large Sample
September 5, 2023 15 / 21
Example
Example 5.4
In 200 insurance customers, there were 48 claims.
(a) Find the 90% C.I. for claim proportion in customers
(b) Keep ME = 3%, C.I 90%, how many customers should be surveyed?
(c) Keep ME = 3%, with 200 customers, what is confidence level?
(d) Find the 95% C.I of number of claims in 1000 customers.
Example 5.5
To estimate proportion on sample n = 400, with confidence level 90%,
what is the maximum value that the ME of C.I. would be?
Example 5.6
Catch 500 fishes in the lake, mark on them then release. Then catch 1000
fishes, and there are 50 marked ones. Find the right-sided (lower bounded)
C.I 90% of total number of fishes in the lake.
September 5, 2023 16 / 21
Exercise - Lecture 05
September 5, 2023 18 / 21
R code: C.I. for Mean: Unknown sigma
September 5, 2023 19 / 21
R code: C.I. for Variance
September 5, 2023 20 / 21
R code: C.I. for Proportion