Docsity

Exercises Topic 1 Statistics II UC3M, Ejercicios de Estadística

Toggle sidebar
bg1
Statistics II
Exercises Chapter 1
Solutions
1. A simple random sample of ten X-cars achieved the following fuel consumption figures (in miles per
gallon):
27.2 27.2 26.8 26.9 25.3 26.0 26.4 25.7 28.1 25.7
Another independent simple random sample of twelve Y-cars achieved the following results:
24.2 24.3 25.3 24.8 25.1 25.0 24.9 23.9 26.0 26.1 26.0 26.3
Using the following information obtained in Excel, answer the questions below:
(a) Use an unbiased estimation procedure to find point estimates for the population mean µXand
population variance σ2
X.
(b) Use an unbiased estimation procedure to find a point estimate for the population proportion
pXof those X-cars whose fuel consumption exceeds 25.8.
(c) Use an unbiased estimation procedure to find point estimates for the population mean µYand
population variance σ2
Y.
(d) Use an unbiased estimation procedure to find a point estimate for the population proportion
pYof those Y-cars whose fuel consumption exceeds 25.8.
(e) Use an unbiased estimation procedure to obtain a point estimate of the difference in population
mean fuel consumption between X-cars and Y-cars, that is, of µX−µY.
(f) Use an unbiased estimation procedure to obtain a point estimate of the difference between the
population proportion of X-cars achieving more than 25.8 and the population proportion of
Y-cars achieving more than 25.8, that is, of pX−pY.
Solution. Let X= “fuel consumption of an X-car” and Y= “fuel consumption of an Y-car”, both
in miles per gallon.
(a) An unbiased estimator of µXis ¯
X. The corresponding estimate is ¯x=P10
i=1 xi=265.3
10 = 26.53.
An unbiased estimator of σ2
Xis s2
X. The corresponding estimate is
s2
x=P10
i=1 x2
i−10(¯x)2
10 −1=7045.17 −10(26.53)2
9=6.761
9≈0.75
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Vista previa parcial del texto

¡Descarga Exercises Topic 1 Statistics II UC3M y más Ejercicios en PDF de Estadística solo en Docsity!

Statistics II

Exercises Chapter 1

Solutions

  1. A simple random sample of ten X-cars achieved the following fuel consumption figures (in miles per gallon): 27. 2 27. 2 26. 8 26. 9 25. 3 26. 0 26. 4 25. 7 28. 1 25. 7 Another independent simple random sample of twelve Y-cars achieved the following results:

  2. 2 24. 3 25. 3 24. 8 25. 1 25. 0 24. 9 23. 9 26. 0 26. 1 26. 0 26. 3

Using the following information obtained in Excel, answer the questions below:

(a) Use an unbiased estimation procedure to find point estimates for the population mean μX and population variance σ^2 X. (b) Use an unbiased estimation procedure to find a point estimate for the population proportion pX of those X-cars whose fuel consumption exceeds 25.8. (c) Use an unbiased estimation procedure to find point estimates for the population mean μY and population variance σ^2 Y. (d) Use an unbiased estimation procedure to find a point estimate for the population proportion pY of those Y-cars whose fuel consumption exceeds 25.8. (e) Use an unbiased estimation procedure to obtain a point estimate of the difference in population mean fuel consumption between X-cars and Y-cars, that is, of μX − μY. (f) Use an unbiased estimation procedure to obtain a point estimate of the difference between the population proportion of X-cars achieving more than 25.8 and the population proportion of Y-cars achieving more than 25.8, that is, of pX − pY.

Solution. Let X = “fuel consumption of an X-car” and Y = “fuel consumption of an Y-car”, both in miles per gallon.

(a) An unbiased estimator of μX is X¯. The corresponding estimate is ¯x =

i=1 xi^ =^

  1. 3 10 = 26.53. An unbiased estimator of σ^2 X is s^2 X. The corresponding estimate is

s^2 x =

i=1 x

2 i −^ 10(¯x)

2 10 − 1

7045. 17 − 10(26.53)^2

(b) An unbiased estimator of pX is ˆpX = “proportion of the sampled X-cars, whose mpg exceeds 25.8”. The corresponding estimate is

