Download SOLUTION FOR HOMEWORK 4, STAT 4351 Welcome to your fourth

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Pattern recognition wikipedia , lookup

Inverse problem wikipedia , lookup

Hardware random number generator wikipedia , lookup

Mathematical optimization wikipedia , lookup

Simplex algorithm wikipedia , lookup

Simulated annealing wikipedia , lookup

Fisher–Yates shuffle wikipedia , lookup

Probability box wikipedia , lookup

Randomness wikipedia , lookup

Birthday problem wikipedia , lookup

Generalized linear model wikipedia , lookup

Probability amplitude wikipedia , lookup

Transcript
SOLUTION FOR HOMEWORK 4, STAT 4351
Welcome to your fourth homework, which begins our study of chapter 3 and also the last
one before Exam 1. Here we are exploring basics of univariate random variables (rv): discrete
rv, continuous rv, pdf (probability density function), pmf (probability mass function), cdf
(cumulative distribution function), calculation of probabilities.
Now let us look at your problems.
1. Problem 3.2. A discrete random variable X := X(w) is defined by its probability mass
function (in the text it is also referred to as the probability distribution but I prefer the pmf
as less confusing) f (x), x ∈ X . Here X is the range of the random variable X(w) defined for
w ∈ S. Please remember that both f and X define the pmf of a discrete random variable.
(a). Here f (x) = (x − 2)/5 and x ∈ X = {1, 2, 3, 4, 5}. Because f (1) takes on negative
value, it is not a valid pmf (see Theorem 3.1).
(b). Here f (x) = x2 /30, x ∈ X = {0, 1, 2, 3, 4}. The function is nonnegative, and
4
X
x2 /30 = [1 + 4 + 9 + 16]/30 = 1.
x=0
This is a valid pmf. Please note that you can exclude {0} from the range of X(w).
(c). Here f (x) = 1/5 for x ∈ X = {0, 1, 2, 3, 4, 5}. The function is nonnegative but it
sums up to 6/5, that is, it is not a valid pmf.
2. Problem 3.4.(a,b). The idea is to find a constant c which sums the values of the pmf
to 1.
(a). Here f (x) = cx, x ∈ X = {1, 2, 3, 4, 5}. Note that the range of X(w) is given but
only the linear shape of the pmf is given. Because
X
f (x) = 1
(1)
x∈X
must hold, we get 1 + 2 + 3 + 4 + 5 = 15 and this yields c = 1/15.
Note(!): the same f (x) = cx but with x ∈ X = {1, 2, 3} is another pmf, because here the
range is different and, as a result, c = 1/6.
(b). Here f (x) = c(5/x) with x ∈ X = {0, 1, 2, 3, 4, 5}. Calculate
5
X
(5/x) = ∞
x=0
and this implies that something is wrong here. Let us remove 0 from the range. Then
5
X
(5/x) = 5[1 + 1/2 + 1/3 + 1/4 + 1/5] =: A,
x=1
and c = 1/A (I skip calculation of A).
1
3. Problem 3.12. Note that the cdf is a complete and unique description of a random
variable. By analyzing the given cdf F (x) we find that the rv at hand is discrete with the
range X = {1, 4, 6, 10} and the corresponding pmf is f (1) := P (X = 1) = 1/3, f (4) :=
P (X = 4) = 1/2 − 1/3 = 1/6, f (6) = P (X = 6) = 5/6 − 1/2 = 1/3 and f (10) = P (X =
10) = 1 − 5/6 = 1/6. Please check that the total is 1.
Then:
(a) P (2 < X ≤ 6) = P (X = 4) + P (X = 6) = 1/2. Note that the complementary event
is {X = 1} ∪ {X = 10}, so the probability of interest is equal to 1 minus P (X = 1) minus
P (X = 10).
(b) P (X = 4) = 1/6.
(c) This was done in the Introduction to my solution (see f (x)).
4. Problem 3.15.
(a) First, I use the law of total probability, and then definition of the cdf:
P (X > x) = 1 − P (X ≤ x) = 1 − F (x) =: G(x).
Note that these relations hold for any x and any random variable(!) Also, G(x) is called the
survivor (distribution) function of the rv X (in biostat/quality-control applications it is the
probability that a patient/item will live/survive after time x).
(b) Similarly, for any x
P (X ≥ x) = 1 − P (X < x)
and this holds for any x and any X. However, if x = xi is the atom (the point from the
range of a discrete X(w) or the point of jump of the cdf — different words for the same
notion), and X is discrete with the range {xi , i = 1, 2, . . . , n} then for any 2 ≤ i ≤ n
P (X ≥ xi ) = 1 − P (X ≤ xi−1 ) = 1 − F (xi−1 ).
In the last equality I used definition of the cdf.
5. Problem 3.22. First of all, look how I am writing the pdf (probability density function)
f (x) = cx−1/2 I(x ∈ (0, 4))
where I(x ∈ A) is the indicator (or the indicator function) of the event A meaning that
the indicator equal to 1 if x belongs to A and it is equal to zero otherwise. Note that my
definition of the pdf and the book’s one are identical.
Now we can consider the problems.
(a): To find the value of c we need to remember that the pdf is integrated to 1 over
(−∞, ∞), that is,
Z
∞
f (x)dx = 1.
(2)
−∞
. For our specific density
Z
∞
−∞
f (x)dx =
Z
4
h
cx−1/2 dx = c 2x1/2
0
2
i4
0
= c[(2)(2) − 0] = 4c.
According to (2), we get c = 1/4.
(b) By definition of the probability of an event A and pdf of a continuous random variable
X,
Z
P (A) = P (X ∈ A) = f (x)dx.
(3)
A
Using (3) we get:
P (X < 1/4) =
Z
1/4
f (x)dx =
Z
(1/4)x−1/2 I(x ∈ (0, 4))dx
−∞
−∞
=
1/4
Z
1/4
h
(1/4)x−1/2 dx = (1/4) 2x1/2
0
i1/4
0
= (1/2)[1/2 − 0] = 1/4.
Further,
P (X > 1) = (1/4)
Z
4
h
x−1/2 dx = (1/4) 2x1/2
1
i4
1
= (1/2)[2 − 1] = 1/2.
By the way, what are the probabilities: P (X > 5) =?, P (X = 3) =?.
6. Problem 3.24. We can write the pdf as
2
f (z) = kze−z I(z > 0).
Now let us find k. Using (2) we get
1=
Z
∞
f (z)dz =
−∞
Z
∞
2
kze−z dz.
0
Now I see a nice change of the variable x = z 2 which simplifies the integration. Let us do
this:
Z ∞
Z ∞
Z ∞
−z 2
2
−z 2
e−x dx
(1/2)e dz = (k/2)
kze dz = k
0
0
0
h
= (k/2) − e−x
i∞
= (k/2)(1) = k/2.
0
This yields k = 2.
As about graphic — it is 0 for z ≤ 0, then it is increasing up to point z0 such that the
first derivative f ′ (z) := df (z)/dz is equal to zero, that is, f ′ (z0 ) = 0, and then it goes down
to zero. Let us find z0 . We have:
2
2
f ′ (z) = 2[e−z − z(2ze−z )].
q
Then the derivative is equal to zero at point z0 = 1/2. This is the point of maximum
(check this by looking at the second derivative or from the graphic).
7. Problem 3.28. Well, the question is about the cdf (cumulative distribution function).
Well,
Z x
F (x) =
f (z)z.
(4)
−∞
3
By an elementary calculation we get that
F (x) = 0I(x ≤ 0) + (1/3)xI(0 < x ≤ 1) + (1/3)I(1 < x ≤ 2)
+[(1/3) + (1/3)(x − 2)]I(2 < x ≤ 4) + I(x > 4).
Please check that the cdf is not decreasing, 0 at x = −∞ and 1 at x = ∞. Further, because
the random variable is continuous, the cdf is also continuous.
8. Problem 3.32. For the given cdf we see that it is continuous and its support is [−1, 1]
(the set where the corresponding density is positive). Then:
(a)
P (−1/2 < X < 1/2) = F (1/2) − F (−1/2) = 3/4 − 1/4 = 1/2.
(b) Similarly,
P (2 < X < 3) = F (3) − F (2) = 1 − 1 = 0.
This is because X takes on values larger than 1 with zero probability.
9. Problem 3.34. Similarly to the previous problem (and here actually due to the definition of the cdf)
P (Y ≤ 5) = F (5) = 1 − 9/25 = 16/25.
Then
P (Y > 8) = 1 − P (Y ≤ 8) = 1 − F (8) = 1 − (1 − 9/64) = 9/64.
10. Problem 3.41. Here we should be very accurate with equalities because with mixed
rv we may have P (X = x) being zero or positive depending on x.
(a)
P (Z = −2) = F (−2) − F (−2−) = 1/4 − 0 = 1/4.
Here F (x−) denotes the value of F (z) to the left of point z = x.
(b)
P (Z = 2) = F (2) − F (2−) = 1 − 6/8 = 1/4.
Please note that z = −2 and z = 2 are the discrete components of the random variable (the
cdf has jumps at these points).
(c)
P (−2 < Z < 1) = P (Z < 1) − P (Z ≤ −2) = F (1−) − F (−2) = 5/8 − 2/8 = 3/8.
(d)
P (0 ≤ Z ≤ 2) = P (Z ≤ 2) − P (Z < 0) = F (2) − F (0−) = 1 − 4/8 = 1/2.
I hope that I made no mistakes. Agree?
4