-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path#hw1.lyx#
352 lines (253 loc) · 6.02 KB
/
#hw1.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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
#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
\spacing single
\use_hyperref false
\papersize default
\use_geometry true
\use_amsmath 1
\use_esint 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\leftmargin 1in
\topmargin 1in
\rightmargin 1in
\bottommargin 1in
\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 ""
\author ""
\end_header
\begin_body
\begin_layout Standard
John Hancock
\end_layout
\begin_layout Standard
CEN 6405
\end_layout
\begin_layout Standard
Homework #1
\end_layout
\begin_layout Standard
May 15th, 2014
\end_layout
\begin_layout Section*
12.2
\end_layout
\begin_layout Standard
Exercise 12.2 gives us the following pmf for the distribution of traffic
arriving at a network gateway:
\begin_inset Formula \[
f\left(x\right)=\left(1-p\right)^{x-1}p,\, x=1,2,3,\ldots,\infty\]
\end_inset
\end_layout
\begin_layout Standard
First, we are required to compute the mean, variance, standard deviation,
and coefficient of variation of the burst size:
\end_layout
\begin_layout Standard
\series bold
Mean:
\end_layout
\begin_layout Standard
The general formula for the mean value is
\begin_inset Formula \begin{equation}
\mu=E\left(x\right)=\sum_{i=i}^{n}p_{i}x_{i}\label{eq:1}\end{equation}
\end_inset
\end_layout
\begin_layout Standard
In this case, the
\begin_inset Formula $p_{i}$
\end_inset
are
\begin_inset Formula $\left(1-p\right)^{x-1}p$
\end_inset
for a given value of
\begin_inset Formula $x$
\end_inset
in
\begin_inset Formula $\left\{ 1,2,3,...,\infty\right\} $
\end_inset
, and the
\begin_inset Formula $x_{i}$
\end_inset
are the values
\begin_inset Formula $\left\{ 1,2,3,\ldots,\infty\right\} $
\end_inset
.
Therefore the mean value is:
\begin_inset Formula \[
\mu=\sum_{i=1}^{\infty}i\left(1-p\right)^{i-1}p\]
\end_inset
\end_layout
\begin_layout Standard
\series bold
Variance:
\end_layout
\begin_layout Standard
The general formula for variance is:
\begin_inset Formula \begin{equation}
Var\left(x\right)=E\left[\left(x-\mu\right)^{2}\right]=\sum_{i=1}^{n}p_{i}\left(x_{i}-\mu\right)^{2}\label{eq:2}\end{equation}
\end_inset
\end_layout
\begin_layout Standard
Again,
\begin_inset Formula $p_{i}$
\end_inset
is
\begin_inset Formula $\left(1-p\right)^{x-1}p$
\end_inset
for a given value of
\begin_inset Formula $x$
\end_inset
in
\begin_inset Formula $\left\{ 1,2,3,...,\infty\right\} $
\end_inset
.
We know the value of
\begin_inset Formula $\mu$
\end_inset
from
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:1"
\end_inset
.
We can therefore rewrite
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:2"
\end_inset
as :
\begin_inset Formula \begin{equation}
Var\left(x\right)=\sum_{i=1}^{\infty}\left[\left(1-p\right)^{i-1}p\right]\left[i-\left(i\left(1-p\right)^{i-1}p\right)\right]^{2}\label{eq:3}\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\series bold
Standard Deviation:
\end_layout
\begin_layout Standard
The square root of the variance is the standard deviation.
Therefore the standard deviation is the square root of
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:3"
\end_inset
:
\begin_inset Formula \begin{equation}
\sigma=\sqrt{\sum_{i=1}^{\infty}\left[\left(1-p\right)^{i-1}p\right]\left[i-\left(i\left(1-p\right)^{i-1}p\right)\right]^{2}}\label{eq:4}\end{equation}
\end_inset
\end_layout
\begin_layout Standard
\series bold
Coefficient of variation:
\end_layout
\begin_layout Standard
The coefficient of variation is the standard deviation divided by the mean.
In this case it will be
\begin_inset Formula $\mu$
\end_inset
from equation
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:1"
\end_inset
divided by
\begin_inset Formula $\sigma$
\end_inset
from
\begin_inset CommandInset ref
LatexCommand ref
reference "eq:4"
\end_inset
:
\begin_inset Formula \[
\frac{\sigma}{\mu}=\frac{\sqrt{\sum_{i=1}^{\infty}\left[\left(1-p\right)^{i-1}p\right]\left[i-\left(i\left(1-p\right)^{i-1}p\right)\right]^{2}}}{\sum_{i=1}^{\infty}i\left(1-p\right)^{i-1}p}\]
\end_inset
\end_layout
\begin_layout Standard
To complete the exercise we must also plot the probability mass function
(pmf) and cumulative density function (CDF) for
\begin_inset Formula $p=0.2$
\end_inset
\end_layout
\begin_layout Standard
\series bold
pmf plot
\end_layout
\begin_layout Standard
To plot the pmf we plug
\begin_inset Formula $0.2$
\end_inset
into the pmf and draw a graph of it as a function of x.
Plugging
\begin_inset Formula $0.2$
\end_inset
into
\begin_inset Formula \[
f\left(x\right)=\left(1-p\right)^{x-1}p,\, x=1,2,3,\ldots,\infty\]
\end_inset
gives us
\begin_inset Formula \[
f\left(x\right)=\left(1-0.2\right)^{x-1}0.2,\, x=1,2,3,\ldots,\infty\]
\end_inset
\end_layout
\begin_layout Standard
This function is pictured below:
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename /home/john/Documents/school/summer-2014/performance-modeling/12.2-pmf.png
\end_inset
\end_layout
\begin_layout Standard
The CDF of
\begin_inset Formula $f\left(x\right)$
\end_inset
is the function:
\begin_inset Formula \[
F\left(x\right)=\sum_{i=1}^{x}\left[\left(1-0.2\right)^{i-1}0.2\right]\,,x=1,2,3,\ldots,\infty\]
\end_inset
\end_layout
\begin_layout Standard
This is a plot of the CDF:
\end_layout
\begin_layout Standard
\begin_inset Graphics
filename 12.2-cdf.png
\end_inset
\end_layout
\begin_layout Part*
12.11
\end_layout
\begin_layout Standard
The index of central tendency we would use for the list of disk I/O's given
in exercise 12.11 is the mean.
\end_layout
\end_body
\end_document