pˆx =

(c) An unbiased estimator of μY is Y¯. The corresponding estimate is ¯y =

i=1 yi^ =^

  1. 9 12 = 25 .158333. An unbiased estimator of σ^2 Y is s^2 Y. The corresponding estimate is

s^2 y =

i=1 y

2 i −^ 12(¯y)

2 12 − 1

7602. 39 − 12(25.158333)^2

(We used more decimals in ¯y to obtain the same value as in the Excel output of Ex. 22.) (d) An unbiased estimator of pY is ˆpY = “proportion of the sampled Y-cars, whose mpg exceeds 25.8”. The corresponding estimate is

pˆy =

(e) An unbiased estimator of μX − μY is X¯ − Y¯. The corresponding estimate is ¯x − y¯ = 26. 53 − 25 .16 = 1.37. (f) An unbiased estimator of pX − pY is ˆpX − pˆY. The corresponding estimate is ˆpx − pˆy =

  1. 7 − 0 .33 = 0.37.

  2. We take a simple random sample of size n = 400 from a population X and construct an 95% confidence interval for the unknown population mean μX (the population standard deviation is assumed to be known, σX = 1). Based on the same sample we construct an 80% confidence interval for the unknown population mean μX. We repeat this scheme 300 times. As the result we obtain 300 confidence intervals at an 95% level and the ”twin” 300 confidence intervals at an 80% confidence level. Both sets of intervals are plotted below.

−7.7 −7.6 −7.5 −7.4 −7.

0

50

100

150

200

250

300

Confidence Interval

Index

| (^) | |^ |^ |||||||||| | (^) | ||^ |||^ | ||| |||

|| (^) | ||^ || | ||||| | |^ |||^ | ||^ |||| |

| |^ ||^ ||||| ||||| || ||^ ||^ |||^ ||| |

| |||^ || || ||||||

| (^) ||| | | || |||^ || | ||| |^ |||| ||^ | ||

| |^ | |^ |||| |||| |

||| (^) | || |||| ||| | | ||^ |^ |||^ ||||| |

|| (^) || (^) || |^ ||||||| | (^) || ||^ ||||||||^ | | |^ | |^ |||| ||||| | ||^ | || || |||^ | | |

| (^) | (^) | ||| (^) | ||||| | |||| |||^ |^ ||^ ||^ | |

| (^) || || || |^ |||^ | | | |^ ||^ ||||||^ || || || |||^ | ||^ ||||| | || |^ |^ | || |||||| | |

−7.7 −7.6 −7.5 −7.4 −7.

0

50

100

150

200

250

300

Confidence Interval

Index

| (^) | |^ |^ |||||||||| | (^) | ||^ |||^ | ||||||

|| (^) | ||^ || | ||||| | |^ |||^ | ||^ |||| |

| ||^ |^ ||||| ||||| || ||^ ||^ ||||^ || |

| (^) || |^ || || ||||||

| (^) ||| | | | ||||^ || || | ||^ |||| ||^ | ||

| |^ | |^ |||| |||| |

||| (^) | || |||| ||| | | ||^ |^ |||^ ||||| |

|| (^) || (^) || |^ ||||||| | (^) || ||^ ||||||||^ | | |^ | |^ |||| ||||| | ||^ | || || |||^ | | |

| (^) | (^) | ||| (^) | ||||| | ||| | |||^ |||^ ||^ | |

| (^) | ||| || |^ |||^ | | | |^ ||^ ||||||^ || || || |||^ | ||^ ||||| | |^ | ||^ | || ||||||| |

(a) Which graph, left or right, shows the 95% confidence intervals for μX and which shows the 80% confidence intervals for μX? Justify your answer. (b) For each graph, say how many (approximately) of those 300 intervals will cover μX and how many will not.

Solution.

(a) Left: 80% confidence intervals. Right: 95% confidence intervals. Justification: the higher the level, the longer the interval (keeping everything else the same).

