Docsity

Stat 312: Lecture 6 - Confidence Intervals II, Study notes of Mathematical Statistics

Toggle sidebar
bg1
Stat 312: Lecture 6
Confidence Intervals II.
Moo K. Chung
February 6, 2003
Concepts
1. Let Xi∼N(µ, σ2)with known σ2and unknown
µ.100(1 −α)% confidence interval for µis.
ˆµL= ¯x−zα/2·σ/√n, ˆµU= ¯x+zα/2·σ/√n.
2. The sample size is inversely related to the width of
confidence interval.
3. Central Limit Theorem. Let X1,··· ,Xnbe a ran-
dom sample with mean µand variance σ2. For
large n,
Z=¯
X−µ
σ/√n∼N(0,1).
4. If nis sufficiently large, approximate 100(1 −α)%
confidence interval for µis ¯x±zα/2s/√n, where
sis the sample standard deviation.
In-class problems
Continuing Exercise 6.25, construct 98% confidence in-
terval.
Example 7.4. Response time ∼N(µ, σ 2), σ = 25. Find
the sample size nthat ensures 95%CI with a width of
10.
Example 7.6. Alternating current (AC) voltage data
> data(xmp07.06)
> attach(xmp07.06)
> str(xmp07.06)
‘data.frame’:48 obs. of 1 variable:
$ C1: int 62 50 53 57 ...
> boxplot(C1)
> mean(C1)
[1] 54.70833
> sd(C1)
40 45 50 55 60 65
[1] 5.230672
>mean(C1)-qnorm(0.975)*sd(C1)/sqrt(length(C1))
[1] 53.2286
>mean(C1)+qnorm(0.975)*sd(C1)/sqrt(length(C1))
[1] 56.18807
Ex. Toss n= 100 biased coins with P(H) = p. Sup-
pose you observe 38 heads. Construct 95%CI of p.
> X<-rbinom(100,1,0.4)
> X
[1] 1 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0
[17] 0 0 1 1 0 1 0 1 1 0 1 0 1 0 1 0
[33] 1 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0
[49] 0 1 0 0 0 0 1 1 0 1 0 1 1 0 0 1
[65] 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0
[81] 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1
[97] 0 1 1 0
> sd(X)
[1] 0.4878317
> sqrt(0.38*(1-0.38)/(100-1))
[1] 0.04878317
> 0.38+1.96*0.049/sqrt(100)
[1] 0.389604
> 0.38-1.96*0.049/sqrt(100)
[1] 0.370396
Self-study problems
Example 7.8., Exercise 7.13., 7.19., 7.25.
In the above coin tossing example, check if ¯
Xis MLE.

Partial preview of the text

Download Stat 312: Lecture 6 - Confidence Intervals II and more Study notes Mathematical Statistics in PDF only on Docsity!

Stat 312: Lecture 6

Confidence Intervals II.

Moo K. Chung

[email protected]

February 6, 2003

Concepts

  1. Let Xi ∼ N (μ, σ^2 ) with known σ^2 and unknown μ. 100(1 − α)% confidence interval for μ is.

μ ˆL = ¯x − zα/ 2 · σ/

n, μˆU = ¯x + zα/ 2 · σ/

n.

  1. The sample size is inversely related to the width of confidence interval.
  2. Central Limit Theorem. Let X 1 , · · · , Xn be a ran- dom sample with mean μ and variance σ^2. For large n, Z = X¯ − μ σ/

n

∼ N (0, 1).

  1. If n is sufficiently large, approximate 100(1 − α)% confidence interval for μ is x¯ ± zα/ 2 s/

n, where s is the sample standard deviation.

In-class problems

Continuing Exercise 6.25, construct 98% confidence in- terval. Example 7.4. Response time ∼ N (μ, σ^2 ), σ = 25. Find the sample size n that ensures 95% CI with a width of

Example 7.6. Alternating current (AC) voltage data

data(xmp07.06) attach(xmp07.06) str(xmp07.06) ‘data.frame’:48 obs. of 1 variable: $ C1: int 62 50 53 57 ... boxplot(C1) mean(C1) [1] 54. sd(C1)

40 45 50

55

60 65

[1] 5.

mean(C1)-qnorm(0.975)sd(C1)/sqrt(length(C1)) [1] 53. mean(C1)+qnorm(0.975)sd(C1)/sqrt(length(C1)) [1] 56.

Ex. Toss n = 100 biased coins with P (H) = p. Sup- pose you observe 38 heads. Construct 95% CI of p.

X<-rbinom(100,1,0.4) X [1] 1 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 [17] 0 0 1 1 0 1 0 1 1 0 1 0 1 0 1 0 [33] 1 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 [49] 0 1 0 0 0 0 1 1 0 1 0 1 1 0 0 1 [65] 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 [81] 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 [97] 0 1 1 0 sd(X) [1] 0. sqrt(0.38(1-0.38)/(100-1)) [1] 0. 0.38+1.960.049/sqrt(100) [1] 0. 0.38-1.96*0.049/sqrt(100) [1] 0.

Self-study problems

Example 7.8., Exercise 7.13., 7.19., 7.25. In the above coin tossing example, check if X¯ is MLE.