IEOR 165 Homework 1
Due February 19, 2015
Question 1.
Only two factories manufacture Phones. One percent of the Phones from factory I and five percent from factory II are defective. Factory I produces twice as many
Phones as factory II.
a. What is the probability that a randomly chosen Phone is satisfactory?
b. What is the probability that a randomly chosen Phone is from factory I, if it is found to be defective?
Question 2.
In one chemical process, it is very important that a particular solution used as a reactant have a pH of exactly 8.15. A method for determining pH available for solutions of this type is known to give measurements that are normally distributed with a mean equal to the actual pH and a standard deviation of 0.02. We wish to design a test such that if the pH is actually equal to 8.15 then this conclusion will be reached with probability equal to
0.90. Suppose the sample size is 5.
a. What is the test procedure that should be used?
b. If X = 8 .
26, what is the conclusion?
Question 3.
An advertisement for a new toothpaste claims that it reduces cavities of children in their cavity-prone years. Cavities per year for this age group are normal with mean
3 and standard deviation 1. A study of 2,500 children who used this toothpaste found an average of 2.95 cavities per child. Assume that the standard deviation of the number of cavities of a child using this new toothpaste remains equal to 1.
a. Is this data strong enough, at the 5 percent level of significance, to establish the claim of the toothpaste advertisement?
b. Does the data convince you to switch to this new toothpaste?
Question 4.
Define s
′
2
=
1 n i =1
( X i
−
X )
2
.
a. Show that
E [ s
′
2
] =
[ n
−
1
]
σ
2 n
1
b. Show that
E
[
1 n
−
1 i =1
( X i
−
X )
2
]
= σ
2
Hint: i =1
( X i
−
X )
2
=
(
( X i
−
µ )
−
( X
−
µ )
)
2 where µ = E [ X i
] = E [ X ], σ
2
= V ar ( X i
)
Question 5.
State the null hypothesis to be used in the following tests. What type of extreme deviation would you use for the test?
1. A manufacturer of a certain brand of rice cereal claims that the average saturated fat content is 1.5 grams.
2. A real estate agent claims that 60% of all private residences being built today are 3bedroom homes. To test this claim, a large sample of new residences is inspected: the proportion of these homes with 3 bedrooms is recorded and used as our test statistic.
3. A dry cleaning establishment claims that anew spot remover will remove more than
70% of the spots to which it is applied.
Question 6.
The independent measurements given below are normally distributed with unknown variance.
a. Compute a 95 percent confidence interval using the appropriate equations.
b. Construct a 95 percent confidence interval using the percentile bootstrap.
Return your results and code. (Matlab, R...)
38.65 40.05 38.98 42.29 44.34 45.34 51.06 48.62 48.73 36.29 44.3 37.01 42.73 43.34 38.72 35.68
44.08 41.07 39.29 42.49 51.73 43.86 38.95 34.17 38.32 29.72 47.55 38.39 46.42 43.6 47.28 39.32
39.95 38.13 33.79 45.53 40.26 50.72 37.81 45
2
Solution 1.
Events:
A: Phone is manufactured by the factory I;
B: Phone is manufactured by the factory II;
S
1
: Phone is satisfactory;
S
2
: Phone is defective; a.
P ( S
1
) = P ( S
1
|
A ) P ( A ) + P ( S
1
|
B ) P ( B )
= 0 .
99
·
0 .
667 + 0 .
95
·
0 .
333
= 0 .
977 b.
P ( A
|
S
2
) =
=
=
P ( S
2
|
A ) P ( A )
P ( S
2
|
A ) P ( A ) + P ( S
2
0 .
01
·
0 .
667
|
B ) P ( B )
0 .
01
·
0 .
667 + 0 .
05
·
0 .
333
2
7
Solution 2.
a.
Under H
0
,
Z
X
′
′
=
∼
N ormal (8 .
15 , (0 .
02)
2
/n ) .
X
′
−
8 .
15
0 .
02 / n
∼
N ormal (0 , 1) .
b.
p
− value = P (
|
X
′
= P (
|
Z
′ |
−
8 .
15
|
>
|
X
−
8 .
15
| |
µ = 8 .
20)
>
| x
−
8 .
15
|
0 .
02 / n
)
≤
α
So we reject H
0 if
⇐⇒
|
X
−
8 .
15
|
0 .
02 / n
|
X
−
8 .
15
|
√ n
0 .
02
≥
1 .
645.
≥ z
α/ 2
= 1 .
645 .
|
X
−
8 .
15
|
√ n
0 .
02
=
|
8 .
26
−
8 .
15
|
√
5
0 .
02
= 12 .
298 > 1 .
96 .
Reject H
0
.
3
Solution 3.
n = 2500, x = 2 .
95, µ
0
= 3, σ 2 = 1.
a.
X
∼
N ( µ, σ 2 /n )
H
0
: µ = µ
0
= 3, H
1
: µ < 3.
Under H
0
, X
∼
N (3 , 1 / 2500).
p
− value = P ( X < 2 .
95
|
µ = 3)
= P ( Z <
√
.
95
−
3
1 / 2500
)
= Φ(
−
2 .
5)
= 0 .
006 < 0 .
05
Thus we can conclude that the new toothpaste results, on average, in fewer than 3 cavities per child. However, since it also suggests that the mean drop is of the order of .05 cavities, it is probably not large enough to convince most users to switch.
b. No.
Solution 4.
E [ s
′
2
] =
=
=
=
=
=
=
=
E
i =1
( X i n
−
X ) 2
=
1 n
E
[ i =1
( X i
−
X )
2
]
1 n
E
[
[ i =1
1 n
E
[ i =1
1 n
E
[ i =1
1 n
E
[ i =1
1 n
E
1 n
(
( X
( X i
(
(
(
X
X
X i i i i
−
−
−
−
µ )
−
( X
−
µ )
−
µ )
2
µ
µ
µ
)
)
)
2
2
2 i =1
E
[
( X i
−
µ )
2
]
+
+
+
−
− i =1 n n n
(
(
(
X
X
X nE
( X
−
−
[(
−
X
−
µ
µ
µ
)
)
)
)
−
2
2
2
2
µ
]
]
)
−
−
µ
2
)
2
−
2(
2(
] i =1
X
X
−
−
2(
µ
µ
X
)
) n i
(
− i =1
X
(
µ )(
X
− i
X
µ
−
)
]
−
µ )
µ
]
)
]
1 n
[ i =1 nσ
2 − n
σ 2 n
]
= n
−
1
σ n
2
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
4
The unbiased estimator is s
2
= i =1
( X i
− n
−
1
X ) 2
Solution 5.
1.
2.
Two tailed
3.
Two tailed
Left tail
Solution 6.
H
H
H
0
0
0
: X
: p i
∼
N ( µ = 1 .
5 , σ
: p
∼
N ( µ = 0 .
6 , σ
2
∼
N ( µ = 0 .
7 , σ
2
2
)
)
) a.
µ = 41 .
839
U B = µ = X + st
LB = µ = X
− st
(
( s = 5 .
009 n
−
1)(1
−
α ) /
√ n
−
1)(1
−
α ) /
√ n = 43 .
46 n = 40 .
22 b. Bootstrap code n=40 x=[38.65 40.05 38.98 42.29 44.34 45.34 51.06 48.62 48.73 36.29 44.3 37.01
42.73 43.34 38.72 35.68 44.08 41.07 39.29 42.49 51.73 43.86 38.95 34.17 38.32
29.72 47.55 38.39 46.42 43.6 47.28 39.32 39.95 38.13 33.79 45.53 40.26 50.72
37.81 45] for i= 1:1000 y = datasample(x,n) mu(i)=mean(y) end
LB= prctile(mu,2.5)
UB= prctile(mu,97.5)
5