I. n = 400, X ∼ Bernoulli(0.3) II. n = 400, X ∼ Bernoulli(0.7) III. n = 100, X ∼ Bernoulli(0.3) IV. n = 100, X ∼ Bernoulli(0.7)

0.0 0.2 0.4 0.6 0.8 1.

0

10

20

30

40

50

Confidence interval

Index

| (^) || || | (^) | | || | ||| | ||^ | |||

|| | ||

| | || ||

| (^) | || | ||| | | ||^ || | |||

0.0 0.2 0.4 0.6 0.8 1.

0

10

20

30

40

50

Confidence interval

Index

|| || | | ||||

| |||||

|| |||

|||| | | | ||| ||||| |

|||||||

| ||| ||

0.0 0.2 0.4 0.6 0.8 1.

0

10

20

30

40

50

Confidence interval

Index

||| | | | ||||

| || || | ||||

| || ||

||| ||| || ||| |||||||

| |||| ||

0.0 0.2 0.4 0.6 0.8 1.

0

10

20

30

40

50

Confidence interval

Index

| |^ || |

|| ||| ||| ||| | (^) | | || | (^) | ||| ||||^ | |||^ | |

| | |||| | || | ||| |

Solution. Top left: n = 100, X ∼ Bernoulli(0.7) (scenario IV) Top right: n = 400, X ∼ Bernoulli(0.3) (scenario I) Bottom left: n = 400, X ∼ Bernoulli(0.7) (scenario II) Bottom right: n = 100, X ∼ Bernoulli(0.3) (scenario III)

  1. The confidence interval for the population mean μX is symmetrical about the sample mean ¯x. Is the confidence interval for the population variance σ X^2 symmetrical about the sample quasi variance s^2 x? Justify. Solution. No. The end-points of the interval are obtained by multiplying s^2 x by n − 1 and then dividing this value by the quantiles of a χ^2 n− 1 distribution. These quantiles are not symmetric with respect to n − 1 (the mean of the distribution).
  2. A 99% confidence interval for the population mean level of satisfaction of students with their cars was found to be (75. 7 , 82 .5). Would it therefore be proper to say that the probability is 0.99 that the population mean satisfaction level is between 75.7 and 82.5? If not, replace this statement by a valid one. Solution. No, it is wrong to say P (75. 7 < μX < 82 .5) = 0.99! μX is a fixed number, not a random variable, so this probability is either 1 (if μX is between the end-points) or 0 (if not). The correct statement is to say that we are 99% confident that μX is between the end-points. Or that, if we were to construct many intervals for μX , approximately 99% of them would contain μX and the remaining ones would not.
  3. A manufacturer is concerned about the variability of the levels of impurity contained in consignments of raw material from a supplier. A random sample of fifteen consignments showed a quasi-standard deviation of 2.36% in the impurity concentration levels. Assume a normal population distribution.

(a) Find and interpret a 95% confidence interval for the population variance. (b) Would a 99% confidence interval for this variance be wider or narrower than that found in the previous part? Justify without doing any calculations. (c) Find and interpret a 95% confidence interval for the population standard deviation.

Solution.

(a) Assumptions: SRS, normality of the population.

Population: X = “concentration of impurity levels in a con- signment of raw material (in %)” X ∼ N (μX , σ^2 X )

↘ SRS:^ n^ = 15

Sample: sx = 2. 36

Objective: CI 0. 95 (σ X^2 ) =

(n−1)s^2 x χ^2 n−1;α/ 2 ,^

(n−1)s^2 x χ^2 n−1;1−α/ 2

s^2 x = 2. 362 ≈ 5. 57 n = 15 1 − α = 0. 95 ⇒ α/2 = 0. 025 χ^2 n−1;1−α/ 2 = χ^2 14;0. 975 = 5. 63 χ^2 n−1;α/ 2 = χ^2 14;0. 025 = 26. 12

CI 0. 95 (σ^2 X ) =

We can be 95% confident that the variance in the impurity concentration levels takes a value between 2.99 and 13.85. (b) It would be wider because as the confidence level increases the size of the interval increases. (c) CI 0. 95 (σX ) = (

13 .85) = (1. 73 , 3 .72) and so we can be 95% confident that the standard deviation in the impurity concentration levels is between 1.73 and 3.72.

  1. The members of a random sample of fifty four union stewards were asked how often they talked employees out of filing grievances. Of these sample members, fourteen answered “never” to this question. Based on this information, a Statistics student calculated a confidence interval running from 16% to 36% for the population percentage of union stewards who never talk employees out of filing grievances.

(a) Find the level of confidence associated with this interval. (b) Construct and interpret a 80% confidence interval for the population percentage in question.

Solution.

(a) Assumptions: SRS, large n. Population: X = 1 if a union steward never talks employees out of filing grievances and 0 otherwise X ∼ Bernoulli(pX ) pX = proportion of all union stewards who never talk employees out of filing grievances

↘ SRS:^ n^ = 54

Sample: ˆpx = 14/ 54 ≈ 0. 26 CI 1 −α(pX ) = (0. 16 , 0 .36) Objective: 1 − α One way of finding 1 − α is to use the relationship

width = 2zα/ 2

pˆx(1 − pˆx)/n,

solve this equation for zα/ 2 , identify α and even- tually (1 − α).

From theory CI width = 2 zα/ 2

From the problem data CI width = 0. 36 − 0 .16 = 0. 2 ⇒

2 zα/ 2

zα/ 2 =

α/ 2 = 0. 047 α = 0. 094

The confidence level used was 1 − α = 1 − 0 .094 = 90 .6%.

(b) Assumptions: SRS, large n.

iii. An 80% confidence interval was required (with everything else the same). (c) If the population was not normally distributed, would you be able to construct the confidence interval for the population mean? Justify. What kind of remedy would you suggest to fix the problem? (d) Construct and interpret a 90% confidence interval for the population standard deviation.

Solution.

(a) Assumptions: SRS, normality of the population.

Population: X = “weekly study time of a student at UC3M (in h)” X ∼ N (μX , σ^2 X ) σ^2 X unknown

↘ SRS:^ n^ = 16^ small

Sample: ¯x = 18. 36 sx = 3. 92

Objective: CI 0. 9 (μX ) =

¯x ∓ tn−1;α/ 2 √sxn

sx = 3. 92 n = 16 ¯x = 18. 36 1 − α = 0. 9 ⇒ α/2 = 0. 05 tn−1;α/ 2 = t15;0. 05 = 1. 753

CI 0. 9 (μX ) =

We can be 90% confident that the population mean weekly study time falls between 16.64 and 20 .08 h. (b) i. It would be narrower. In the expression for the half-width (tn−1;α/ 2 √sxn ) we divide by

n. Thus, with more data, we have more precision. ii. It would be wider. In the expression for the half-width we multiply by sx. Thus, with more variation in the sample, we have less precision. iii. It would be narrower. In the expression for the half-width we multiply by tn−1;α/ 2 , which decreases as we increase α/2 from 0. 1 /2 to 0. 2 /2. (c) No. We are dealing with a small sample size and unknown population standard deviation, and we are using a t-based confidence interval which is valid under normality of the population. If the population were not normal, we could collect more data (to reach n ≥ 30) in order to construct a confidence interval for the mean in large samples. (d) Assumptions: SRS, normality of the population.

Population: X = “weekly study time of a student at UC3M (in h)” X ∼ N (μX , σ^2 X )

↘ SRS:^ n^ = 16

Sample: sx = 3. 92

Objective: CI 0. 9 (σX ) =

(√ (n−1)s^2 x χ^2 n−1;α/ 2 ,

√ (n−1)s^2 x χ^2 n−1;1−α/ 2

)

s^2 x = 3. 922 ≈ 15. 37 n = 16 1 − α = 0. 9 ⇒ α/2 = 0. 05 χ^2 n−1;1−α/ 2 = χ^2 15;0. 95 = 7. 26 χ^2 n−1;α/ 2 = χ^2 15;0. 05 = 25. 00

CI 0. 9 (σ^2 X ) =

CI 0. 9 (σX ) = (3. 04 , 5 .64)

We can be 90% confident that the standard devi- ation in the weekly study times of all students at UC3M falls between 3.04 and 5.64 h.

  1. A process producing bricks is known to give an output whose weights are normally distributed with standard deviation 0.12 lb. A random sample of sixteen bricks from today’s output had a mean weight of 4.07 lb.

(a) Find and interpret a 95% confidence interval for the mean weight of all bricks produced this day. (b) Your boss thinks that the interval constructed in the previous part is too wide and would like you to reduce its length by half. By how many observations do you need to increase your current sample size to achieve that goal? (c) Give the value of the standard error of X¯.

Solution.

(a) Assumptions: SRS, normality of the population.

Population: X = “weight of a brick (in pounds)” X ∼ N (μX , σ^2 X = 0. 122 )

↘ SRS:^ n^ = 16

Sample: ¯x = 4. 07 Objective: CI 0. 95 (μX ) =

x ¯ ∓ zα/ 2 σ√Xn

n = 16 x¯ = 4. 07 1 − α = 0. 95 ⇒ α/2 = 0. 025 zα/ 2 = z 0. 025 = 1. 96

CI 0. 95 (μX ) =

We can be 95% confident that the population mean weight is between 4.011 and 4.129 pounds. (b) Assumptions: SRS, normality of the population.

Population: X = “weight of a brick (in pounds)” X ∼ N (μX , σ^2 X = 0. 122 )

↘ SRS:^ n^ =?

CI 1 −α(μX ) : width smaller by half Objective: n∗^ such that new width, 2zα/ 2 √σXn∗ , equals one half of the old width, 12 · 2 zα/ 2 σ√Xn.

2 zα/ 2

σX √ n∗^

= 2 zα/ 2

σX √ n

n∗^ =

4 n n∗^ = 4 n

Hence, we need a sample size four times bigger than the original one, that is, we need to increase the sample size from n to 4n, i.e., by 3n = 3(16) = 48 observations. (c) SE( X¯) = σX /

n = 0. 12 /4 = 0. 03

  1. A University keeps track of the salaries of its alumni. For a sample of 20 alumni from a given school it has observed that the sample mean of the monthly salary one year after graduation is 1700 euros, and its standard deviation is 350 euros. We assume that the population follows a normal distribution.

(a) Compute a confidence interval at the 95% level for the mean monthly salary of all alumni of the school. (b) Which would be the value of the interval if the confidence level is selected as 99%? (c) Which sample sizes would yield intervals of size smaller than 100 euros, if the values of the sample mean and standard deviation remain unchanged, and the confidence level is 95%?

Solution.

(a) We have a simple random sample from a normal population with unknown standard deviation. Our pivotal quantity is X¯ − μX sX /

n ∼ tn− 1

where tn− 1 denotes a Student-t distribution with n − 1 degrees of freedom.

We start by computing the value of the quantiles of interest. We have α = 0.1, implying α/2 = 0.05 and 1 − α/2 = 0.95, as well as n = 20. From the tables for a chi-squared distribution with 19 degrees of freedom we obtain χ^219 , 0. 95 = 10.117 and χ^219 , 0. 05 = 30.144. The confidence interval for the variance has the form

χ^2 n− 1 , 1 −α/ 2 ≤

(n − 1)s^2 x σ^2 X

≤ χ^2 n− 1 ,α/ 2.

Replacing sample values, taking into account that the quantity of interest from the sample is s^2 x = 2. 32 = 5.29, we obtain the interval

  1. 117 ≤

19 × 5. 29

σ^2 X

19 × 5. 29

≤ σ^2 X ≤

19 × 5. 29

⇔ CI 1 −α(σ X^2 ) = [3.334; 9.935].

(b) If the sample size is now n = 40, the values of the quantiles of interest change and are now χ^239 , 0. 95 = 25.695 and χ^239 , 0. 05 = 54.572. The value of the new interval is

  1. 695 ≤

39 × 5. 29

σ^2 X

39 × 5. 29

≤ σ^2 X ≤

39 × 5. 29

⇔ CI 1 −α(σ X^2 ) = [3.781; 8.029].

  1. A market study has been conducted on 64 persons. They have been asked if they would be interested in purchasing two products, A and B. 36 have given an affirmative answer for the first product, while 32 have shown an interest in the second product and 26 are interested in both. You are asked to: (a) Use an unbiased estimation procedure to estimate the percentage of consumers interested in purchasing both products. (b) Use an unbiased estimation procedure to estimate the percentage of consumers interested in purchasing the first product but not the second one. (c) Indicate the variance of the estimator used to answer this second question and estimate its value from the sample. (d) Compute a confidence interval for the percentage of consumers interested in purchasing the first product but not the second one (as in the second question) for a confidence level of 90%. (e) Discussion-stimulating question. Compute another (approximate) confidence interval for this proportion and for the same confidence level, but with the property that the left endpoint of the interval is equal to zero.

Solution. (a) To get unbiased estimators for proportions in a population we can use the corresponding sample proportions. In our case, if pAB denotes the proportion of consumers interested in both products, the requested value is

ˆpab =

(b) To compute this second estimate we use the same procedure as before, but we need to know the number of people in the sample that satisfy the given condition. In this case, out of the 36 clients willing to purchase the first product, 36 − 26 = 10 do not wish to purchase the second one. Thus, the desired estimate for pA B¯ , the proportion of all consumers interested in purchasing the first product but not the second one, is

ˆpa¯b =

(c) The estimator can be written as the mean of Bernoulli variables associated to the satisfaction of the condition under study. Its variance will then be given by the variance of each variable in the sum, pA B¯ (1 − pA B¯ ), divided by n,

Var[ˆpA B¯ ] =

pA B¯ (1 − pA B¯ ) n An estimate of this variance is pa¯b(1 − pa¯b) n − 1

(d) We assume that we have a s.r.s. and that n is large enough that we can use the CLT. The pivotal statistic is pˆA B¯ − pA B¯ √ pˆA B¯ (1 − pˆA B¯ )/n

∼approx. N (0, 1).

From the sample we have ˆpa¯b = 0.156 and n = 64. Also, zα/ 2 = z 0. 05 = 1.645. The confidence interval will be given by

CI 0. 1 (pA B¯ ) = [ˆpa¯b ± zα/ 2

pˆa¯b(1 − ˆpa¯b)/n] = [0.082; 0.231].

(e) We will make the same assumptions and use the same statistic as before. The difference will be that we will exclude from the confidence interval only values on the right tail of the distribution. The confidence interval will be defined as

CIα(pA B¯ ) = [0; ˆpa¯b + zα

pˆa¯b(1 − ˆpa¯b)/n] = [0; 0.214].

  1. The management of a large retailer has reasons to believe that the age of the clients that visit a certain center follows a normal distribution with standard deviation equal to 5. A simple random sample of 100 clients of this center yields an average age of 30. You are asked to:

(a) Obtain a confidence interval at a confidence level of 96% for the average age of all clients visiting this center. (b) What would be the smallest sample size that would ensure a length for this confidence interval of at most 1? (c) Compute the probability that the sample quasi variance is less than 19.67. (d) In the sample you have identified 25 persons as foreigners. Compute a confidence interval for the proportion of foreigners that shopped in this center for a confidence level of 95%. (e) The sales director of the retailer tells you that she has another (independent) sample for the proportion of foreigners in their centers, with a sample size of 200 and a sample proportion of 20%. Provide an improved confidence interval (at a 95% level) for this proportion using all the information that you have available. (f) If the sample size is large enough, it is known that the sample median follows a normal distribution with mean μ and variance π 2 σ

2 n ; we denote it by^ Xˆm. If we wish to compare the efficiency of the sample median and the sample mean, which of the two estimators is more efficient for n large?

Solution.

(a) CI96% = (¯x ± zα/ 2 σ√Xn ) = (30 ± 2. 05 105 ) = (28.975; 31.025)

(b) 2. 05 √^5 n ≤ 0 .5 =⇒ n ≥ 420. 2

(c) P (s^2 X < 19 .67) = P

99 s^2 X 25 <^

99 × 19. 67 25

= P (χ^299 < 77 .9) = 0. 05

(d) The confidence interval is given by

