-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhw2.lyx
326 lines (253 loc) · 6.26 KB
/
hw2.lyx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
#LyX 1.6.7 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
\textclass article
\use_default_options true
\language english
\inputencoding auto
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\paperfontsize default
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\author ""
\end_header
\begin_body
\begin_layout Standard
John Hancock
\end_layout
\begin_layout Standard
CEN 6405
\end_layout
\begin_layout Standard
Homework 2
\end_layout
\begin_layout Standard
May 20th, 2014
\end_layout
\begin_layout Part*
13.2
\end_layout
\begin_layout Standard
Exercise 13.2 requires us to make several calculations using the data given
in exercise 12.11.
The data is a list of disk I/O's per program:
\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\noun off
\color none
{23, 33, 14, 15, 42, 28, 33, 45, 23 , 34, 39, 21, 36, 23, 24, 36, 25, 9,
11, 19, 35, 24, 31, 29, 16, 23, 34, 24, 38, 15, 13, 35 , 28}
\end_layout
\begin_layout Section*
a.
10-percentile and 90-percentile from the sample
\end_layout
\begin_layout Standard
We learned in chapter 12 that, "The a-quantiles can be estimated by sorting
the observations and taking the
\begin_inset Formula $\left[\left(n-1\right)\alpha+1\right]^{th}$
\end_inset
element in the ordered set." Therefore in order to compute the 10-percentile
and 90 percentile from the sample, we must first sort the sample.
Here is the sorted version of the above list of disk I/O's: {9, 11, 13,
14, 15, 15, 16, 19, 21, 23, 23, 23, 23, 24, 24, 24, 25, 28, 28, 29, 31,
33, 33, 34, 34, 35, 35, 36, 36, 38, 39, 42, 45}
\end_layout
\begin_layout Standard
The number of elements in the list is 33, so we will use
\begin_inset Formula $n=33$
\end_inset
in the formula in the paragraph above.
We are required to calculate the 10 and 90 percentile from the sample,
so we will have two values of
\begin_inset Formula $\alpha$
\end_inset
for the formula:
\begin_inset Formula $0.1$
\end_inset
and
\begin_inset Formula $0.9$
\end_inset
.
Substituting these values for
\begin_inset Formula $n=33$
\end_inset
and
\begin_inset Formula $\alpha=0.1$
\end_inset
into the formula we get:
\begin_inset Formula \[
\left[\left(33-1\right)0.1+1\right]=\left[3.2+1\right]=\left[4.2\right]=4\]
\end_inset
Which implies the 10-percentile from the sample is the fourth element in
the sorted list, which is 14.
\end_layout
\begin_layout Standard
Note: our text uses the notation
\begin_inset Formula $\left[.\right]$
\end_inset
to denote rounding the value in the square brackets to the nearest integer
value.
\end_layout
\begin_layout Standard
Similarly, substuting
\begin_inset Formula $n=33$
\end_inset
and
\begin_inset Formula $\alpha=0.9$
\end_inset
into the formula we get:
\begin_inset Formula \[
\left[\left(33-1\right)0.9+1\right]=\left[28.8+1\right]=\left[29.8\right]=30\]
\end_inset
\end_layout
\begin_layout Standard
This implies the thirtieth element of the sorted list is the 90-percentlie
from the sample, which is 38.
\end_layout
\begin_layout Section*
b.
Mean number of disk I/O's per Program
\end_layout
\begin_layout Standard
Our text states,
\begin_inset Quotes eld
\end_inset
\series bold
Sample mean
\series default
is obtained by taking the sum of all observations and dividing this sum
by the number of observations in the sample.
\begin_inset Quotes erd
\end_inset
The sum of the number of disk I/O's in the list from exercise 12.11 is 878.
We have 33 observations in the list so the sample mean is:
\begin_inset Formula $\frac{878}{33}\approx26.6$
\end_inset
.
\end_layout
\begin_layout Section*
c.
90% confidence interval for the mean
\end_layout
\begin_layout Standard
Box 13.1, item 1.
b.
in our text gives a formula for the
\begin_inset Formula $100\left(1-\alpha\right)$
\end_inset
two sided confidence interval for a sample mean.
\begin_inset Formula \[
\bar{x}\mp z_{1-\frac{\alpha}{2}}\frac{s}{\sqrt{n}}\]
\end_inset
\end_layout
\begin_layout Standard
We know to use this formula because we have more than 30 elements in our
sample.
That is,
\begin_inset Formula $n=33$
\end_inset
.
\end_layout
\begin_layout Standard
Section 13.2 explains that
\begin_inset Formula $\bar{x}$
\end_inset
is the sample mean.
We computed the sample mean in exercise 13.2 b.
above, so we already know
\begin_inset Formula $\bar{x}=26.6$
\end_inset
.
\end_layout
\begin_layout Standard
\begin_inset Formula $z_{1-\frac{\alpha}{2}}$
\end_inset
is the
\begin_inset Formula $1-\frac{\alpha}{2}$
\end_inset
- quantile of a normal unit variate.
The current excercise requires us to compute a 90% confidence interval,
so we know
\begin_inset Formula $100\left(1-\alpha\right)=90$
\end_inset
.
We can solve for
\begin_inset Formula $\alpha$
\end_inset
to determine
\begin_inset Formula $a=0.1$
\end_inset
.
Hence, we know we must use the
\begin_inset Formula $z_{1-\frac{0.1}{2}}=z_{0.95}$
\end_inset
value from appendix A.2 in our text.
This value is:
\begin_inset Formula $1.645$
\end_inset
.
\end_layout
\begin_layout Standard
\begin_inset Formula $s$
\end_inset
is the sample standard deviation.
We used a spreadsheet to calculate the standard deviation of the sample.
The result we obtained for
\begin_inset Formula $s$
\end_inset
is
\begin_inset Formula $s=9.4$
\end_inset
.
\end_layout
\begin_layout Standard
Substituting all these values in the formula for the confidence interval
above we obtain the interval:
\begin_inset Formula \[
\left(26-1.645\frac{9.4}{\sqrt{33}},26+1.645\frac{9.4}{\sqrt{33}}\right)\]
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Formula \[
\approx\left(23.3,28.7\right)\]
\end_inset
\end_layout
\begin_layout Section*
d.
Fraction of programs making less or equal to 25 I/O's, and the 90% confidence
interval for the fraction
\end_layout
\begin_layout Standard
\end_layout
\end_body
\end_document