1) the random variable X is uniformly distributed on the interval
between 1 and 3. compute the expectation E(X^3-2X).
The general formula for determining the mean (expectation) value
E(f(x)) of a continuous function, f(x), if the independent variable x
has a specified probability distribution function (pdf) p(x) is:
E(f(x)) = {Integral from -infinity to +infinity}[p(x)*f(x)] dx
In your case, f(x) = x^3 - 2*x, and the pdf is a uniform distribution
between 1 and 3.
The equation for a uniform distribution between a and b is given by
(see http://mathworld.wolfram.com/UniformDistribution.html):
p(x) = 0 for x < a
p(x) = 1/(b-a) for a <= x <= b
p(x) = 0 for x > b
In your problem, p(x) is therefore equal to 1/(3-1) = 1/2 for x
between 1 and 3, and zero elsewhere.
Plugging the expressions for p(x) and f(x) into the formula for the
expectation value of f(x) yields:
E(f(x)) = {Integral from 1 to 3}[1/2 * (x^3 - 2*x)] dx
Note that because p(x) = 0 outside the range of a to b, the limits of
the integral only need to run from a to b. The value of the integral
is zero outside this range.
Evaluating this definite integral results in:
E(f(x)) = 6
--------------------------------------
2) the chocolate chip cookies made by a certain bakery have an average
diameter of 12 centimeters with a standard deviation of 2 centimeters.
what precentage of the cookies have diameters between 11 and 15
centimeters.
a) assume a normal distribution.
I assume you know the formula for a normal with mean (E(x)) and
standard deviation s. To calculate the probability that the cookies
have diameters between two specified values, we need to take the
integral of the normal distribution pdf between those values. This is
simpler to do if we recognize that the integral of a continuous
function over the interval a to b is equal to the (integral from
-infinity to b) minus the (integral from -infinity to a). The
integral of the normal pdf from minus infinity to a is given by the
cumulative pdf, which is a commonly tabulated value.
Excel happens to have a built-in function, NORMDIST, that calculates
the cumulative pdf for the normal distribution. We calculate the
value of the integral of the normal pdf between 11 and 15, by
subtracting the cumulative normal distribution evaluated at x = 11
from the cumulative distribution evaluated at 15.
The numerical values obtained in this way are:
P(x < 15) = .933193
P(x < 11) = 0.308538
P(11 < x < 15) = 0.624655, which implies that 62.4655% of the cookies
have diameters between 11 and 15 cm.
Note that it is physically impossible for the distribution of cookie
diameters to actually follow a normal distribution *exactly* because
the variate of the distribution can range from - infinity to +
infinity, and the value of the pdf is nonzero over this entire range.
That implies that there is a nonzero probability that a cookie could
have a negative diameter, which is a physical impossibility. When the
mean of the distribution is >> 0, and the variance is small, the tail
of the normal distribution for x < 0 is very small, and is commonly
neglected, but one can get into trouble if one is not aware of this
problem and blindly assume that a variable that cannot take on nonzero
values follows a normal distribution!
b) assume a gamma distribution.
The gamma distribution has pdf given by:
p(x) = [(x/b)^(a-1)*exp(x/b)]/[b*G(a)], x>=0,
p(x) = 0, x < 0
where a and b are > 0. a is called the "shape parameter", and b is the
"scale parameter". These parameters are related to the mean, E(x),
and standard deviation, s, by (see
http://www.rocscience.com/downloads/rocsupport/webhelp/rocsupport/Gamma_Distribution.htm):
a = (E(x)/s)^2
b = s^2/E(x)
In your problem, a = (12/2)^2 = 36; b = 2^2/12 = 1/3
G(a) is the gamma function which is defined by the expression G(z) =
{Integral from 0 to infinity}[t^(z-1)*exp(-t)] dt. The gamma function
is a generalization of the factorial function. The integral in the
definition is not analytic, and one must find the value of the gamma
function numerically.
As in the previous case, the probability that a cookie will have a
diameter between two values is simply found by integrating the pdf
over the interval between the two diameters in question:
P(11 < x < 15) = {Integral from 11 to 15} [(3*x)^(35)*exp(3*x)]/[G(36)/3] dx
Lucky for us, Excel happens to have a built-in function, GAMMADIST,
that can calculate either the value of the pdf, or the cumulative pdf
*the integral from - infinity to a specified value) of the gamma
function. We want to make use of the latter capability. We use the
same trick as we used for the normal distribution, and calculate the
value of the integral of the gamma pdf between 11 and 15, by
subtracting the cumulative gamma distribution evaluated at x = 11 from
the cumulative distribution evaluated at 15.
The numerical values obtained in this way are:
P(x < 15) = 0.925782
P(x < 11) = 0.323254
Subtracting these yields the desired result: P(11 < x < 15) =
0.602529, which means that 60.2529% of the cookies will have diameters
between 11 and 15 cm.
If you do not have access to Excel, you would need to use some other
numerical package, or look up the values of the cumulative gamma
distribution in a tabulation. |