CI95%(pY ) = [ˆpy ± zα/ 2

p ˆy (1 − pˆy )/n] = [0. 25 ± 1. 96

0. 25 × 0. 75 /100] = [0.165; 0.335].

(e) We assume that both samples correspond to the same population. We combine both samples to obtain a larger sample that is still a s.r.s. The proportion for this combined sample is pˆc = (25 + 200 × 0 .2)/(100 + 200) = 0.217. The new confidence interval is

CI95%(pC ) = [ˆpc ± zα/ 2

pˆc(1 − pˆc)/n] = [0. 217 ± 1. 96

0. 217 × 0. 783 /300] = [0.170; 0.263].

(f) Var( X¯) = σ

(^2) X n and Var( Xˆm) = π 2

σ^2 X n '^1.^57

σ X^2 n =⇒^ X¯ is more efficient than Xˆm as it has a lower variance.

ii. TRUE. We can use the interval obtained in the second question. This interval for a confidence level of 95% includes the value 1000, implying that at a 99% confidence level the corresponding interval will be larger and it will also include the value 1000. iii. TRUE. The lower limit of the confidence interval for a population proportion is given by pˆx − zα/ 2

pˆx(1 − pˆx)/n and this value is negative whenever ˆpx < 1 /(1 + n/z^2 α/ 2 ).

  1. A clinic offers weight reduction treatments. It is assumed that the weight loss observed after a two-month treatment follows a normal distribution. A simple random sample of 40 patients has been collected and the corresponding values are available in the Excel file “data ex1.xlsx” Using Excel answer the following questions:

(a) Compute a confidence interval at the 99% level for the weight loss of all patients following the treatment. (b) Which would be the value of the interval if the confidence level is selected as 90%? (c) Compute a confidence interval for the variance of the weight loss at the 99% level.

Solution.

(a) We can apply the following procedure in Excel. In “Data analysis” under the menu “Data” we select the option “Descriptive statistics” and we tick the options for “Summary statistics” and “Confidence level for the mean”. We introduce the range of the data to analyze, as well as the confidence level for the mean, and we obtain the value 6.0025 for the mean, and an interval (half) length of 0.8142. The confidence interval will be

CI99%(μX ) = [6. 0025 ± 0 .8142] = [5.188; 6.817].

(b) We repeat the same procedure as before, but we change the confidence level to obtain a new interval length of 0.5066. The new interval is

CI90%(μX ) = [6. 0025 ± 0 .5066] = [5.496; 6.509].

(c) To compute the interval for the variance we use the formulas seen in class, that is, the interval is given by

CI99%(σ^2 X ) =

[

(n − 1)s^2 x χ^2 n−1;1−α/ 2

(n − 1)s^2 x χ^2 n−1;α/ 2

]

The value of s^2 can be found in the descriptive statistics computed before, as the sample variance s^2 = 3.616. The sample size is n = 40 and we obtain the quantiles using the Excel function INVCHISQ. We have

INVCHISQ(0.005; 39) = 19. 996 INVCHISQ(0.995; 39) = 65. 476

and replacing these values in the formulas we have the interval

CI99%(σ^2 X ) =

[

39 × 3. 616

39 × 3. 616

]

= [2.154; 7.053].

  1. You have collected data from 46 of your main customers regarding their expectations for the change in their demand during the coming year. This information is available in the Excel file “data ex1.xlsx” (Sample 1). We assume that these forecasts constitute a simple random sample, and the population values follow a normal distribution.

(a) Compute a confidence interval at the 90% and the 99% level for the expected change in demand for the coming year. (b) Compute a confidence interval at the 99% level for the standard deviation of the population (the expected change in the demand). (c) Later on, you have collected an additional set of 18 values for the expected changes (Sample 2). We assume these values correspond to the same population and are independent from those in the initial sample. Which would be the revised values of the confidence intervals (for a level of 99%) if you were to use all the available information?

(d) Would it be reasonable to expect that there will be no change in your demand for the coming year?

Solution.

