0% found this document useful (0 votes)
15 views3 pages

Solutions - Week 8

Uploaded by

pranav.garg1006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

Solutions - Week 8

Uploaded by

pranav.garg1006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Nanyang Business School

Tutorial Solutions :8
Topics : Confidence Interval

1. (1) For the 90% confidence interval,


R command:
>Z_95=qnorm(0.95,0,1)
>LL=106-Z_95*(15/sqrt(22))
>UL=106+Z_95*(15/sqrt(22))
> c(LL,UL)
100.7397 111.2603
15
The 90% confidence interval is 106 ± Z 0.95 × =[100.74 , 111.26]
√22

(2) For the 99% confidence interval,


R command:
>Z_995=qnorm(0.995,0,1)
>LL=106-Z_995*(15/sqrt(22))
>UL=106+Z_995*(15/sqrt(22))
> c(LL,UL)
97.76247 114.23753
15
The 99% confidence interval is 106 ± Z 0.995 × =[97.76,114 .24 ]
√22

Notice that the 99% CI is wider than the 90% CI. The intuition should be clear: a higher
probability of correctness (i.e., the CI captures the μ) would call for a wider interval. It’s
like when you’re shooting a target afar using a shotgun, you would need a gun with a
wider shooting spread to get a higher kill rate. From an estimation standpoint, however,
a wider interval provides less precise information—so there is a trade-off between
confidence level and precision.

2. For the 99% confidence interval,


R command:
>Z_995=qnorm(0.995,0,1)
>LL=7790-Z_995*(500/sqrt(100))
>UL=7790+Z_995*(500/sqrt(100))
> c(LL,UL)
7661.209 7918.791
500
The 99% confidence interval is 7790 ± Z 0.995 × =[7661.21 , 7918.79]
√100
3. The 95% confidence interval is :

Tutorial Solutions 8 Page 1


Nanyang Business School

[ (n−1)∗Sn , (n−1)∗S n =[ (17)∗9.2 , (17)∗9.2 ]


X n−t q X n+t q ¿ 11.5−t 0.975 11.5+ t 0.975
√n √n √18 √18
R command:
LL=11.5-9.2/sqrt(18)* qt(0.975,17)
UL=11.5+9.2/sqrt(18)* qt(0.975,17)
c(LL,UL)
6.924948 16.075052
The 95% confidence interval is [6.92,16.08]

4.
(1) Using R command
> n=length(ChickWeight$weight[ChickWeight$Time==10])
> x_bar=mean(ChickWeight$weight[ChickWeight$ Time==10])
> S=sd(ChickWeight$weight[ChickWeight$ Time==10])
> x_bar-S/sqrt(n)*qt(0.95,n-1)
102.0893
>x_bar+S/sqrt(n)*qt(0.95,n-1)
113.5842
The 90% CI is [102.0893, 113.5842] grams.

You can obtain the same answer simply by using:


t.test( ChickWeight$weight[ChickWeight$Time==10], con.level=0.90).

You can use ?t.test to see the help file for t.test.

(2)
> n=length(ChickWeight$weight[ChickWeight$Time==0])
>x_bar=mean(ChickWeight$weight[ChickWeight$ Time==0])
>S=sd(ChickWeight$weight[ChickWeight$ Time==0])
>x_bar-S/sqrt(n)*qt(0.975,n-1)
40.73821
>x_bar+S/sqrt(n)*qt(0.975,n-1)
41.38179
The 95% CI is [40.73821, 41.38179] grams

Similar to (1), you can use t.test( ChickWeight$weight[ChickWeight$Time==0],


con.level=0.95) to obtain the above answer.

5.
The CI with endpoints and will be a confidence
X n−Z 0.975 σ / √ n X n+ Z 0.975 σ / √ n
interval for μ with confidence coefficient 0.95. The length of this interval will be
Tutorial Solutions 8 Page 2
Nanyang Business School

. It now follows that the condition is if and only if


2∗Z 0.975 σ / √ n 2∗Z 0.975 σ / √ n<0.01 σ
This means that
√ n>391.9928(given Z 0.975=qnorm ( .975 , 0 , 1 )=1.959964) .
n>153658.4 .So we need a sample size of 153659 or more.

( )
2
6. (1) (Z ¿ 0.975∗σ )≤ 5 ¿, so Z 0.975∗20.6 , rounded up to 66.
¿ n≥ =65 .21
√n 5

( )
2
(2) (Z ¿ 0.975∗σ )≤ 5 ¿ ,so Z 0.975∗12.8 , rounded up to 26.
¿ n≥ =25.18
√n 5
(3) With higher standard deviation, Industry A requires a larger sample size to achieve the
same absolute error.

One key takeaway from Q5 & Q6 is that “a larger sample size” in general makes a CI
narrower, producing a more precise estimate.

7. (1) > q7=read.csv(file.choose(),header=T)


The sample size is 149, which you could use either the length command or View to find
out. Thus, the 95% CI is:
> mean(q7$score)+qt(.975,148)*sd(q7$score)/sqrt(149)
[1] 71.86808
> mean(q7$score)-qt(.975,148)*sd(q7$score)/sqrt(149)
[1] 68.58427
The 99% CI is:
> mean(q7$score)+qt(.995,148)*sd(q7$score)/sqrt(149)
[1] 72.3943
> mean(q7$score)-qt(.995,148)*sd(q7$score)/sqrt(149)
[1] 68.05805

(2)

We can easily see its total length is longer than the 95% CI. Why? Given the same sample
size (the amount of the information), the CI must be wider to have a higher probability to
capture the population mean.

(3) A larger sample would make the CI narrower. This is good! Because, for a given
probability (95% in this case), we would prefer a more precise estimate (narrower CI).
We can have this by increasing the sample size.

Tutorial Solutions 8 Page 3

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy