University of California, Berkeley
Department of Mechanical Engineering
Fall Semester 2008
Instructors: M. Frenklach, R. Horowitz
E7, Assignment 12
Assigned: Tuesday, December 3, 2008
Due: 12:00 pm (noon), Wednesday, December 10
, 2008
This assignment is on statistics, numerical differentiation, integration, and solution of
ordinary differential equations. As before, turn in the hard copy of your published file to
the drop boxes in Etcheverry 1109 and upload the soft copies of your script and your
functions (the Mfiles) to bspace. Do not forget to name your main Mfile as
lastname_firstname_SID_lab12.m
NOTE: Do not forget to display the contents of your userdefined functions using
the command
type.
MATLAB
commands
*
introduced in this assignment:
mean, std, bar, erf,
erfc, quad
1. A package delivery company (such as FeDex or UPS) has 500 planes departing from
one of its hubs and each plane is loaded with 10,000 packages. The weight of each
package can be considered as a uniformly distributed independent random variable
between 2 kg and 10 kg.
a)
Calculate the mean and standard deviation of the weight of each package.
Hint: Define the weight of a package by
W
.
Since each weight
W
is uniformly distributed
between 2 kg and 10 kg, then the probability distribution function (PDF) of the package
weigh is
1
for 2
10
()
8
0
elsewhere
w
w
pw
⎧
≤
≤
⎪
=
⎨
⎪
⎩
Therefore, as discussed in Lecture Notes 23  Statistics, the mean
W
μ
and standard
deviation
W
σ
of each package are respectively given by
10
22
2
11
1
0
2
1
0
6
(10
2)
2 10
2
2
WW
wp
w dw
wdw
∞
−∞
−+
==
=
=
−−
∫∫
2
=
*
Please refer to
MATLAB
help to learn how to use the functions introduced in this assignment.
Assignment 12
E7
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentUniversity of California, Berkeley
Department of Mechanical Engineering
Fall Semester 2008
Instructors: M. Frenklach, R. Horowitz
10
22
2
2 2
2
1
()
(
)
(
)
6
(10
2)
WW
W
wp
w
d
w
w
p
w
d
w
w
d
w
σμ
μ
∞∞
−∞
−∞
=−
=
−
=
−
=
−
∫∫
∫
2
?
Complete the right hand side of the second equation.
b)
Calculate the mean and standard deviation of the total weight
L
that each plane must
carry.
Hint:
Since each plane carries 10,000 packages, and the weight of each package is an
independent
random variable with mean
W
and standard deviation
W
σ
, then, as
discussed in Lecture Notes 23  Statistics, the mean and standard deviation of the total
plane load
L,
L
and
L
,
are
10000
LW
=⋅
and
2
10000
σσ
c)
The following
MATLAB
command generates a 500×1 array
L,
where the kth element
L(k)
is a randomly generated number that simulates the load
L
k
carried by the kth
plane.
>> L = sum(8*rand(500,10000)+2,2);
i)
Use the
MATLAB
commands
mean
and
std
to respectively determine the
sample mean and standard deviations
500
1
1
500
k
L
=
=
∑
L
k
and
500
2
1
1
(()
)
500
L
k
Lk
L
=
∑
and respectively compare them with theoretical values
L
and
L
calculated above.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '09
 Sengupta
 Numerical Analysis, Standard Deviation, Ode, Department of Mechanical Engineering Instructors, Berkeley Fall Semester, Mechanical Engineering Instructors

Click to edit the document details