(a) We use Excel to answer these questions. In “Data analysis” under the menu “Data” we select the option “Descriptive statistics” and we tick the options for “Summary statistics” and “Confidence level for the mean”. We introduce the range of the data to analyze (Sample 1), as well as a confidence level for the mean, and we obtain the value − 0 .038 for the mean. For the interval (half) length we have values 0.021 for a confidence level of 90% and 0.034 for 99%. The confidence intervals will be

CI 0. 9 (μX ) = [− 0. 038 ± 0 .021] = [− 0 .017; − 0 .059], CI 0. 99 (μX ) = [− 0. 038 ± 0 .034] = [− 0 .004; − 0 .072].

(b) To obtain the confidence interval for the standard deviation we will use the formulas for the corresponding intervals and the corresponding Excel functions to obtain the values of interest. The formulas for the confidence interval for the variance are [ (n − 1)s^2 x χ^2 n−1;1−α/ 2

(n − 1)s^2 x χ^2 n−1;α/ 2

]

The value of s^2 x can be found in the descriptive statistics computed before, as the sample variance s^2 x = 0.00731. The sample size is n = 46 and we obtain the quantiles using the Excel function INVCHISQ. We have

INVCHISQ(0.005; 45) = 24. 311 INVCHISQ(0.995; 45) = 73. 166

and replacing these values in the formulas we have the interval

CI 1 −α(σ^2 X ) =

[

45 × 0. 00731

45 × 0. 00731

]

= [0.00450; 0.0135].

The interval of interest is the one given by the square roots of these values,

CI 1 −α(σX ) = CI 0. 99 (σX ) = [0.067; 0.116].

(c) We combine both samples to recompute the statistics of interest. A simple way to do this in Excel is to copy the second sample immediately below the first one. For the joint sample we have that the mean is − 0 .0470 and the variance is 0.00694. The (half) length of the interval (for 1 − α = 0.99) is 0.0277. We have also

INVCHISQ(0.005; 63) = 37. 838 INVCHISQ(0.995; 63) = 95. 649

From these values we have

CI 0. 99 (μX ) = [− 0. 047 ± 0 .028] = [− 0 .019; − 0 .075],

CI 0. 99 (σX ) =

[√

64 × 0. 00694

64 × 0. 00694

]

= [0.068; 0.108].

Note that these intervals are shorter (more precise) than the previous ones. (d) As the value 0 is clearly outside the confidence interval CI 0. 99 (μX ), it is not reasonable to expect that the demand will not decrease in the coming year.

  1. The width of the interval for the population proportion, pX , at a (1 − α) confidence level is given by w = 2zα/ 2

pˆx(1 − ˆpx)/n. For a fixed confidence level and for a fixed sample size n, plot this width as a function of the observed sample proportion ˆpx using Excel (for example, take α = 0. 05 and n = 100). For what value of ˆpx is this interval the widest? Solution. The value of ˆpx of 0.5 leads to the widest interval.

Upper alpha-quantile versus alpha

0 5 10 15 20

 - Page 
  • 0.01 23. alpha quantile
  • 0.02 21.
  • 0.03 19.
  • 0.04 19.
  • 0.05 18.
  • 0.06 17.
  • 0.07 17.
  • 0.08 16.
  • 0.09 16.
    • 0.1 15.
  • 0.11 15.
  • 0.12 15.
  • 0.13 15.
  • 0.14 14.
  • 0.15 14.
  • 0.16 14.
  • 0.17 14.
  • 0.18 13.
  • 0.19 13.
    • 0.2 13.
  • 0.21 13.
  • 0.22 13.
  • 0.23 12.
  • 0.24 12.
  • 0.25 12.
  • 0.26 12.
  • 0.27 12.
  • 0.28 12.
  • 0.29 11.
    • 0.3 11.
  • 0.31 11.
  • 0.32 11.
  • 0.33 11.
  • 0.34 11.
  • 0.35 11.
  • 0.36 10.
  • 0.37 10.
  • 0.38 10.
  • 0.39 10.
    • 0.4 10.
  • 0.41 10.
  • 0.42 10.
  • 0.43 10.
  • 0.44 10.
  • 0.45 9.
  • 0.46 9.
  • 0.47 9.
  • 0.48 9. - 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9